Multi-cores cpu's, why not so good for multi-tasking?

sram

[H]ard|Gawd
2FA
Joined
Jul 30, 2007
Messages
1,854
In the good old days, one wanted to build dual cpu system to improve multi-tasking performance. 2cpu.com was a good site to visit then. Now we have great multi-cores cpu's from both Intel and AMD. The thing is that you can only fully utilize these cpu's if you use multi-threaded applications. You can find this very sentence in every review site you visit. Why so?

You can always run more than one instant of a program or run many programs at once. Shouldn't multi-core cpu's help in this case?

If it does, why care so much about multi-threaded applications? You will only need your application to be multi-threaded if you want this specific application to run at the highest speed possible. If you have/use/prefer to use an application that is not multi-threaded, this specific application won't take advantage of your multi-core cpu, but you can still utilize it by running zillions of programs.....right?

Please enlighten me.

Thanks.
 
Absolutely.

In a real-time Operating System, the scheduler sends out tasks to whatever resources are available, this includes each core as a separate processor.

For example, if you are doing a CPU intensive task -such as video encoding- and the software that you are using does not take advantage of multi-processing hardware, you will see a lot of activity on a single core. But while one core is pegged, other cores are free to run other applications (such as another video encoder software) with little difference in user experience.
 
Last edited:
"The thing is that you can only fully utilize these cpu's if you use multi-threaded applications. You can find this very sentence in every review site you visit. Why so?"

That is because they are talking about running a single threaded application in isolation, you will not benefit from multiple cores. So if you had a 2 core 2.2 ghz proc, vs a 1 core 3.2 ghz proc, the 3.2 will perform better on single threaded application (of course if you don't have other processes asking for cpu time which might take up 1/3rd of the processor etc. Modern oses have stuff in the background running while your app is running). But since you do have other process asking for CPU time you benefit greatly by having more cores. Then the 1 core can spend more time on your single threaded app while the other core can be utilized to do other tasks (assigned and divied up by the OS.)

Now if your process was multithreaded it could use the cores to do multiple things simultaneously. There is overhead when communicating between the process so you will see different results depending on how the software was written (scalability).

So even if you have an application that is single threaded, you still can greatly benefit from a multiple core machine depending on what else your computer is doing).

"You can always run more than one instant of a program or run many programs at once. Shouldn't multi-core cpu's help in this case?"

You wouldn't want to run 4 instances of a game that take up fullscreen now would you (unless your dual boxing, but then you have a reason for doing that - you are multithreading your gameplay - good for MMOs, FPS not so much)? What is the benefit? You'd want the game to run as fast as possible and use multiple cores if your machine has them. If you were encoding movies and each encoder was single threaded then you could run them on each core which might help - you might have HD IO as your bottleneck).

It comes down to this - some applications benefit from Multithreading and utilizing multiple cores. Some don't. Multi-threaded application are more difficult to write - depending on the design so that's why a lot of time it's not obvious if something should be multithreaded or not. There is overhead in multithreading applications. If you have 2 cores do work, and then do more work on the previous results - they need to get that information back out etc. Some things scale well because the work is independant - ray tracer you can split the screen into buckets and work on them independantly - works great for multiple cores.
 
"The thing is that you can only fully utilize these cpu's if you use multi-threaded applications. You can find this very sentence in every review site you visit. Why so?"

That is because they are talking about running a single threaded application in isolation, you will not benefit from multiple cores. So if you had a 2 core 2.2 ghz proc, vs a 1 core 3.2 ghz proc, the 3.2 will perform better on single threaded application (of course if you don't have other processes asking for cpu time which might take up 1/3rd of the processor etc. Modern oses have stuff in the background running while your app is running). But since you do have other process asking for CPU time you benefit greatly by having more cores. Then the 1 core can spend more time on your single threaded app while the other core can be utilized to do other tasks (assigned and divied up by the OS.)

I know all this, but they make it seem as if multi-cores cpus are only good for multi-threaded applications.

Thanks for your nice reply.
 
I know all this, but they make it seem as if multi-cores cpus are only good for multi-threaded applications. ...

hm... i never came to that conclusion from reading the reviews. it sounds like a disclaimer line used to simply explain how they are benchmarking a system. /shrug i know many people who still use computers as if it were '95, running only a few apps at a time. personally, i run a shitload of crap all at once (my taskbar is vertical). :D
 
It seems like just yesterday that the Q6600 came out and people were debating about whether or not to stick with their dual core CPU or go to a quad. Quads will only benefit you if you do encoding or are a heavy multitasker, they said. People still recommended higher-clocked dual cores when gaming was the primary intended usage. Now we have quads that regularly reach 3.8-4.2 GHz and more games and apps are written to take advantage of 4+ cores. Not many people continue to recommend dual cores these days, and it doesn't seem like much time has passed from the days when an overclocked E6600 or E8400/E8500 was the hot thing to have.

I vividly remember when the Prescott P4s were released and the mindset was higher clocks = more performance. Then Conroe blew us away and offered better performance out of slower-clocked dual cores. i7 added even more performance & cores, and we now have 6 core CPUs. I think it's interesting to try to envision the next major direction CPUs are headed in. The performance benefits of multiple cores are so evident and tangible, it makes me wonder what took us so long. Imagine how cool a dual core Pentium II might have been...and where would we be today if that had happened?
 
hm... i never came to that conclusion from reading the reviews. it sounds like a disclaimer line used to simply explain how they are benchmarking a system. /shrug i know many people who still use computers as if it were '95, running only a few apps at a time. personally, i run a shitload of crap all at once (my taskbar is vertical). :D


Disclaimer huh, that explains it.
 
My understanding is this:

Going from 1 to two cores = impressive gain in multitasking performance

going from 2 -3 or 4 cores you will see still more of an improvement in multitasking, but it will not be as huge as as the initial leap from 1 to 2 cores.

I guess most people simply don't run more than two CPU intensive applications at a time, so the law of diminishing returns kicks in relatively quickly for single threaded applications on multi-core CPU's.
 
Zarathustra[H];1035611419 said:
My understanding is this:

Going from 1 to two cores = impressive gain in multitasking performance

going from 2 -3 or 4 cores you will see still more of an improvement in multitasking, but it will not be as huge as as the initial leap from 1 to 2 cores.

I guess most people simply don't run more than two CPU intensive applications at a time, so the law of diminishing returns kicks in relatively quickly for single threaded applications on multi-core CPU's.

If you want the BEST multi-tasking experience, in-addition to buying multiple cores, you also want to buy the most cache you can. Explanation: cache works because data used in a single process has temporal and spatial locality. When you add multiple threads to the same cache pool, there is rarely similar data used by multiple threads, so each task overwrites data from other tasks. This means that, every time you switch tasks, there will be a series of cache misses (have to access data from main memory, which is very slow), so the switch will not be as smooth as it could be.

A larger shared cache means that each address refers to fewer locations in memory, and thus independent tasks have more room to stretch their legs in the cache without stepping on another task's toes. Intel's current ratio for Core i3/i5/i7 is 2MB shared per-core, and AMD's setup is 1.5MB shared per-core, and both seem to be a good compromise of price/performance. Anything less will make a heavy multi-tasking experience feel sluggish.
 
... Imagine how cool a dual core Pentium II might have been...and where would we be today if that had happened?

I had a dual P3 733Mhz w/ 512MB back in the day, and it could't compete with even a P4 2.8Ghz w/ HT (no shared cache with dual cpu, hehe).
 
Back
Top