Jump to content

What is the difference between single core processor with fast clock and multi-core


Recommended Posts

What is the difference between single corecore processor with a fast clock speed 4 GHz, for example, a multi-core but with a little slower clock speed???

My processor is already a dinosaur when it comes to the evolution of processors, but when I bought my computer in 2008, all the friends I secretly envied it. What was nice because usually they have better things than I do. It's fun sometimes something to brag: D

My processor is an Intel Core 2 Quad Q8400 2.66 GHz

http://ark.intel.com/pl/products/38512/Intel-Core2-Quad-Processor-Q8400-4M-Cache-2_66-GHz-1333-MHz-FSB

I'm thinking of buying a new computer, I got the money from the scholarship but my mother discouraged me, saying that it was unnecessary expense since my old computer is doing fine.

I wonder what is the difference between fast single-core processors and slower but multi-core?

Link to post
Share on other sites

A single core computer is just that, a single core. If you load a Fibonacci program into it, the code will be executed like this:


1. A = 1;
2. B = 1;
3. while 1 {
4. C = A + B;
5. A = B;
6. B = C;
7. } end;

With one line being executed after the next. How fast you can execute those lines depends on your clock speed. The faster the clock speed the quicker the CPU can execute those lines and thus the faster your program.

Multi core CPU's speed things up by doing multiple things at the same time. For example, say that you wanted to do the same fibonacci program as before, but now you also want to show the index of the number in variable I.

To run that on a single core your program looks something like this:


1. A = 1;
2. B = 1;
3. I = 1;
4. while 1 {
5. C = A + B;
6. A = B;
7. B = C;
8. I = I + 1;
9. } end;

So with 4 lines in the loop. This means it takes 4 times your clock period per loop to run this program. But, you could also run the counter on the second core like this:


CPU 1 CPU 2
1. A = 1; I = 1;
2. B = 1;
3. while 1 { while 1 {
4. C = A + B; I = I + 1;
5. A = B;
6. B = C;
7. } end; } end;

As you can see the program now only takes 3 clock periods per loop. So you've sped up your program by 25%. There are some limitations to this however. In this fibonacci program the CPU needs the value from the previous clock cycle to calculate the current one. It cannot set A to B and calculate A + B at the same time. So you can never chop up this program into smaller bits. Therefore a dual core computer isn't twice as fast as a single core in most cases.

Multi core computers and programs designed for them are pretty much the standard nowadays. So I definitely recommend at least a dual core if you want something top shelf. But it kinda depends on what you do with your PC. If you only play KSP for example I wouldn't go for more than 2 cores, KSP does use multiple cores, but the limiting factor is the physics thread which can only run on a single core at a time. So a high clockspeed dual core would be superior to a low clockspeed quadcore for example.

Link to post
Share on other sites

Honestly, not a lot of software makes use of multi-core. Writing code for multiple processors tends to be a pain, and a lot of people simply don't bother. It helps a lot if you have a background process, however. If you are encoding a video, for example, and want to play a game while computer is busy working, multi-core is your friend.

Link to post
Share on other sites
A single core computer is just that, a single core. If you load a Fibonacci program into it, the code will be executed like this:


1. A = 1;
2. B = 1;
3. while 1 {
4. C = A + B;
5. A = B;
6. B = C;
7. } end;

With one line being executed after the next. How fast you can execute those lines depends on your clock speed. The faster the clock speed the quicker the CPU can execute those lines and thus the faster your program.

Multi core CPU's speed things up by doing multiple things at the same time. For example, say that you wanted to do the same fibonacci program as before, but now you also want to show the index of the number in variable I.

To run that on a single core your program looks something like this:


1. A = 1;
2. B = 1;
3. I = 1;
4. while 1 {
5. C = A + B;
6. A = B;
7. B = C;
8. I = I + 1;
9. } end;

So with 4 lines in the loop. This means it takes 4 times your clock period per loop to run this program. But, you could also run the counter on the second core like this:


