Hyerthreading Under OS X?

Discussion in 'macOS' started by unixwrocks, Jul 31, 2014.

  1. unixwrocks macrumors newbie

    Joined:
    Jul 31, 2014
    #1
    So, I purchased a MacBook Air and Mac Mini. Fully switching from the wonderful world Linux, to the adult world of paying for stuff that works without hours of tinkering..

    I instantly fell in LOVE with OS X. After using my Mac Mini, I've noticed (from watching activity monitor) that hyperthreading is not used as much with OS X as Linux.

    I chose the i7 2.3Ghz Mini. Even with CPU use in the 90% range, I rarely see the four virtual cores in use. Every now and then I'll see it chart like 10%, showing OS X is hyper threading something. It seems Linux always distributes load evenly on my i7 2600K.

    Was it a waste to get an i7 w/ OS X???? Or does OS X just dedicate the hyperhtreading for hypertheaded applications (which I have not used yet)??? I know even in Windows HT was used by the O/S as well as its applications.

    Just a question of curiosity.

    P.S. Tried both Mavericks and Yosemite Developer's beta.
     
  2. Menge macrumors 6502a

    Menge

    Joined:
    Dec 22, 2008
    Location:
    Amsterdam
    #2
    Hyperthreaded cores are seen in OS X as extra cores. A 2-core + HT is seen by OS X as a 4-core processor (just like in Windows and Linux).

    The question here is: are the apps you use optimized for multiple cores?
     
  3. unixwrocks thread starter macrumors newbie

    Joined:
    Jul 31, 2014
    #3
    Dude, I know. Did you read my post? There are eight cores, but OS X is only running a single execution thread off each physical core. There are really only four cores. But the i7 allows an o/s to execute two simultaneous threads on each core.

    OS X never does. It only executes a single thread pre core, on my system. Having a picture depicting additional cores does no good. I can make an Activity monitor show 100 additional cores. But if its just a picture, and never used, why pay more money for it?
     
  4. Menge macrumors 6502a

    Menge

    Joined:
    Dec 22, 2008
    Location:
    Amsterdam
    #4
    I wouldn't reply without reading.

    I know there are only 4 cores. I just explained to you that, to OS X, hyper threaded cores are no different (in exposure to apps and in the way that apps use them) than if they were real extra cores because you seemed hung up on the difference.

    On my end, OS X does use the hyper threaded cores and shows them. All apps see the hyper threads as cores and distribute threads amongst them. I don't know why yours wouldn't.

    Regular OS usage will never max out all the cores. Get an app that does, like Blender or Final Cut and run a longer render process on it and you'll see it max out and distribute the processing as needed.
     
  5. unixwrocks thread starter macrumors newbie

    Joined:
    Jul 31, 2014
    #5
    Any application needs to optimized for an i7. Executing two threads in parallel is different than distributing for among physical cores.

    I actually fired up Xcode and made a test application that calculated prime numbers in parallel; two threads off each core (physical). Both Windows and Linux distribute processing evenly amongst all for cores and will make use of the virtual cores where OS X does not. OSX only uses the physical cores and rarely hyper threads.

    Watch Activity monitor with OS X performing tasks. It will favor the physical cores. It never executes multiple threads amongst a single physical core. While Windows or Linux will distribute more tasks amongst all 8. I constantly see nothing happening from top or Activity monitor on the four virtual cores. BUT Linux or Windows you can launch an application and watch it be distributed amongst all 8.

    I was wondering why OS X does this. Maybe something is wrong with my i7??? I'm gonna load Linux to see what happens. LoL It looks to me like OS X is not really optimized for an i7.
     
  6. Menge macrumors 6502a

    Menge

    Joined:
    Dec 22, 2008
    Location:
    Amsterdam
    #6
    It's the OS job to assign threads to cores, not an App's. So the proper way for an application to maximize its CPU usage is to spawn 1 thread per (logical) core and let the OS do its work as it sees best. It might just happen that the kind of computation you're testing doesn't benefit greatly from hyper threading.

    I find it weird because I can easily get Blender to go into the 380% of CPU utilization (I have a dual-core i5 with hyper threading, so 2 physical cores, 4 logical cores) by telling it to render with 4 buckets.
     
  7. unixwrocks thread starter macrumors newbie

    Joined:
    Jul 31, 2014
    #7
    Just an FYI for others that might come across this post: I installed Linux on my Mini. It seems to delegate thread ques for an i7 correctly. I wish Apple would fix this. It would involve a new kernel.

    But when selling an i7 model for money, it should que threads for a quad core hyperthreaded CPU effeciantly.

    I'd reall not even get a quadcore i7. It is not even fully utlized under OS X.

    Sorry, if that insults someone. I just feel it is important to call peopel when they give incorrect infomration. Otherwise you are misleading your fanbase when they come here seeking inormation.
     

Share This Page