SpeedStep throttling on MacOS X?

Does anyone out there have any idea how to force a specific SpeedStep frequency under MacOS X (specifically on a Core Duo and Core 2 Duo Mac Mini)?  We can do this under Windows XP using SpeedswitchXP, and under Linux using cpufreq, but I can't find anything similar for OS X.  This is important for our performance profiling machines, where SpeedStep introduces huge variance in the results.

We've tried using reggie_se to twiddle the CPU frequency multiplier register.  While this does work to slow down the machine, SpeedStep still goes on.  I've found lots of references to SpeedIt from InCrew software, but their kernel extension seems tied to a specific Darwin version, and they don't have anything for recent releases of 10.4 (and nothing for 10.5).  I've also tried passing "idlehalt=0" to the kernel, but that seemed to have odd results: the CPU frequency seemed to be reported as pegged at the maximum, but perf test results were identical to when idlehalt=0 was not specified and SpeedStep was occuring as normal.  In contrast, running our performance benchmark while a "cat /dev/random > /dev/null" is going on gives us perf numbers that are 50% lower than without the /dev/random business.

Anyone out there have any ideas on how we can do this? Forcing the CPU at its highest frequency would be fine; forcing it at the lowest would be better, but at this point we just need to be able to force it to some constant frequency.

Edit: Thanks Matt and others, CoolBook is exactly what we're looking for!  Works fine on all Core Duo/Core 2 Duo-based macs.


9 Comments to “SpeedStep throttling on MacOS X?”  

  1. 1 Michał Bartoszkiewicz

    CoolBook (http://www.coolbook.se/CoolBook.html) works for me on a MacBook Pro – I’m not sure if it will work on a Mini.

  2. 2 steppres

    I thought you could change SpeedStep setting in Energy Saver under System Preferences…

  3. 3 steppres

    …wait, I just remembered, that was only under PPC Macs… excuse me while I slink away…

  4. 4 kangaroo

    vlad,

    http://homepage.mac.com/holtmann/eidac/software/smcfancontrol2/index.html

    Should do it for all Intel based macs.

    -g

  5. 5 kangaroo

    Err, scratch that. I was on autopilot and thought you meant fans not cpufreq.

  6. 6 Matt Sayler

    It costs monies, and I’m not sure if it works on anything but the MacBook[Pro]:

    http://www.coolbook.se/CoolBook.html

  7. 7 ant

    I’ve never used OS X but I’m assuming it’s got nicelevels like everything else, so you could try having a separate process busy-wait at low priority. I’m not sure it’d work since OS X might be ignoring reniced processes like cpufreq does.

    Another idea, and this one’s a bit crazy, maybe you could trick it into thinking the CPU is overheating which technically should put it into thermal throttling. I doubt that’s doable in software though (and it might simply hard power-off if you get it to work…)

  8. 8 Marco

    Since Mac OS X has a lot in common with FreeBSD you may be able to control the SpeedStep settings with sysctl.
    Try displaying all available tunables with “sysctl hw.acpi.cpu”. Changing a value would require something along the lines of “sysctl hw.acpi.cpu.[parameter]=[value]“, provided sysctl is available on Mac OS X. Good luck!

  9. 9 O

    You should submit this to the darwin mailing list….
    Darwin-dev mailing list (Darwin-dev@lists.apple.com)

Leave a Reply