CPU 1 CPU 2
1. A = 1; I = 1;
2. B = 1;
3. while 1 { while 1 {
4. C = A + B; I = I + 1;
5. A = B;
6. B = C;
7. } end; } end;

As you can see the program now only takes 3 clock periods per loop. So you've sped up your program by 25%. There are some limitations to this however. In this fibonacci program the CPU needs the value from the previous clock cycle to calculate the current one. It cannot set A to B and calculate A + B at the same time. So you can never chop up this program into smaller bits. Therefore a dual core computer isn't twice as fast as a single core in most cases.

Multi core computers and programs designed for them are pretty much the standard nowadays. So I definitely recommend at least a dual core if you want something top shelf. But it kinda depends on what you do with your PC. If you only play KSP for example I wouldn't go for more than 2 cores, KSP does use multiple cores, but the limiting factor is the physics thread which can only run on a single core at a time. So a high clockspeed dual core would be superior to a low clockspeed quadcore for example.

I'm not mathematician so i have problem with understanding what you talking about :confused: but generally understand the concept.

I bought my computer in 2008 along with Intel Core 2 Quad core 2,66 Ghz Q8400 to make my buddies green with envy, usually they have better stuff than i this time situation was revered:D With make my nerdy-aspie pride:D i'll still think that it was good investment but my mum think that PC for over 2000 zł (652 USD) is way to expansive

Link to post
Share on other sites
I'm not mathematician so i have problem with understanding what you talking about :confused: but generally understand the concept.

I bought my computer in 2008 along with Intel Core 2 Quad core 2,66 Ghz Q8400 to make my buddies green with envy, usually they have better stuff than i this time situation was revered:D With make my nerdy-aspie pride:D i'll still think that it was good investment but my mum think that PC for over 2000 zł (652 USD) is way to expansive

If you are only buying components for your PC to make your friends envious, not to get the performance you need then you have your priorities skewed. If you are after bragging rights I'd get them by beating your friends in games, a lot more fun and less expensive.

Link to post
Share on other sites

