Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nanoant/DisableTurboBoost.kext

Disables Turbo Boost Technology on Mac OS X for reliable OpenMP/CL benchmarking
https://github.com/nanoant/DisableTurboBoost.kext

Last synced: about 2 months ago
JSON representation

Disables Turbo Boost Technology on Mac OS X for reliable OpenMP/CL benchmarking

Awesome Lists containing this project

README

        

Turbo Boost Disabler for Mac OS X
=================================

This kernel extension `DisableTurboBoost.kext` lets you disable [Intel Turbo Boost Technology](http://www.intel.com/content/www/us/en/architecture-and-technology/turbo-boost/turbo-boost-technology.html) present on latest Intel Core processors running *Mac OS X*.

Abstract
--------

*Turbo Boost* technology provides automatic CPU over-clocking in certain situations where there is no risk of overheating the CPU. Unfortunately it has nasty effect of ruining various OpenCL and [OpenMP benchmark scores](http://openmp.org/forum/viewtopic.php?f=3&t=1289&p=5166&hilit=turbo+boost#p5166).

As observed *Turbo Boost* triggers when process is occupying 100% of single CPU core, while other CPU cores are idle. However when all CPU cores are occupied, *Turbo Boost* doesn't trigger as it would cause CPU overheat. As a result parallel tasks performance running on all CPU cores does not scale relatively to number of cores, i.e. for 4 core i5 CPU *OpenMP* program running on all 4 cores is only ~3x faster than 1 single core version.

Disabling *Turbo Boost* makes CPU run same clock regardless of cores occupation, therefore we get desired close to 4x speedup when running 4 cores OpenMP program vs 1 core.

This program implements modification of `MSR` CPU register responsible for *Turbo Boost* control as described in [Table 34-10. MSRs Supported by Intel Processors Based on Intel Microarchitecture Code Name Sandy Bridge (Contd.) - Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3C](http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html)

Prerequisites
-------------

[Xcode](https://developer.apple.com/technologies/tools/) with *Command Line Tools* is required to compile this module.

*Command Line Tools* are available as extra add-on from *Preferences > Downloads* of *Xcode* 4.3 or newer, installer option on Xcode 4.2 or older or [separate download](https://developer.apple.com/downloads). Separate download does now require *Xcode* to build this project.

Usage
-----

1. `make`
2. `make load` to load and disable *Turbo Boost* (will ask for admin privileges)
3. `make unload` to unload and re-enable *Turbo Boost* (will ask for admin privileges)

OS X Yosemite
------------

In OS X 10.10 (Yosemite), Apple has introduced a new security requirement called
kext signing. (A kext is a kernel extension, or a driver, in Mac OS X).

To use DisableTurboBoost, you need to disable the kext signing security
setting:

nvram boot-args=kext-dev-mode=1

It is important to note that **the kext-signing setting is global**,
if you disable it you should be careful to only install system drivers
from sources that you trust.

Read the following article for more details:
http://www.cindori.org/trim-enabler-and-yosemite/

License
-------

Copyright (c) 2012 Adam Strzelecki

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.