Dynamic Voltage and Frequency Scaling
Adjusting a processor's voltage and clock speed on the fly to match the work, exploiting the fact that power rises with the square of voltage.
Dynamic voltage and frequency scaling (DVFS) adjusts a processor's supply voltage and clock frequency continuously to match demand: fast and power-hungry when there is work, slow and frugal when there isn't. Nearly every modern CPU, GPU, and phone chip does this many times a second.
It works because of how chips consume power. The switching ("dynamic") power of a CMOS circuit is roughly proportional to capacitance times voltage squared times frequency. Higher frequencies need higher voltage to switch reliably, so voltage and frequency move together along a voltage-frequency curve. Near the top of that curve, each small gain in speed costs a large rise in power and heat. The last 10% of clock speed can cost 30% or more of power. Running slightly slower at slightly lower voltage is enormously more efficient, which is why laptops and phones spend most of their time far below peak.
Each operating point is a performance state (P-state). The operating system's frequency governor chooses among them: from scheduler load (the Linux schedutil governor reads utilization directly from the CPU Scheduler), from fixed policies (performance, powersave), or by handing the decision to the hardware, which increasingly makes the choice itself. Race to idle is the counterintuitive strategy of finishing work at high speed and then dropping into deep sleep states, which can use less energy overall than working slowly, because a sleeping chip uses almost nothing.
Undervolting shifts the curve down: the same frequency at less voltage. Every chip ships with a safety margin, since Silicon Binning sets a curve that works for the worst chip in the bin, and many individual chips are stable with less. Done carefully, undervolting cuts heat and power substantially, reduces Thermal Throttling, and slows wear such as Electromigration. Done carelessly, it produces rare errors that look like software bugs. Frequency caps are the blunter variant: limiting peak boost clocks keeps the chip off the steepest, highest-voltage part of the curve.
DVFS can also be a source of instability. A chip that needs more voltage than the firmware supplies at some point on the curve fails only when the load lands on that point, so it can crash under light loads and pass every stress test. That is the Heisenbug pattern produced by hardware.
See also6
Hybrid CPU Architecture
Processors that mix large fast cores with small efficient ones on one chip, first in phones and now in laptops and desktops, which saves power and adds throughput but hands the operating system a hard scheduling problem.
Systems & Tooling5 connections
Motherboard
The main circuit board of a computer, which carries the processor socket, memory slots and expansion slots and ties them together with the chipset, power regulation and firmware that let separately bought parts work as one machine.
Systems & Tooling6 connections
Computer Cooling
Moving the heat that chips produce away from them, through heat sinks, fans, heat pipes, and liquid loops, since nearly every watt a computer draws becomes heat and hot silicon slows down, wears faster, and eventually fails.
Systems & Tooling5 connections
CPU Affinity
Restricting which cores a thread may run on, which matters most on processors whose cores are not all alike.
Systems & Tooling11 connections
Microcode
The updatable firmware inside a processor that controls how it executes instructions, how operating systems load patches into it at every boot, and the hardware bugs it has been used to fix.
Systems & Tooling7 connections
Suspend and Hibernation
The power states that let a computer pause instead of shutting down, keeping memory powered for a fast resume or saving it to disk for a resume with no power at all, and a recurring source of laptop bugs.
Systems & Tooling9 connections
Linked from6
- Computer CoolingSystems & Tooling
Moving the heat that chips produce away from them, through heat sinks, fans, heat pipes, and liquid loops, since nearly every watt a computer draws becomes heat and hot silicon slows down, wears faster, and eventually fails.
- CPU SchedulerSystems & Tooling
The part of the kernel that decides which runnable thread gets each CPU core next, and for how long, trading throughput against latency.
- Graphics DriverSystems & Tooling
The software that translates a program's drawing commands into instructions a particular graphics card can execute, split between a kernel part that manages memory and displays and a large user-space part that compiles shaders and implements graphics interfaces.
- Hybrid CPU ArchitectureSystems & Tooling
Processors that mix large fast cores with small efficient ones on one chip, first in phones and now in laptops and desktops, which saves power and adds throughput but hands the operating system a hard scheduling problem.
- MicrocodeSystems & Tooling
The updatable firmware inside a processor that controls how it executes instructions, how operating systems load patches into it at every boot, and the hardware bugs it has been used to fix.
- MotherboardSystems & Tooling
The main circuit board of a computer, which carries the processor socket, memory slots and expansion slots and ties them together with the chipset, power regulation and firmware that let separately bought parts work as one machine.