Simple Power Management Under Fedora

SATA-Kabeladapter
Image via Wikipedia

This post is a result of experimentation, but also of some information from the RHEL6 Power Management Guide. Most people tend to ignore power management, but remember, power management can result in lower utility bills as well as increased life of components.

First, turn on CPUSpeed if it isn’t on. It may require enabling BIOS settings. Look for names like SpeedStep, Cool’n’Quiet, PowerNow!, ACPI, SMART to enable in BIOS. Then, set CPUSpeed to run. CPUSpeed dynamically adjusts the speed and voltage of the CPU based on demand.

While you’re in BIOS, take the opportunity to disable any system piece you aren’t using. For example, your parallel port.

Tuned is a daemon that monitors the use of system components and dynamically tunes system settings based on that monitoring information. A detailed system configuration might be too time-consuming for most. Most people will not do certain things unless it is easy and does not inconvenience them too much. Thus, tuned comes with preset profiles.

Active-State Power Management (ASPM) saves power in the Peripheral Component Interconnect Express (PCI Express or PCIe) subsystem by setting a lower power state for PCIe links when the devices to which they connect are not in use. ASPM controls the power state at both ends of the link, and saves power in the link even when the device at the end of the link is in a fully powered-on state.

Aggressive Link Power Management (ALPM) is a power-saving technique that helps the disk save power by setting a SATA link to the disk to a low-power setting during idle time (that is when there is no I/O). ALPM automatically sets the SATA link back to an active power state once I/O requests are queued to that link.

tuned has the following profiles:

  • default – lowest impact on power savings, only enables CPU and Disk Power Savings
  • desktop-powersave – designed for desktops. Enables CPU, Disk, and Ethernet savings, as well as ALPM power saving for SATA.
  • server-powersave – Designed for Servers. Enables ALPM powersaving for SATA host adapters, disables CD-ROM polling through HAL (refer to the hal-disable-polling man page) as well as the CPU and disk power controls.
  • laptop-ac-powersave – medium-impact profile for laptops on AC. Enables CPU, ethernet, disk, wi-fi, and ALPM power saving for SATA.
  • laptop-battery-powersave – high-impact profile for laptops on battery. All the same from the AC-powersave, plus multi-core power-savings
    scheduler for low wakeup systems and makes sure that the ondemand governor is active and that AC97 audio power-saving is enabled. Will work for any system, not just a laptop, there will be a noticeable impact on performance.
  • throughput-performance – server profile for throughput performance. Disables power saving mechanisms and enables sysctl settings that improve the throughput performance of your disk and network I/O, and switches to the deadline scheduler
  • latency-performance – server profile for typical latency performance tuning. It disables power saving mechanisms and enables sysctl settings that improve the latency performance of your network I/O.

To list available profiles,  use the command tuned-adm list.

To switch to another profile, use tuned-adm profile profile_name.

Reducing the amount of work performed by the hardware is the best way to save power. Applications that request unnecessary work prevent hardware from entering a reduced state. Fedora has already done a lot of work in reducing unnecessary processes, but it can’t do everything. Audit running processes and discontinue anything unnecessary.

But, let’s address one concern. By turning things off or slowing them down, it means you may have a few seconds wait while they reactivate. That may be a downside, but the secret is to find a balance between always on and always off. It is better to turn it on than leave it off. Plan well early on.

We’ll have more on this later.

Leave a Comment