26

Is it correct to say, for example, that a processor with four cores each running at 3GHz is in fact a processor running at 12GHz?

I once got into a "Mac vs. PC" argument (which by the way is NOT the focus of this topic... that was back in middle school) with an acquaintance who insisted that Macs were only being advertised as 1Ghz machines because they were dual-processor G4s each running at 500MHz.

At the time I knew this to be hogwash for reasons I think are apparent to most people, but I just saw a comment on this website to the effect of "6 cores x 0.2GHz = 1.2Ghz" and that got me thinking again about whether there's a real answer to this.

So, this is a more-or-less philosophical/deep technical question about the semantics of clock speed calculation. I see two possibilities:

  1. Each core is in fact doing x calculations per second, thus the total number of calculations is x(cores).
  2. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+...)/cores.
4
  • Many of the answers here do a good job of explaining why e.g. a quad-core 2 GHz processor is not necessarily equal to a single-core 8 GHz processor. However, I'm having a difficult time divining how multi-core processor speeds should be regarded when deciding a system's suitability for an application that lists a specific speed and number of cores in its requirements? (e.g.: Borderlands 2 requires a 2.4 GHz dual-core processor. Should we expect a lower-speed quad-core, or higher-speed single-core to do just as well?) Is that (or could it be) answered here, or should it be a separate question?
    – Iszi
    Nov 1, 2012 at 20:18
  • @Iszi That should be another question, but it's likely that Borderlands is optimized for more than one thread if they're including "dual core" in their requirements. In that case, a single-core processor would not be recommended, but it's unclear if it can take advantage of > 2 cores.
    – NReilingh
    Nov 1, 2012 at 21:12
  • It is important to remember that the clock speed and number of cores do not solely determine the 'speed' of the processor. For example, the cache sizes and speed will affect the time the processor spends waiting for instructions and data. Additionally, the instructions per cycle (in a way, 'efficiency', though distinct from and related to power efficiency) will also affect speed of calculations. Different processors will take different times to execute the same instruction.
    – Bob
    Jan 20, 2013 at 13:14

7 Answers 7

37

The main reason why a quad-core 3GHz processor is never as fast as a 12GHz single core is to do with how the task running on that processor works, i.e. single-threaded or multi-threaded. Amdahl's Law is important when considering the types of tasks you are running.

If you have a task that is inherently linear and has to be done precisely step-by-step such as (a grossly simple program)

10: a = a + 1
20: goto 10

Then the task depends highly on the result of the previous pass and cannot run multiple copies of itself without corrupting the value of 'a' as each copy would be getting the value of 'a' at different times and writing it back differently. This restricts the task to a single thread and thus the task can only ever be running on a single core at any given time, if it were to run on multiple cores then the synchronisation corruption would happen. This limits it to 1/2 of the cpu power of a dual core system, or 1/4 in a quad core system.

Now take a task such as:

10: a = a + 1
20: b = b + 1
30: c = c + 1
40: d = d + 1
50: goto 10

All of these lines are independent and could be split into 4 separate programs like the first and run at the same time, each one able to make effective use of the full power of one of the cores without any synchronisation problem, this is where Amdahl's Law comes into it.

So if you have a single threaded application doing brute force calculations the single 12GHz processor would win hands down, if you can somehow make the task split into separate parts and multi-threaded then the 4 cores could come close to, but not quite reach, the same performance, as per Amdahl's Law.

The main thing that a multi CPU system gives you is responsiveness. On a single core machine that is working hard the system can seem sluggish as most of the time could be being used by one task and the other tasks only run in short bursts in between the larger task, resulting in a system that seems sluggish or juddery. On a multi-core system the heavy task gets one core and all the other tasks play on the other cores, doing their jobs quickly and efficiently.

The argument of "6 cores x 0.2GHz = 1.2Ghz" is rubbish in every situation except where tasks are perfectly parallel and independant. There are a good number of tasks that are highly parallel, but they still require some form of synchronsation. Handbrake is a video trancoder that is very good at using all the CPUs available but it does require a core process to keep the other threads filled with data and collect the data that they are done with.

  1. Each core is in fact doing x calculations per second, thus the total number of calculations is x(cores).

Each core is capable of doing x calculations per second, assuming the workload is suitable parallel, on a linear program all you have is 1 core.

  1. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+...)/cores.

I think it is a fallacy to think that 4 x 3GHz = 12GHz, granted the maths works, but you're comparing apples to oranges and the sums just aren't right, GHz can't simply be added together for every situation. I would change it to 4 x 3GHz = 4 x 3GHz.

