close
Jump to content

Voltage and frequency scaling

From Wikipedia, the free encyclopedia
(Redirected from Dynamic voltage scaling)

Dynamic frequency scaling and dynamic voltage scaling are techniques used primarily for power management in computer architecture. Dynamic frequency scaling almost always appears in conjunction with dynamic voltage scaling, since higher frequencies require higher supply voltages for the digital circuit to yield correct results. The combined topic is known as dynamic voltage and frequency scaling (DVFS).

Dynamic frequency scaling

[edit]

Dynamic frequency scaling (also known as CPU throttling) is a power management technique in computer architecture whereby the frequency of a microprocessor can be automatically adjusted "on the fly" depending on the actual needs, to conserve power and reduce the amount of heat generated by the chip. Dynamic frequency scaling helps preserve battery on mobile devices and decrease cooling cost and noise on quiet computing settings, or can be useful as a security measure for overheated systems (e.g. after poor overclocking).

Operation

[edit]

The dynamic power (switching power) dissipated by a chip is C·V2·A·f, where C is the capacitance being switched per clock cycle, V is voltage, A is the activity factor[1] indicating the average number of switching events per clock cycle by the transistors in the chip (as a unitless quantity) and f is the clock frequency.[2]

Voltage is therefore the main determinant of power usage and heating.[3] The voltage required for stable operation is determined by the frequency at which the circuit is clocked, and can be reduced if the frequency is also reduced.[4] Dynamic power alone does not account for the total power of the chip, however, as there is also static power, which is primarily because of various leakage currents. Due to static power consumption and asymptotic execution time it has been shown that the energy consumption of software shows convex energy behavior, i.e., there exists an optimal CPU frequency at which energy consumption is minimized.[5] Leakage current has become more and more important as transistor sizes have become smaller and threshold voltage levels are reduced. A decade ago, dynamic power accounted for approximately two-thirds of the total chip power. The power loss due to leakage currents in contemporary CPUs and SoCs tend to dominate the total power consumption. In the attempt to control the leakage power, high-k metal-gates and power gating have been common methods.

Dynamic voltage scaling is another related power conservation technique that is often used in conjunction with frequency scaling, as the frequency that a chip may run at is related to the operating voltage.

The efficiency of some electrical components, such as voltage regulators, decreases with increasing temperature, so the power usage may increase with temperature. Since increasing power use may increase the temperature, increases in voltage or frequency may increase system power demands even further than the CMOS formula indicates, and vice versa.[6][7]

Standard interface

[edit]

ACPI 1.0 (1996) defines a way for a CPU to go to idle "C states", but defines no frequency-scaling system.

ACPI 2.0 (2000) introduces a system of P states (power-performance states) that a processor can use to communicate its possible frequencypower settings to the OS. The operating system then sets the speed as needed by switching between these states. Throttling technology such as SpeedStep, PowerNow!/Cool'n'Quiet, and PowerSaver all work through P states. There is a limit of 16 states maximum.[8]

ACPI 5.0 (2011) introduces collaborative processor performance control (CPPC), exposing hundreds of performance levels to the OS for selection in the form of a "performance level" abstracted away from the frequency. This abstraction provides leeway for the processor to adjust its workings (C-states) in ways other than just the frequency (P-states).[9][10][11]

Autonomous frequency scaling

[edit]

A number of modern CPUs can perform frequency scaling autonomously, using a performance level range and a "efficiency/performance preference" hint from the OS.

  • Intel CPUs starting with Skylake support hardware-managed P-states aka Speed Shift, It based on CPPC protocol, and it using model-specific register as the control channel.[12][13]
  • AMD CPUs starting with Zen 2 supports a similar feature. It depends on CPPC being enabled. The preferred communication channel is a MSR (different from the Intel one) introduced in Zen 3; Zen 2 units use the ACPI AML method.[14]

Performance impact

[edit]

Dynamic frequency scaling reduces the number of instructions a processor can issue in a given amount of time, thus reducing performance. Hence, it is generally used when the workload is not CPU-bound.

