1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

Linux's "Ondemand" Governor Is No Longer Fit

Linux Kernel

Published on 17 May 2013 01:58 PM EDT
Written by Michael Larabel in Linux Kernel
60 Comments

By default the Linux kernel uses the "ondemand" CPU frequency governor for achieving maximum clock frequency when system load is high and a lower clock frequency when the system is idle. However, it turns out that for at least modern Intel CPUs, this is likely no longer the case. This default kernel choice may lead to poor battery life and performance for modern Linux systems.

Theodore Ts'o, the well known Linux kernel developer and EXT4 file-system maintainer, wrote a Google+ post to Arjan van de Ven, one of the Intel OTC Linux developers. "Some folks internally have been arguing (and with data that appears to support their thesis) that with modern Intel processors, the ondemand CPU governor is actually counterproductive because waking up to decide whether the CPU is idle keeps it from entering the deepest sleep states, and so (somewhat counterintuitively) the performance governor will actually result in the best battery life."

Arjan responded that the findings are correct and that the ondemand cpufreq algorithm dates back to about a decade ago. Arjan also says the Linux kernel's cpufreq is also a problem. In working to address this problem, the recent Linux 3.9 kernel introduced the Intel P-State driver, as previously covered on Phoronix.

About the new Intel P-State option for the Linux kernel, Arjan explained:
First of all, we use the enumeration of the hardware capabilities that Intel processors provide, which means we're not limited by what ACPI can express (ACPI is a bit too limiting on anything modern).
We also, and I realize this might be controversial, combine the control algorithm with the cpu driver in one. The reality is that such control algorithms are CPU specific, the notion of a generic "for all cpus" governors is just outright flawed; hardware behavior is key to the algorithm in the first place....

The algorithm also, and we'll be tuning this for a while still, much more in line with modern hardware behavior.... we are seeing very significant power/performance improvements with the 3.9/3.10rc code over using ondemand, and a much smaller performance gap with the "performance" governor in terms of performance.

the 3.9/3.10-rc1 code right now only supports SNB cpus, but the CPU ID of IVB is about to added as well.
In a later Google+ comment, Arjan says he hopes the Ivy Bridge P-State support will still be added to the Linux 3.10 kernel as it's just changing around one line of code. Needless to say, I will be running a bunch of benchmarks very shortly from Sandy Bridge (and then Ivy Bridge) hardware to see how the new Intel P-State situation changes the power/performance of the latest Intel hardware on Linux. Separately I'll also deliver some new cpufreq governor benchmarks from various processors. Other test requests for Phoronix can be delivered to the forums or my Twitter feed. I will be starting this new Linux power/performance examination this weekend.

On a similar note, going back to earlier this month, Phoronix readers in the forums have been discussing the ondemand governor slowing down the Mesa/Gallium3D drivers with noticeably better performance when turning to the cpufreq performance governor. Stay tuned for some exciting tests!

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Intel Xeon E5-1680 v3 & E5-2687W v3 Compared To The Core i7 5960X On Linux
  2. Intel 120GB 530 Series SSD Linux Performance
  3. Btrfs/EXT4/XFS/F2FS RAID 0/1/5/6/10 Linux Benchmarks On Four SSDs
  4. AMD's Windows Catalyst Driver Remains Largely Faster Than Linux Drivers
Latest Linux Articles
  1. Mesa 10.5-devel Brings Some Intel Haswell HD Graphics Changes Over Mesa 10.3
  2. NVIDIA vs. Nouveau Drivers With Linux 3.18 + Mesa 10.4-devel
  3. Is The Open-Source NVIDIA Driver Fast Enough For Steam On Linux Gaming?
  4. Linux 3.18 File-System Performance Minimally Changed But Possible Regressions
Latest Linux News
  1. ArrayFire Accelerated Compute Library Open-Sourced
  2. Amazon's Fire TV Stick: A Nice, Affordable Media Center Option
  3. Google Puts Chrome NPAPI Support On Final Countdown
  4. There's New In-Fighting Over The Future Of Compiz
  5. GTK+ Inspector Gains More Features Ahead Of GNOME 3.16
  6. Clang 3.6 Will Hopefully Have OpenMP Support
  7. A Go Front-End Could Soon Be Landing In LLVM
  8. Linux 3.18-rc6 Released, A Worrisome Regression Remains
  9. HandBrake 0.10 Brings H.265 & VP8 Encoders
  10. Gngr: A New Web Browser Focused On Privacy
Latest Forum Discussions
  1. Hurrican SDL Port
  2. Roadmap to Catalyst 14.10 ?
  3. how to configure module phoromatic ?
  4. PulseAudio 6.0 Is Coming & Other Linux Audio Plans For The Future
  5. Debian Developer Resigns From The Systemd Maintainership Team
  6. Updated and Optimized Ubuntu Free Graphics Drivers
  7. Cant get working Kaveri APU - A10-7850k
  8. Script for Fan Speed Control