More apple madness

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

More apple madness

Post by bob »

I have pointed out several flaws with mac os x since I started using a macbook. I won't rehash those. But I just encountered another incredibly stupid apple idea.

hyperthreading.

Mac os x Mavericks has no clue about hyper threading. If I run Crafty with two threads, where os x thinks my i7 has 4 cores (it has two + hyper threading), I see processors 0-3 busy in these groupings: 0-1, 0-2, 0-3, 1-2, 1-3 and 2-3. After a bit of study with CPUID, processors 0 and 1 are on one physical core, and 2 and 3 are on the other core, at least for this particular box. Looking at the above processor usages, 0-2, 0-3, 1-2 and 1-3 are rational, as any one of those 4 choices has one thread per physical core. 0-1 and 2-3 are bad. Yet OSX cheerfully allows ANY of those to happen, while my linux boxes do it correctly.

I started by trying to find out how to disable hyper-threading. Nothing seemed to work, until I ran across the "nvram" command where one can set the boot option "cpus=2". I figured "this is it." I set it, booted, and I get processors 0 and 1. Sounds good until you use CPUID and discover that BOTH are on one physical core. With cpus=2, the system boots up with one physical core, two logical cores. Talk about a genius designing this stuff...

In looking around, I discovered a term "hackintosh" which is a non-apple machine running OS X. I couldn't help but wonder "WHY?" May as revert all the way to the dark ages and run windows...
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: More apple madness

Post by lucasart »

bob wrote: looking around, I discovered a term "hackintosh" which is a non-apple machine running OS X. I couldn't help but wonder "WHY?" May as revert all the way to the dark ages and run windows...
A good question. Why indeed?
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: More apple madness

Post by ZirconiumX »

lucasart wrote:
bob wrote: looking around, I discovered a term "hackintosh" which is a non-apple machine running OS X. I couldn't help but wonder "WHY?" May as revert all the way to the dark ages and run windows...
A good question. Why indeed?
It's cheaper than a Mac Pro.
It uses Mac OS X.
It doesn't look like a dustbin.

Those are the only reasons as far as I can tell.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
xmas79
Posts: 286
Joined: Mon Jun 03, 2013 7:05 pm
Location: Italy

Re: More apple madness

Post by xmas79 »

ZirconiumX wrote:
lucasart wrote:
bob wrote: looking around, I discovered a term "hackintosh" which is a non-apple machine running OS X. I couldn't help but wonder "WHY?" May as revert all the way to the dark ages and run windows...
A good question. Why indeed?
It's cheaper than a Mac Pro.
It uses Mac OS X.
It doesn't look like a dustbin.
And violate Apple license agreement, as you cannot run OSX on non-Apple hardware.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: More apple madness

Post by bob »

xmas79 wrote:
ZirconiumX wrote:
lucasart wrote:
bob wrote: looking around, I discovered a term "hackintosh" which is a non-apple machine running OS X. I couldn't help but wonder "WHY?" May as revert all the way to the dark ages and run windows...
A good question. Why indeed?
It's cheaper than a Mac Pro.
It uses Mac OS X.
It doesn't look like a dustbin.
And violate Apple license agreement, as you cannot run OSX on non-Apple hardware.
Nope, there are open-source versions of Darwin where this is completely legal. You can find instructions on the internet...
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: More apple madness

Post by JoshPettus »

You also basically have to build your own, with the right supported hardware, and apple probably one day will stop supporting something in which case you would have to go out and replace it. Maybe it's a good idea for some. Personally, I have sound design software that's OSX only. It's cheaper (probably save a $1000), but lordly. I just bought a new one used on ebay.
xmas79
Posts: 286
Joined: Mon Jun 03, 2013 7:05 pm
Location: Italy

Re: More apple madness

Post by xmas79 »

Darwin is not OSX. Darwin is the kernel only.
rjgibert
Posts: 317
Joined: Mon Jun 26, 2006 9:44 am

Re: More apple madness

Post by rjgibert »

FWIW, I found this in a thread that discussed 10.7 and hyperthreading:
. . . you can permanently disable hyperthreading by issuing the following command in the Terminal:

sudo nvram SMT=0

To re-enable hyperthreading, use the command:

sudo nvram -d SMT

Changes take place on a reboot . . .
I know nothing of apple, so hopefully this suggestion does not waste your time.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: More apple madness

Post by bob »

rjgibert wrote:FWIW, I found this in a thread that discussed 10.7 and hyperthreading:
. . . you can permanently disable hyperthreading by issuing the following command in the Terminal:

sudo nvram SMT=0

To re-enable hyperthreading, use the command:

sudo nvram -d SMT

Changes take place on a reboot . . .
I know nothing of apple, so hopefully this suggestion does not waste your time.
Does not work for 10.9 (mavericks). Well-documented. Why? One would have to ask the apple developers. But they seem to be SO disconnected from the actual users of these machines that they don't care what users actually want. This has been a complaint for several years now.
Max
Posts: 247
Joined: Tue Apr 13, 2010 10:41 am

Re: More apple madness

Post by Max »

As you have Xcode installed on your Mac, you could use the Instruments.app.

Google found this description:
https://www.logicprohelp.com/forum/view ... =5&t=88835

turning off hyperthreading from os x (lion and mountain lion

Postby jamiethemorris » Sun Oct 28, 2012 6:28 am

If you're processor supports hyperthreading, it can be helpful for audio work, but if you're getting the notorious single core overload, you are actually overloading half of a core. It is possible to toggle this function on and off in os x depending on which works better for the particular project you're working on. This requires xcode to be installed.

1. Open the instruments app, which is located in /Applications/Xcode/Contents/Applications. To get there you can right click on the xcode app and choose "show package contents." You can create an alias of this for your applications folder or drag it to the dock if you like.
2. You should get a pop-up window, just click cancel. Go to preferences, and you should see a checkbox at the bottom to disable hyperthreading.
3. Restart logic, and you can now use the full frequency of each core. You can use the instruments app to toggle hyperthreading on and off as needed.

I hope this helps anyone having overloads with a fast processor. find I find it to be more reliable than logic's built in function, and much more convenient than disabling it in the bios. This helped me tremendously, i was getting overloads even on a 4.5 ghz quad core.
-Max