I'm just curious, when a Windows machine uses, for example, a core 2 duo at 2.2, does it run near 4.4 or is it much less do to shared overhead? Does Windows do a decent job managing the processor loads, or is there a lot of work to be done with manually setting cpu affinities.
I was curious whether or not I should expect good results if I set a virtual machine to run on one core and everything in the native environment to run on the other. I don't think I would want anything less than the equivalent of a P4 2.0ghz running the virtual machine application.
-
The clock speed does not double. Analogy time:
1 processor at 2ghz = 1 tractor capable of pulling 2 tons of cargo at 20mph.
Dual core at 2ghz = 2 tractors in tandem capable of pulling 4 tons of cargo at 20mph.
The actual speed at which the cargo is pulled does not increase, but MORE cargo can be pulled simultaneously. -
It also depends on the application being used in the multicore environment, most legacy apps were designed with one core in mind so sometimes you don't even get the benefit of the 2, but as technology progresses you will see more apps written with 2+ cores in mind.
-
That description isnt completely accurate. If you had 40 tons of cargo:
1 tractor could pull it to its destination at 20mph in two trips of 20 tons each. Each trip would take, say 20 minutes, so 40 minutes total.
2 tractors could pull it, each pulling 20 tons, to its destination at 20 mph in one trip -both at the same time - so 20 minutes total. Half the time.
Therefore, the two tractors could pull the same 40 tons, the same distance, at the same "speed" - but since they would complete the task in half the time, it would be "twice as fast" in the sense that people talk about processors.
So that analogy is a bit misleading. The "speed" you are referring to just refers to the individual processor, the "overall" speed -is- doubled, in the sense of work accomplished. (if the software is written to take advantage of parallel processing)
But as to the original question, I dont know how much overhead there is in using the multiple cores. Probably not much. -
Almost no software gets additional gains from having multiple cores...software just is not engineered that way yet. What dual core is really for is multitasking...running two (or more) applications simultaneously that could bring a single core machine to its knees. Fortunately, the dual core machines individual cores can run just as fast (and faster) than the older single core CPUs...so there will now always be some advantage to having a dual core.
-
Okay, thanks for the help. I haven't really written any multithreaded applications recently. Not since I had a desktop with two P4's in it. Never really had anything useful to do with them. I've seen some cool algorithms out there for translating serial computing processes into parallel ones so maybe I'll try some out soon.
However, I was mainly going for the idea that I would have some applications running on one core and some on the other so effectively I would have less applications sharing one core. So it sounds like this will work for me. I just didn't know if each core really runs less than 2.2ghz due to some sort of overhead for the processor as a whole, but it sounds like not.
Thanks! -
Nope, both will be able to run at the full speed. One fun thing is the ability to use the task manager to assign a processor-heavy task to one core instead of to both, allowing your computer to keep from locking up while the program is running.
Also remember that RAM is essential for multitasking. I run a dual core with 2gb, and I'm pretty sure the RAM offers as much of an advantage as the processors do. -
A dual-core CPU can pull two loads simultaneously, but just like with the tractor analogy, it only works if you actually have two independent loads. If you have one single big load, only one core at a time can work on it, and then you won't benefit from the higher performance. That's what happens with single-threaded applications, and there's nothing the CPU or the OS can do to "fix" this. if the application runs in a single thread, it can only be served by one core at a time. If it runs multithreaded, both cores can work on it in parallel (like the two tractors), and then you can in theory get double performance (although there are other bottlenecks that will probably hold them back. To extend the analogy, the two tractors would probably get in each others' way occasionally, forcing one or the other to slow down, or the people loading them might be busy on one tractor, forcing the other to wait. All in all, most multithreaded apps won't see more than 40% performance increase by going with dual-core.) -
Your computer won't lock up either way, but preventing the OS from scheduling threads freely only leads to lower performance. (The exception is some games that abuse the CPU's timer, causing errors if they don't always run on the same core)
The potential overhead there might be is when the two cores need to share data, but that's only an issue if a single application uses multiple threads that need to communicate a lot. -
-
And yes, it's quite possible for a computer to lock up on both cores if the program you use is that demanding. -
-
Is there a way to default an individual executable to only use a specific core so that it doesn't need to be switched manually each time in the task manager?
-
-
I use many useful multi-core programs/games:
- WinRAR 3.62 (new multi-core support for compression)
- Adobe Acrobat 8 [Reader as well]
- most of the new/current games have multi-core support
just make sure to have the Multi-Core hotfix installed if you are running XP 32-bit... its does not come with Windows Update... so you usually have to do it manually.
Vista is fully multi-core configured. -
-
The OS decides based on what memory is being accessed, what memory is cached where, what resources the program is requesting, etc. Lots of little decisions. It's very, very, VERY rare for the system to not know better where a program will run. You will almost always lose performance if you assign a program to a single core.
-
That makes sense. I guess I'm confused by some people saying that programs that are/were written with single core in mind don't perform the same as written or recompiled for dual core.
-
See my 2 results here, P4 desktop vs dual core laptop. Man I dread going home simply because of the family desktop. Slowness! -
Good information LFC. It's my understanding that the dual core optimizer from AMD only works for games, is that true? Also I have RM Clock and there is a setting that allows the core to be checked against each other, or something like that, that says it replaces the amd dual core opt and don't use both. Any thoughts on which one is better, hotfix, amd dual core opt or rmclock core synchronizer (not sure if thats the exact name)?
-
But as said above, generally speaking, you don't want to do this. It should only be done with applications that otherwise cause problems.
As Pitabred said, the OS uses a lot of data to figure out where to run the thread, and you have no chance of making a more informed choice.
(Essentially that the timers on the two cores may not be exactly in sync, so if a thread checks the time now and in 5 milliseconds, and the second check just so happens to be run on the other core, it might get a difference of 10 milliseconds, or worse, -5 ms. Time flowing backwards can cause a lot of problems if you don't expect it)
Efficiency of multi core processors??
Discussion in 'Windows OS and Software' started by kmatzen, Jul 9, 2007.