Dynamic frequency scaling by itself is rarely worthwhile as a way to conserve switching power. Saving the highest possible amount of power requires dynamic voltage scaling too, because of the V2 component and the fact that modern CPUs are strongly optimized for low power idle states. In most constant-voltage cases, it is more efficient to run briefly at peak speed and stay in a deep idle state for longer time (called "race to idle" or computational sprinting), than it is to run at a reduced clock rate for a long time and only stay briefly in a light idle state. However, reducing voltage along with clock rate can change those trade-offs.

A related-but-opposite technique is overclocking, whereby processor performance is increased by ramping the processor's (dynamic) frequency beyond the manufacturer's design specifications.

One major difference between the two is that in modern PC systems overclocking is mostly done over the Front Side Bus (mainly because the multiplier is normally locked), but dynamic frequency scaling is done with the multiplier. Moreover, overclocking is often static, while dynamic frequency scaling is always dynamic. Software can often incorporate overclocked frequencies into the frequency scaling algorithm, if the chip degradation risks are allowable.

Support across vendors

[edit]

Intel

[edit]

Intel's CPU throttling technology, SpeedStep, is used in its mobile and desktop CPU lines.

AMD

[edit]

AMD employs two different CPU throttling technologies. AMD's Cool'n'Quiet technology is used on its desktop and server processor lines. The aim of Cool'n'Quiet is not to save battery life, as it is not used in AMD's mobile processor line, but instead with the purpose of producing less heat, which in turn allows the system fan to spin down to slower speeds, resulting in cooler and quieter operation, hence the name of the technology. AMD's PowerNow! CPU throttling technology is used in its mobile processor line, though some supporting CPUs like the AMD K6-2+ can be found in desktops as well.

AMD PowerTune and AMD ZeroCore Power are dynamic frequency scaling technologies for GPUs.

VIA Technologies

[edit]

VIA Technologies and Zhaoxin processors use a technology named LongHaul (PowerSaver), while Transmeta's version was called LongRun.

The 36-processor AsAP 1 chip is among the first multi-core processor chips to support completely unconstrained clock operation (requiring only that frequencies are below the maximum allowed) including arbitrary changes in frequency, starts, and stops. The 167-processor AsAP 2 chip is the first multi-core processor chip which enables individual processors to make fully unconstrained changes to their own clock frequencies.

According to the ACPI Specs, the C0 working state of a modern-day CPU can be divided into the so-called "P"-states (performance states) which allow clock rate reduction and "T"-states (throttling states) which will further throttle down a CPU (but not the actual clock rate) by inserting STPCLK (stop clock) signals and thus omitting duty cycles.

ARM

[edit]

Different ARM-based systems on chip provide CPU and GPU throttling.

Dynamic voltage scaling

[edit]

Dynamic voltage scaling is a power management technique in which the voltage used in a component is increased or decreased, depending upon circumstances. Dynamic voltage scaling to increase voltage is known as overvolting; dynamic voltage scaling to decrease voltage is known as undervolting. Undervolting is done in order to conserve power, particularly in laptops and other mobile devices, where energy comes from a battery and thus is limited, or in rare cases, to increase reliability. Overvolting is done in order to support higher frequencies for performance.

The term "overvolting" is also used to refer to increasing static operating voltage of computer components to allow operation at higher speed (overclocking).

Background

[edit]

MOSFET-based digital circuits operate using voltages at circuit nodes to represent logical state. The voltage at these nodes switches between a high voltage and a low voltage during normal operationwhen the inputs to a logic gate transition, the transistors making up that gate may toggle the gate's output.

Toggling a MOSFET's state requires changing its gate voltage from below the transistor's threshold voltage to above it (or from above it to below it). However, changing the gate's voltage requires charging or discharging the capacitance at its node. This capacitance is the sum of capacitances from various sources: primarily transistor gate capacitance, diffusion capacitance, and wires (coupling capacitance).

