[Ukfreebsd] Disabling hyperthreading on Intel CPUs

Jonathan Schneider jon at axismilton.ltd.uk
Wed Jan 26 12:58:02 GMT 2011

I've done a bit of testing on Intel Hypermarketing I mean Hyperthreading since Apple replaced my Macbook Pro with an i7 one. It has two physical HT cores.

I'm not sure whether it's quite the same as completely disabling the hypercores like you would in the BIOS on a Wintel machine but under OS X there's a tool to control HT and number of cores immediately. The tool clearly controls the OS scheduler.

I've done a few benchmarks flicking switches on the tool, building our code in a VirtualBox, itself configured to have 4 cores also with "make -j <various>".

The build spends most CPU running arm-none-linux-gnueabi-gcc and given the size of the source by the second run it is reasonable that it is cached so we're CPU bound.

For starters I'd say using one or two cores I'd say this machine (2.66GHz i7) is roughly 30% quicker than my E8500 (3GHz Core 2) desktop.

time make
real	0m14.622s
user	0m5.972s
sys	0m4.372s

time make -j 2
real	0m10.078s
user	0m6.788s
sys	0m4.816s

time make -j 4
real	0m8.119s
user	0m7.980s
sys	0m5.840s

time make -j 5
real	0m8.157s
user	0m7.744s
sys	0m6.160s

So you might say the virtual cores are worth 20% of a real one.


More information about the Ukfreebsd mailing list