Example 3: Modeling Power Managed Devices In PerfCenter

In this tutorial, we consider a system which uses power managed devices, and we show how we can model it using PerfCenter.

1   Power Managed Devices - Terminology

Power managed devices are such devices whose power consumption can be controlled via a soft-controller. The controller can typically set the configurable parameters of the device, in order to alter its operational behavior. Some set of parameters make the device perform with highest performance, but with higher power consumption, whereas some other set of parameters make the device perform with lower performance, but with the benefit of lower power consumption.

PerfCenter has the facility to model power-managed CPUs (PM-CPUs). PerfCenter focuses on the class of PM-CPUs where the current operating frequency is settable by a soft-controller. The PM-CPUs have predefined set of operating frequencies at which they can operate. A PM-CPU consumes a certain amount of power when it operates at each of these frequencies. It also consumes some power when it is idle (in its “switched on” state).

The soft controller which controls the frequency of the PM-CPU is called power governor. Power governors come into action after every predefined amount of time, called the “probe interval”. They probe the CPU to check its utilization in the previous probe interval. If this value is greater than a threshold, then the CPU's operating frequency is increased, in consultation with the power governor. This threshold is called the up threshold. Similarly, if the utilization in previous probe interval is less than a particular threshold, then the CPU's operating frequency is decreased, as per governor's policy. This lower threshold is called down threshold. Up and down thresholds help in the decision of when to change the CPU's operating frequency. The question of how to change it is answered by the power governor's policy, also simply called governor. There are five such standard governors available in the linux kernel, since kernel 2.6.30.

  1. The powersaver governor always maintains the operating frequency at the lowest available frequency.
  2. The performance governor always maintains the operating frequency at the highest available frequency.
  3. The userspace governor takes one frequency as argument, and it always maintains the frequency at the specified level.
  4. The ondemand governor sets the current operating frequency to the highest available value, when utilization goes beyond up threshold,. When the utilization goes below the down threshold, it decreases the frequency by one step.
  5. The conservative governor increases the frequency by one step when the utilization goes beyond up threshold, and it decreases the frequency by one step when the utilization goes below down threshold.

2   Simulating Power Managed Devices in PerfCenter

PerfCenter allows any device to be declared as a power managed device. For this, the device itself must be declared in the device block. ?? The power management features of the device are then described in a new block called powermanagement block. The following block defines a power managed CPU that has nine different operating frequencies, with idle power consumption of 65 watts, probe interval of 80 ms, up threshold of 80% and down threshold of 20%. The power_consumed attribute specifies the utilization-based power that will be consumed, when the CPU is operating at the corresponding frequency levels.


powermanagement intel_xeon_cpu
speed_levels 1.2 2.2 2.4 2.5 2.66 2.79 2.93 3.06 3.19 3.19 end
power_consumed 10.36 69.259 81.911 97.166 112.926 130.306 150.922 171.916 194.771 194.771 end
idlepower 65
probe_interval 0.080
governor_up_threshold 80
governor_down_threshold 20

Thus for the CPU described above, the power consumed in an interval where utilization was U and the CPU was operating at frequency f is estimated as :

Power = Pidle + U * Pspeed

with, Pidle = 65 (the value given in idlepower) and Pspeed being the power corresponding to the current operating frequency f. From the above example, the power corresponding to frequency 2.2 is 69.259. Hence, for f=2.2 and U = 80%, the power consumed by the device would be 120.4072.

The above block has just defined the device. Each of the host machines that uses the device can use different power governor to govern the device. Hence the governor is specified in the host block,  as follows:

<DEVICE> power_managed governor <GOVERNOR>

The complete host definition that uses a PM-CPU, with the ondemand governor, is described as follows:

host arpa[1]
cpu count 4
cpu buffer 99999
cpu schedP fcfs
cpu power_managed governor ondemand
disk count 1
disk buffer 99999
disk schedP fcfs

Note that when devices are power managed,  the task service time values specified are assumed to correspond to the lowest operating frequency of the CPU. E.g. in the given example, the following declaration:

task verify_credentials
intel_xeon_cpu servt 0.010

means that the task verify_credentials would require 10 ms of service if the CPU intel_xeon_cpu is operating at the frequency of 1.2 (its lowest).

PerfCenter also assumes that the service time will changes linearly with the operating frequency. E.g., Then, at frequency of 2.4, the above task is estimated to require 5 (=10*1.2/2.4) ms of service at CPU intel_xeon_cpu.

3   Power Metrics

PerfCenter offers the following metrics that are specific to a system which has power-managed devices:

  1. freq(device_name): gives average operating frequency of the said device.
  2. avgpower(device_name): gives the average amount of power consumed by the said device. This value can directly be used to compute the energy cost of the device over a period.
  3. eperr(device_name): gives the average energy consumed by the device to serve one request, under given load profile and power configuration.
  4. peff(device_name): gives the average number of requests served per unit consumption of energy.

The beauty as well as strength of these two metrics is that they consider both power and performance aspects of the system.

With the power metrics described in this tutorial, and other performance metrics described in earlier tutorials, we can optimize both power and performance. We can minimize the power consumption of a system given its SLA requirements, or we can find out the best achievable performance given its peak power consumption limits.

Input file for current example is available here for download. This input file produces following result upon running.

Input file input_example_3
Started at 2013-05-17 23:00:20
Completed at 2013-05-17 23:01:46

It should be noted that power managed devices are available only for the simulation part of PerfCenter. Support in analytical part would be added in a future release of PerfCenter.