Higher supply voltages result in faster slew rate (rate of change of voltage per unit of time) when charging and discharging, which allows for quicker transitioning through the MOSFET's threshold voltage. Additionally, the more the gate voltage exceeds the threshold voltage, the lower the resistance of the transistor's conducting channel. This results in a lower RC time constant for quicker charging and discharging of the capacitance of the subsequent logic stage. Quicker transitioning afforded by higher supply voltages allows for operating at higher frequencies.

Methods

[edit]

Many modern components allow voltage regulation to be controlled through software (for example, through the BIOS). It is usually possible to control the voltages supplied to the CPU, RAM, PCI, and PCI Express (or AGP) port through a PC's BIOS.

However, some components do not allow software control of supply voltages, and hardware modification is required by overclockers seeking to overvolt the component for extreme overclocks. Video cards and motherboard northbridges are components which frequently require hardware modifications to change supply voltages. These modifications are known as "voltage mods" or "Vmod" in the overclocking community.

Undervolting

[edit]

Undervolting is reducing the voltage of a component, usually the processor, reducing temperature and cooling requirements, and possibly allowing a fan to be omitted. Just like overclocking, undervolting is highly subject to the so-called silicon lottery: one CPU can undervolt slightly better than the other and vice versa.

Power

[edit]

The switching power dissipated by a chip using static CMOS gates is , where is the capacitance being switched per clock cycle, is the supply voltage, is the switching frequency,[15] and is the activity factor. Since is squared, this part of the power consumption decreases quadratically with voltage. The formula is not exact however, as many modern chips are not implemented using 100% CMOS, but also use special memory circuits, dynamic logic such as domino logic, etc. Moreover, there is also a static leakage current, which has become more and more accentuated as feature sizes have become smaller (below 90 nanometres) and threshold levels lower.

Accordingly, dynamic voltage scaling is widely used as part of strategies to manage switching power consumption in battery powered devices such as cell phones and laptop computers. Low voltage modes are used in conjunction with lowered clock frequencies to minimize power consumption associated with components such as CPUs and DSPs; only when significant computational power is needed will the voltage and frequency be raised.

Some peripherals also support low voltage operational modes. For example, low power MMC and SD cards can run at 1.8 V as well as at 3.3 V, and driver stacks may conserve power by switching to the lower voltage after detecting a card which supports it.

When leakage current is a significant factor in terms of power consumption, chips are often designed so that portions of them can be powered completely off. This is not usually viewed as being dynamic voltage scaling, because it is not transparent to software. When sections of chips can be turned off, as for example on TI OMAP3 processors, drivers and other support software need to support that.

Program execution speed

[edit]

The speed at which a digital circuit can switch states - that is, to go from "low" (VSS) to "high" (VDD) or vice versa - is proportional to the voltage differential in that circuit. Reducing the voltage means that circuits switch slower, reducing the maximum frequency at which that circuit can run. This, in turn, reduces the rate at which program instructions that can be issued, which may increase run time for program segments which are sufficiently CPU-bound.

This again highlights why dynamic voltage scaling is generally done in conjunction with dynamic frequency scaling, at least for CPUs. There are complex tradeoffs to consider, which depend on the particular system, the load presented to it, and power management goals. When quick responses are needed (e.g. Mobile Sensors and Context-Aware Computing), clocks and voltages might be raised together. Otherwise, they may both be kept low to maximize battery life.

Implementations

[edit]

The 167-processor AsAP 2 chip enables individual processors to make extremely fast (on the order of 1-2ns) and locally controlled changes to their own supply voltages. Processors connect their local power grid to either a higher (VddHi) or lower (VddLow) supply voltage, or can be cut off entirely from either grid to dramatically cut leakage power.

Another approach uses per-core on-chip switching regulators for dynamic voltage and frequency scaling (DVFS).[16]

Operating system API

[edit]

Unix system provides a userspace governor, allowing to modify the CPU frequencies[citation needed] (though limited to hardware capabilities).

System stability

[edit]

Dynamic frequency scaling is another power conservation technique that works on the same principles as dynamic voltage scaling. Both dynamic voltage scaling and dynamic frequency scaling can be used to prevent computer system overheating, which can result in program or operating system crashes, and possibly hardware damage. Reducing the voltage supplied to the CPU below the manufacturer's recommended minimum setting can result in system instability.