7
  • Nice post.. Could not vote more than 1+ :-( Jul 29, 2011 at 3:21
  • But amdahl's law is a programming concern, caused by locking, not a hardware concern. If you don't need to synchronize, each core could execute instructions as fast as it can go. One could design a parallel program (a simple one) that would be perfectly split between cores. Wouldn't hardware manufacturers advertise this raw value? Nov 7, 2018 at 23:34
  • To clarify, I understand why this answers the question of why 4 cores at 3 ghz are not as fast, in practice as a 12ghz, but the not the part of how clock speed is calculated for multicores. Nov 7, 2018 at 23:38
  • @JustinMeiners clock speed per core is simply the clock speed the core runs at. There is no magical calculation that equates a single core to multicore. Multiple cores just means that you can run more separate tasks simultaneously. Amdahls law applies because of software, the syncronisation and locking needed will prevent a task from being "perfect" in hardware just as much as software. Shared caches and memory causes contention and locks to occur.
    – Mokubai
    Nov 8, 2018 at 7:48
  • @Mokubai Just to clarify, when a manufacturer lists the clock speed, each individual core runs at the speed, correct? Nov 8, 2018 at 16:33
7

Others made a good argument from technical point of view. I'll instead make a couple of simple analogies which will I hope will explain why 4*3GHz is not equivalent to 1*12GHz.

For example one woman can manufacture one baby in nine months. Will nine women be able to manufacture one baby in one month? No, because gestation cannot be parallelized (well, at least at this technological level).

Here's another: In a hydroelectric plant I recently visited, one of the generators was being upgraded. They had to transport the generator's stator by ship. One sixth of the stator could be transported by truck, but they needed to transport whole stator; so they had to use one ship, not six trucks.

Another case could be precise timing of events. Sometimes computer processors are used as precise timers (although the practice is no longer recommended, because of variable clock on most processors. High precision event timer should be used instead). If we assume that we have a processor with relatively stable 12GHz clock, we can use it to measure time in much higher resolution than on a processor with 3GHz clock. No matter how many 3GHz cores we have, we will not be able to reach resolution of the 12GHz core. That is like having 4 clocks with 7-segment displays where each clock just displays correct time in hours. No matter how correctly they show hours, you can't use them to measure time intervals in one second range.

1
  • Useful answer for the less technical-minded. Also, I like analogies :)
    – aff
    Nov 18, 2014 at 3:35
3

I'm not an expert on the subject, but I do have a degree in Computer Engineering. In theory (this is a highly conceptual answer), a quad-core 3GHz each processor can be the equivalent of one 12GHz processor if, for example, there were four sets of calculations needed for a single end result. That is what's called parallel processing.

To simplify the logic, let's say we're talking about a dual core processor. If a set of calculations were, say:

a=b+1;

c=d+1;

then, those two calculations could be executed on separate cores, and an xGHz processor would be equivalent to a single-core 2*xGHz processor. This is because the two calculations, although done at x speed, would be processed at the same time. Whereas the single-cored processor could do them at 2*x speed but one after the other. If the two CPUs executed this code at the same time, they would finish at the same time. However, if the code were:

a=b+1;

c=a+1;

then, the dual-core processor would take twice as long as the single-core processor because in the second instruction, the value of a is dependent on the first instruction and thus cannot be executed in parallel. This is how some software can take advantage of multi-threaded processors.

So, in theory, a 12GHz single-core processor can always run as fast (or faster) than a 3GHz quad-core processor, but not vice-versa.

2
  • Note that those calculations will only be faster if it's mutlithreaded, and even then there's a slight overhead. But yes, while it's possible to make a single core processor that can do as many calculations, it simply isn't plausible due to heat and stuff.
    – Phoshi
    Jul 24, 2010 at 10:18
  • This answer is misleading for two reasons. First, modern cores do more than one thing at a time. Second, the answer assumes that the core speed is the same as the rate at which work is done. A 12GHz single-core processor won't run as fast as a 3GHz quad-core processor if the single-core processor needs significantly more clock cycles to accomplish the same work. (Which it would since a 12GHz processor would need much longer pipelines.) Jun 24, 2013 at 10:58
2

This is a complicated question to answer, but the short answer is: No

In real world applications four 3Ghz processors will not be as fast as a single 12Ghz processor due to inefficiencies. They may be very close, but they will NOT equal a single processor in terms of processing power.

