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. 13-Way Low-End GPU Comparison With AMD's AM1 Athlon
  2. ASUS AM1I-A: A Mini-ITX Board For Socketed Kabini APUs
  3. Mini-Box M350: A Simple, Affordable Mini-ITX Case
  4. Overclocking The AMD AM1 Athlon & Sempron APUs
Latest Linux Articles
  1. Ubuntu 12.04.4 vs. 13.10 vs. 14.04 LTS Desktop Benchmarks
  2. AMD OpenCL Performance With AM1 Kabini APUs
  3. A Quick Look At GCC 4.9 vs. LLVM Clang 3.5
  4. Are AMD Athlon/Sempron APUs Fast Enough For Steam On Linux?
Latest Linux News
  1. Borderlands Is Being Considered For Linux
  2. Mesa 10.0 & 10.1 Stable Get Updated
  3. Getting Hit By The Variable Performance Of The Public Cloud
  4. Git 2.0 Test Releases Begin With Many Changes
  5. Wine 1.7.17 Works On Its Task Scheduler, C Run-Time
  6. The Improv ARM Board Still Isn't Shipping; Riding A Dead Horse?
  7. Debian To Maintain 6.0 Squeeze As An LTS Release
  8. Wasteland 2 Is Finally Released For Linux Gamers
  9. FreeBSD Advances For ARM, Bhyve, Clang
  10. Ubuntu 14.04 LTS "Trusty Tahr" Officially Released
  11. Ubuntu 12.04 LTS vs. 14.04 LTS Server Benchmarks
  12. QEMU 2.0 Released With ARM, x86 Enhancements
Latest Forum Discussions
  1. Suggestions about how to make a Radeon HD 7790 work decently?
  2. The GNOME Foundation Is Running Short On Money
  3. Updated and Optimized Ubuntu Free Graphics Drivers
  4. Radeon 8000M problematic on Linux?
  5. Linux Kernel Developers Fed Up With Ridiculous Bugs In Systemd
  6. After Jack Keane, RuseSoft will briing Ankh 3 to Linux through Desura
  7. Suspected PHP Proxy Issue
  8. Change installation destination from home directory