Temperature

[edit]

The efficiency of some electrical components, such as voltage regulators, decreases with increasing temperature, so the power used may increase with temperature causing thermal runaway. Increases in voltage or frequency may increase system power demands even faster than the CMOS formula indicates, and vice versa.[17][7]

Caveats

[edit]

The primary caveat of overvolting is increased heat: the power dissipated by a circuit increases with the square of the voltage applied, so even small voltage increases significantly affect power. At higher temperatures, transistor performance is adversely affected, and at some threshold, the performance reduction due to the heat exceeds the potential gains from the higher voltages. Overheating and damage to circuits can occur very quickly when using high voltages.

There are also longer-term concerns: various adverse device-level effects such as hot carrier injection and electromigration occur more rapidly at higher voltages, decreasing the lifespan of overvolted components.

In order to mitigate the increased heat from overvolting, it's recommended to use liquid cooling to achieve higher ceilings and thresholds than you normally would with an aftermarket cooler. Also known as 'all-in-one' (AIO) coolers, they offer a far more effective method of unit cooling by relocating heat outside a computer case via the fans on the radiator whereas air cooling only disperses heat from the affected unit, increasing overall ambient temperatures.[18]

See also

[edit]

References

[edit]
  1. K. Moiseev, A. Kolodny and S. Wimer (September 2008). "Timing-aware power-optimal ordering of signals". ACM Transactions on Design Automation of Electronic Systems. 13 (4): 1–17. doi:10.1145/1391962.1391973. S2CID 18895687.
  2. Rabaey, J. M. (1996). Digital Integrated Circuits. Prentice Hall.
  3. Victoria Zhislina (2014-02-19). "Why has CPU frequency ceased to grow?". Intel.
  4. Le Sueur, Etienne; Heiser, Gernot. "Dynamic Voltage and Frequency Scaling: The Laws of Diminishing Returns" (PDF). usenix.org. Retrieved 28 Oct 2025.
  5. Karel De Vogeleer; Memmi, Gerard; Jouvelot, Pierre; Coelho, Fabien (2014). "The Energy/Frequency Convexity Rule: Modeling and Experimental Validation on Mobile Devices". arXiv:1401.4655 [cs.OH].
  6. Mike Chin. "Asus EN9600GT Silent Edition Graphics Card". Silent PC Review. p. 5. Retrieved 21 April 2008.
  7. 1 2 Mike Chin (19 March 2008). "80 Plus expands podium for Bronze, Silver & Gold". Silent PC Review. Retrieved 21 April 2008.
  8. "Advanced Configuration and Power Interface Specification, Revision 3.0, Section 2.6 Device and Processor Performance State Definitions" (PDF). ACPI.info. 2004-09-02. p. 23. Archived from the original (PDF) on November 28, 2015.
  9. "Collaborative Processor Performance Control (CPPC) — The Linux Kernel documentation". www.kernel.org.
  10. "8.4. Declaring Processors". ACPI Specification 6.4 documentation.
  11. "Overview about power and performance tuning for the Windows Server". learn.microsoft.com. 29 August 2022.
  12. x86_energy_perf_policy(8)  Linux Programmer's Manual – Administration and Privileged Commands from Manned.org
  13. "intel_pstate CPU Performance Scaling Driver — The Linux Kernel documentation". www.kernel.org.
  14. "amd-pstate CPU Performance Scaling Driver — The Linux Kernel documentation". docs.kernel.org.
  15. J. M. Rabaey. Digital Integrated Circuits. Prentice Hall, 1996.
  16. Wonyoung Kim, Meeta S. Gupta, Gu-Yeon Wei and David Brooks. "System Level Analysis of Fast, Per-Core DVFS using On-Chip Switching Regulators". 2008.
  17. Mike Chin. "Asus EN9600GT Silent Edition Graphics Card". Silent PC Review. p. 5. Retrieved 2008-04-21.
  18. Intel. "CPU Cooler: Liquid Cooling vs Air Cooling". Retrieved 2024-03-31.

Further reading

[edit]