The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Efficiency of multi core processors??

    Discussion in 'Windows OS and Software' started by kmatzen, Jul 9, 2007.

  1. kmatzen

    kmatzen Notebook Consultant

    Reputations:
    3
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  2. Overclocker

    Overclocker Notebook Evangelist

    Reputations:
    28
    Messages:
    355
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  3. Wingsbr

    Wingsbr NBR Decepticon NBR Reviewer

    Reputations:
    199
    Messages:
    807
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  4. mtylerjr

    mtylerjr Notebook Deity

    Reputations:
    95
    Messages:
    790
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  5. Greg

    Greg Notebook Nobel Laureate

    Reputations:
    7,857
    Messages:
    16,212
    Likes Received:
    58
    Trophy Points:
    466
    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.
     
  6. kmatzen

    kmatzen Notebook Consultant

    Reputations:
    3
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    30
    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!
     
  7. Overclocker

    Overclocker Notebook Evangelist

    Reputations:
    28
    Messages:
    355
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  8. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    No, that is why the analogy is very good. For the person waiting for the tractor to deliver his 20-ton load, it doesn't go any faster no matter how many tractors there are. He only has one load he wants delivered, and one tractor can do it just as fast as twenty. If you need to catch a plane, do you take multiple cabs to the airport in order to get there faster? ;)

    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.)
     
  9. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    What you mean is "forcing the OS to stick to one core, no matter what, even if it'd be more efficient not to do it".
    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)

    There's no real overhead in that.
    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.
     
  10. Wingsbr

    Wingsbr NBR Decepticon NBR Reviewer

    Reputations:
    199
    Messages:
    807
    Likes Received:
    0
    Trophy Points:
    30
    Jalf, I didn't know you could do this, can you elaborate on how the process works? Benefits vs Disadvantages
     
  11. Overclocker

    Overclocker Notebook Evangelist

    Reputations:
    28
    Messages:
    355
    Likes Received:
    0
    Trophy Points:
    30
    I'm referring to assigning a program that renders your computer virtually unusuable - due to its 99% consumption of both cores over an extended period of time - to one core, in order to be able to use your computer while the program works. Yes, the program works more slowly than if it had unrestricted use of your computer, but or me, the choice between having my computer unusable for 10 minutes while a program runs on both cores or being able to use my computer to do almost anything while the program takes 15 minutes to run on one core is a simple one for me.

    And yes, it's quite possible for a computer to lock up on both cores if the program you use is that demanding.
     
  12. Overclocker

    Overclocker Notebook Evangelist

    Reputations:
    28
    Messages:
    355
    Likes Received:
    0
    Trophy Points:
    30
    This can be done temporarily - IE, as a one-time deal as long as the program is currently open - by going to the task manager, right clicking the process, clicking set affinity, and unchecking all but the core(s) you want the program to run on. It automatically resets to both if you close and re-open the program.
     
  13. kmatzen

    kmatzen Notebook Consultant

    Reputations:
    3
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    30
    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?
     
  14. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    Not that I know of, but you generally don't want that anyway. Let the OS figure out what CPU to use... that's what it's made to do. All the other 3D windows and stuff is just fluff ;)
     
  15. Gophn

    Gophn NBR Resident Assistant

    Reputations:
    4,843
    Messages:
    15,707
    Likes Received:
    3
    Trophy Points:
    456
    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.
     
  16. Wingsbr

    Wingsbr NBR Decepticon NBR Reviewer

    Reputations:
    199
    Messages:
    807
    Likes Received:
    0
    Trophy Points:
    30
    How does the os decide which core to use or does it only decide one based on the program code?
     
  17. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    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.
     
  18. Wingsbr

    Wingsbr NBR Decepticon NBR Reviewer

    Reputations:
    199
    Messages:
    807
    Likes Received:
    0
    Trophy Points:
    30
    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.
     
  19. LFC

    LFC Ex-NBR

    Reputations:
    758
    Messages:
    1,240
    Likes Received:
    1
    Trophy Points:
    55
    Quoted for truth

    See my 2 results here, P4 desktop vs dual core laptop. Man I dread going home simply because of the family desktop. Slowness!
     
  20. Wingsbr

    Wingsbr NBR Decepticon NBR Reviewer

    Reputations:
    199
    Messages:
    807
    Likes Received:
    0
    Trophy Points:
    30
    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)?
     
  21. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Yes, fair enough. Forcing a process to run on one specific core is a way to fix badly behaving programs (games that can't handle being run on different cores, or apps that don't play nice, and hog the CPU, although in the latter case, a better approach might be to lower its priority. Would probably make the application run faster, *and* give you a more responsive system)

    www.tomshardware.com made a little utility for doing that a while back. See if you can find that.
    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.

    As far as I know, all it does is fix the timer problem I mentioned above.
    (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 ;))