OK let's say you've got a Pentium and an i5, both with the same CPU architecture (Haswell, for argument's same) and both at the same clock speed. The Pentium has two cores, the i5 has four, and neither have hyperthreading. There are a few other differences but they're relatively minor.

If you are running a single program that's not been designed to use multiple cores (ie is "single threaded"), and its performance is limited by the CPU (and not the graphics card, the hard drive, or anything else) both processors will do about the same.

If you are running a single program that has been ideally designed to use multiple cores (ie is "multi threaded"), it will run about twice as fast on the i5 as on the Pentium.

If you are running three or more programs, even if they're individually not designed to use multiple cores, then you may get better performance from the i5 than the Pentium.

As for hyperthreading, well think of it as adding an extra "half-core" to each regular core. An i3 has two cores with hyperthreading (and most i7 are four cores with hyperthreading). Running a program or combination of programs that uses three or more cores, the i3 will do somewhat better than an equally-clocked Pentium but somewhat more worse than an equally-clocked i5.

***

Now, let's talk about your system. Benchmarks aren't the be-all and end-all of performance but they're a good start. This is your processor:

http://www.cpubenchmark.net/cpu.php?cpu=Intel+Core2+Quad+Q8400+%40+2.66GHz&id=1041

When it comes to Kerbal Space Program, at the moment it's not well designed to use multiple cores, 90% of the work has to be done by one core. So it's that "single thread rating" you need to look at for KSP. Your current processor is about as good as anything you'll get that fits in the same CPU socket in this respect. If you have a good motherboard (and with that chip you probably do) you can try overclocking it, which will probably bring you a 20 to 40 percent speed boost. If you do go for overclocking there are plenty of guides around, but make your first step giving your PC a good clean-out with some canned air so that its cooling is running at top performance.

As regards a new PC, I suggest one with the Pentium G3258 "Anniversary Edition" and a motherboard using the Z97 chipset. That particular Pentium is "unlocked" which helps for overclocking; the Z97 motherboards are also best for that. Even at stock speeds it will be about twice as fast on single-thread speed, which is what matters for KSP, and equal or better with your current processor on multi-threaded speed. Overclock it and it'll play KSP as well as anything and do a fine job on most modern games.

A complete budget gaming system will probably run £500-600, I can't speak for prices in Poland. If you want to keep the cost down you could just get a new motherboard, processor, and memory, and maybe CPU cooler, that'll cost you about £200 or so. You may need to buy a new copy of Windows (because "OEM" copies aren't valid if you upgrade the motherboard), so another £100 for that, or alternatively install Linux.

Link to post
Share on other sites
Honestly, not a lot of software makes use of multi-core. Writing code for multiple processors tends to be a pain, and a lot of people simply don't bother. It helps a lot if you have a background process, however. If you are encoding a video, for example, and want to play a game while computer is busy working, multi-core is your friend.

Most programs don't, but modern operating systems do schedule processes on different cores, so it can still be an advantage if you like being able to run multiple things at once.

Coincidentally, that's the easiest example to explain, IMO: Multiple cores mean the computer can in fact do multiple things at once. With one core, for instance, processes all have to split time on the one core. With four, four programs can all be doing something simultaneously.

Edited by cpast
Link to post
Share on other sites

i own a core 2 quad 9550 and while its a fine cpu. but newer intel offerings blow it out of the water. my i7 3770k runs circles around it, and that is getting old. id get one of the newer haswell chips, or if you can sit on your money for several months, wait for the 14nm die shrink.

as for multiple cores, i consider it a stock feature. i dont think there exists a chip that is all about single core performance. a single i7 core will run circles around a pentium core of similar generation.

Edited by Nuke
Link to post
Share on other sites
I'm not mathematician so i have problem with understanding what you talking about :confused: but generally understand the concept.

Think of multiple cores as being a team. Not every task can be broken up for more than one person to work on together, sometimes you just have to work on it by yourself. But when you can divide up the task among others, its often much faster.

Take the fastest single person at carpentry, electrical, plumbing, etc, all the things that go into making a house, and put them in a race, against an entire crew, to build an identical house. Even though this person may be significantly faster than various members of the other team at specific tasks, the team is going to finish the house long before he can, due to the simple fact that they can all be working on things simultaneously, and he can only work on one task at a time. 8 people, who are only half as fast, doing 8 different things simultaneously, still means 4 times as much work is getting completed than will be finished by that one guy who is much faster than any of them but working alone.

Its still worth having fast cores in lieu of more cores much of the time, because there are not very many programs that can readily take advantage of your 'team', but as has been mentioned, modern operating systems can delegate new tasks to cores which aren't doing anything. Games which are not multithreaded, like KSP will still be limited by how much any single core can do(which is why single core performance still matters even today), but you could also do other things and not slow KSP down because a different core would get that job, leaving that one core to stay focused on KSP.

Link to post
Share on other sites
Most programs don't, but modern operating systems do schedule processes on different cores, so it can still be an advantage if you like being able to run multiple things at once.

That's why I said that if you want to compute something in the background while playing a game, that's going to help you. But a single game is going to run a single process, to allow common access to the memory from all the threads within that process. A lot of games these days run multiple threads. And some game devs do start pushing some of the auxillary threads, like audio processing, into separate process so that they can be taken care of by another core. But that's a lot of extra work.

Link to post
Share on other sites
I'm thinking of buying a new computer, I got the money from the scholarship but my mother discouraged me, saying that it was unnecessary expense since my old computer is doing fine.

I wonder what is the difference between fast single-core processors and slower but multi-core?

Your CPU is still quite ok IMHO. Do your wallet a favor and get it overclocked to 3GHz or more if you specifically lack CPU power (at most you would have to buy an ~160zł radiator and maybe a ~40zł thermal paste). (but really that C2Quad should be enough for most applications even today)

At this point your cpu (considering single thread apps) is only half as good as for example something like this: http://proline.pl/?p=CORE+I5-4670K which still costs a lot of money (at least here in poland :P).

If you really want an upgrade, get up to speed on your graphics card as 630GTthat is not even a dinosaur but something like algae :D it's like 6 times slower than common good value mid range card like this: http://proline.pl/?p=VGAGIGATI0214

Link to post
Share on other sites
Think of multiple cores as being a team. Not every task can be broken up for more than one person to work on together, sometimes you just have to work on it by yourself. But when you can divide up the task among others, its often much faster.

Take the fastest single person at carpentry, electrical, plumbing, etc, all the things that go into making a house, and put them in a race, against an entire crew, to build an identical house. Even though this person may be significantly faster than various members of the other team at specific tasks, the team is going to finish the house long before he can, due to the simple fact that they can all be working on things simultaneously, and he can only work on one task at a time. 8 people, who are only half as fast, doing 8 different things simultaneously, still means 4 times as much work is getting completed than will be finished by that one guy who is much faster than any of them but working alone.

Its still worth having fast cores in lieu of more cores much of the time, because there are not very many programs that can readily take advantage of your 'team', but as has been mentioned, modern operating systems can delegate new tasks to cores which aren't doing anything. Games which are not multithreaded, like KSP will still be limited by how much any single core can do(which is why single core performance still matters even today), but you could also do other things and not slow KSP down because a different core would get that job, leaving that one core to stay focused on KSP.

Thanks Thanks:-)

Link to post
Share on other sites

Single thread performance uber alles!

Single thread performance helps with all workloads. Multiple cores only helps with multiple simultaneous tasks or loads that are highly threadable (this is less common than you would think). It is usually folly to trade clockspeed for cores for consumer PC use. Fewer faster cores will feel more "snappy" than more numerous slower cores and perform as well or better in most consumer tasks.

Link to post
Share on other sites
Single thread performance uber alles!

Single thread performance helps with all workloads. Multiple cores only helps with multiple simultaneous tasks or loads that are highly threadable (this is less common than you would think). It is usually folly to trade clockspeed for cores for consumer PC use. Fewer faster cores will feel more "snappy" than more numerous slower cores and perform as well or better in most consumer tasks.

It does, however its far easier to add some core than to increase the clock frequency. You will also run into other issues anyway like cache misses who force the cpu to wait for data from main memory, that will only hit one core.

As for games overall I guess it will be more an focus on multicore, almost any gaming pc has 4 cores, more important PS4 and One has 8 pretty slow cores, 1.8 GHz or something.

PS3 had one core and 7 small special, 360 had 3, core 2 was most common for pc at that time.

Most other programs who are cpu killers are multicore, video, rendering and that sort of stuff.

In short, clock speeds are going up slowly, far slower than the transistor count in chips, main issue is power usage.

Yes you could make an diamond heat sink and LN2 under pressure to cool it.

Link to post
Share on other sites

I upgraded recently from a processor very similar to yours OP to a hex core i7 overclocked to 4.4GHz and the performance difference is HUUUUUGGGGEEEEEEEE!

I have no idea if that's because of the faster single core, the stupid large cache it has or the upgraded RAM I got at the same time, but seriously, with the last rig I had stutter show launches with anything over a hundred parts or so and all settings on the lowest they could be and now it's smooth as butter with all settings on the fullest they can be and up to 300 parts without any lag at all...it's glorious.

Link to post
Share on other sites
I upgraded recently from a processor very similar to yours OP to a hex core i7 overclocked to 4.4GHz and the performance difference is HUUUUUGGGGEEEEEEEE!

I have no idea if that's because of the faster single core, the stupid large cache it has or the upgraded RAM I got at the same time, but seriously, with the last rig I had stutter show launches with anything over a hundred parts or so and all settings on the lowest they could be and now it's smooth as butter with all settings on the fullest they can be and up to 300 parts without any lag at all...it's glorious.

Yes, my main issue in 0.235 was crash because out of memory, not part slowdown.

Link to post
Share on other sites
It helps a lot if you have a background process, however.

It's probably worth pointing out than in practical terms you always have background processes. The OS will always be doing things behind the scenes and the user is almost always running more than one application at a time. So even when you consider an app that runs everything in a single thread it will run slightly faster if there's a second core available for the OS and housekeeping userland gubbins.

IMO even just splitting out your UI into another process is about the bare minimum devs should be doing for any significant app. Multi-core is the norm, people should write for it.

Link to post
Share on other sites

Well newer processors also often include certain optimizations that make them faster per clock cycle.

Not a big improvement, but if every refresh of processer and new type include a little 1-5 percent improvement, it does add up over the years.

Link to post
Share on other sites
It's probably worth pointing out than in practical terms you always have background processes. The OS will always be doing things behind the scenes and the user is almost always running more than one application at a time. So even when you consider an app that runs everything in a single thread it will run slightly faster if there's a second core available for the OS and housekeeping userland gubbins.

True. But usually, idle background stuff doesn't make that much difference on CPU usage. It tends to be a bigger issue on RAM/page file usage. And that's not going to change with multiple cores.

Link to post
Share on other sites
True. But usually, idle background stuff doesn't make that much difference on CPU usage. It tends to be a bigger issue on RAM/page file usage. And that's not going to change with multiple cores.

One thing I will say is that on the desktop, Windows is a lot more responsive since multi-core became the norm. By this, I mean I still see application freezes all the time, but the cases where the whole OS grinds to a halt for a moment while it has a really good think, have all but vanished.

Link to post
Share on other sites
the cases where the whole OS grinds to a halt for a moment while it has a really good think, have all but vanished.

That's where the advantage is, I reckon. Even if one process goes mad, everything else keeps working.

Link to post
Share on other sites
One thing I will say is that on the desktop, Windows is a lot more responsive since multi-core became the norm. By this, I mean I still see application freezes all the time, but the cases where the whole OS grinds to a halt for a moment while it has a really good think, have all but vanished.

These have nothing to do with multi-cores. There are two things that happened. First, amount of physical memory has skyrocketed. Every process has to have a chunk of memory dedicated to it. But you can easily run more processes that you have memory for. That's because addressing happens in virtual memory, rather than physical. Anything that doesn't fit in the physical memory is written to the disk in the page file. When processes switch, page file might have to be accessed. If there is a lot of data there, that can take a while. This is the biggest reason why sometimes a window appears to freeze when you switch to/from that window.

The other factor is that there have been a lot of improvements in Windows kernel and drivers. Linux machines never really suffered from these problems to begin with. Nor did general code under Windows. You can write "while(1);", and that will not slow down your computer for a second. Why? Because that infinite loop can still receive an interrupt at any moment. So your PC can switch to and from a task caught in an infinite loop just like any other. In general, it doesn't matter if your process is doing something important, idling, or stuck in an infinite loop. You can switch to/from that process all the same. Though, you can save OS a bit of time by using sleep() calls, since it tells OS that it can skip switching to this task for a while. For example, it's often a good idea to have sleep() in your code when window goes out of focus. Unless, of course, it's meant to do some background computations.

The reason programs would freeze, temporarily or permanently, is because it's possible to set a flag on CPU that prevents interrupts. However, only kernel or driver code can actually do that. There are some technical reasons why you don't want to interrupt some of the driver code. And a lot of Windows drivers have been just written as one big no-interrupt block. That means, if there is an infinite loop there, such as an error in a piece of code that's supposed to wait until some buffer is ready, your entire computer freezes. This has been a huge problem with W95/98 code, and has been steadily improving over the past decade as Microsoft has changed a lot of their paradigms on kernel design and driver licensing. In big part, because these sort of problems weren't plaguing *nix platforms.

Edit: I do seem to recall a way to ask Windows not to switch tasks during a certain block of code. It's relevant for some sensitive call-backs, like buffer switching in audio playback. But I'm pretty sure that it's either completely in software, or OS does the interrupt switch for you. Process level code physically shouldn't have access to the no-interrupt flag.

Edited by K^2
Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...