perfd automatically adjusts the sysctl(3) hw.setperf value depending on current processor usage. This allows laptop users to conserve battery life whilst the machine is idling, but to have good performance when performing CPU-intensive tasks. It also allows desktop and server users to keep their machine running at low temperatures when not performing CPU-intensive tasks (new in v0.2).


perfd is released under a BSD licence.

Download perfd 0.3 (5 Nov 2005) (5Kb)
Download perfd 0.2 (16 July 2005) (5Kb)
Download perfd 0.1 (15 October 2004) (4Kb)

Detailed description

perfd continuously monitors CPU utilization, mains power and battery life. If mains power is not present, perfd monitors CPU utilization; if the processor is being heavily utilized it will try to increase system performance to compensate. If the processor is idling, it will decrease system performance. As battery life decreases, the maximum speed the machine can reach is gradually reduced to maximize battery life. If the battery reaches the low, or critical state, system performance is reduced to, and maintained at, the minimum until a change in circumstances is detected. If mains power is present, perfd has two modes of operation. By default, it operates similarly to when mains power is not present, with the exception that it is quicker to raise system performance, and slower to decrease it. A second mode of operation (controlled by the -f flag) forces the system to be set to maximum performance when mains power is present.


Turn on debugging. perfd prints debugging output to stderr showing it altering system performance. In debugging mode, perfd does not daemonize itself.

Force sysctl(3) hw.setperf to its maximum level whenever AC power is detected.

-m min perf
Specify minimum level which sysctl(3) hw.setperf will be set to. The default is 20.

-x max perf
Specify maximum level which sysctl(3) hw.setperf will be set to. The default is 100.


To install perfd, execute make and then (as root, or via the sudo command) make install. Note that make install installs files directly into sub-directories of /usr/local/. Since super-user privileges are needed to alter the system performance levels, perfd should be run as root.

perfd is fairly simple minded - please feel free to poke and prod the source code and send me any updates.