The reason for this lies in the small inefficiencies when dealing with programs that can run on more than one processor. Assuming that the program in question can run in parallel, we will still run into problems with different cores competing against each other for other resources such as RAM or even cache and thread synchronization problems. Also, there are always parts of programs that can not be parallelized and need to run on a single core by itself.

Take a look at this article: http://en.wikipedia.org/wiki/Amdahl%27s_law

12
  • You are right and wrong. Four 3ghz processors will most likely be FASTER than a single 12ghz processor in "real world" applications. These days more and more programs are using multi-threading, the link you gave is referring to a theoretical single thread application. A single processor at 12ghz only has one thread, so the multi-threading benefits a "real world" program has to offer would be lost. The industry isn't going toward more slower cores instead of fewer faster cores just because, the benefits of multi-core technology far outweigh the benefits of fast single core technology. Jul 24, 2010 at 9:04
  • 3
    @typoknig: That's not quite true. A 6GHz single-core processor would run a multi-threaded application at about the same speed as a 3GHz dual-core processor, assuming the app is taking full advantage of every thread (which it most likely is not doing if it is a "real world application", but that's a separate argument). We don't see 12GHz processors because it's too difficult with current technology, not because it's slower. Jul 24, 2010 at 9:54
  • 4
    @typoknig: I've programmed some mutithreaded programs and believe me, if i had a single 12Ghz processor, id use that instead. Single threaded programming is 10x easier and much much more efficient than muti threaded programming. The real reason why the industry is moving twords muticore processors is not because they are faster, its because we can't make individual CPUs run any faster! This was outlined with Intel's netburst technology back in the p4 days. They estimated 10Ghz processors, at least, that is until quantum physics slapped them in the face and said "no noob!"
    – Faken
    Jul 24, 2010 at 18:30
  • 2
    @typokning: The F22 uses an array of powerPC processors to achieve 10 billion instructions per second, very different from being 10Ghz! Its like saying your Radion HD5970 operates at 4600Ghz. It's capable for 4.6 TFLOPS but only because it's highly parallel.
    – Faken
    Jul 24, 2010 at 23:13
  • 1
    @typoknig: You clearly don't understand the difference between CPU frequency and IPS (instructions per second), they are not one in the same. Please read: en.wikipedia.org/wiki/Instructions_per_second
    – Faken
    Jul 25, 2010 at 23:21
2

It appears that we can't say that 4 cores @ 3 GHz can be said as 12 GHz.

Various Constraints like shared memory, cache contention and other resources too are common to all the cores so running a piece of code parallel on these cores will not be as efficient as running it on 12 Ghz processors (although it is difficult to build such a processor ).

Also i read somewhere that if we double the transistors embedded on the chip (CMP) , the speed up we are going to get is only 40% . This provides a significant hint to this topic also.

1

As far as clock cycles executed is concerned, yes a multi-core processor does complete x * cores cycles of work per second. Conventionally, clock speeds are listed on a per-core basis for easier comparison (otherwise how would you easily compare a 4GHz dual-core chip running at 2GHz/core vs a 4GHz quad-core chip running at 1GHz/core?).

Unfortunately, the problem gets complex when you try to compare different processors in real-world applications.

First, most multi-core processors have some resources shared between the cores (e.g. CPU cache). They have to share access to that cache, so you can't have both cores storing or reading data at full speed. This is often mitigated in many-core CPUs by having multiple shared caches (e.g. most quad-core chips have 2 caches, each shared by a pair of cores), in order to better divide the chances of a bottleneck on a shared resource.

Second, and perhaps less known in the non-techie world, is that comparing clock speeds can sometimes be like comparing apples and oranges. Different CPUs accomplish a different amount of work in a single clock cycle, so saying you have 1GHz vs. 1.2GHz sounds great, but the 1GHz chip might actually get more work done in a given interval of time. The Pentium 4 drove this point home, leading to the Megahertz Myth (which I didn't know had a name coined until writing this post).

1
  • Clock speeds are not listed on a "per-core basis". Speeds are never "per" anything. If a car is going 50 miles per hour, the speed is 50 miles per hour. If two cars are going 50 miles per hour, the speed is still 50 miles per hour. The idea of a "speed per car" is meaningless and incoherent. Jun 24, 2013 at 11:42
1

Two cars each going 50 miles per hour don't "add up" to 100 miles per hour. It really is that simple. The clock speed of a processor is not a measure of the rate at which work is done, it's a measure of how fast the clock ticks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .