Professional Documents
Culture Documents
Fig. 2. CPU Test: power consumption vs CPU utilization (left); Network Test: power consumption vs data rate (center), CPU utilization vs data rate (right).
CPU test. The first application we test is a CPU-intensive after 0.8 Gbit/s. This is due to the fact that, between 0.6
task, continuously performing matrix products with the numpy and 0.8 Gbit/s, we hit the maximum rate at which data transfers
library. Because numpy is single threaded, this application can occur: we can set a rate of, say, 1 Gbit/s in iperf, but
will employ at most one CPU core, even if more are available. only a fraction of that data gets to the destination.
Network test. We also consider a typical network transfer Now let us compare Fig. 2(right) with the power consump-
scenario: a client container uses iperf to send an uninter- tion displayed in Fig. 2(center): while the CPU usage accounts
rupted, constant-rate flow of TCP data to a server container; for much of the power consumption, there are clearly other
neither container performs any other operation. The purpose contributions that make the consumption grow even when the
of this test is to assess whether the data rate impacts the power CPU usage becomes constant. In summary, Fig. 2(center) and
consumption, and how. Fig. 2(right) alert us that Docker CPU usage is not the only
meaningful contribution to the total power consumption. As
III. M AIN RESULTS an example, the growth in the rightmost part of Fig. 2(center)
Fig. 2(left) summarizes the results of our CPU test. Each can be due to the packets entering the Linux network stack
data point correspond to a different number of containers and then being discarded therein.
running the test: when there are up to three containers running,
each consumes almost exactly 100% of the available CPU, i.e., IV. C ONCLUSION AND ONGOING WORK
one core out of four. The rightmost point, corresponding to the We tested the power consumption of a real-world Docker
test with four containers, shows a CPU load of around 370%. testbed, under several different types of load. We found that
The remaining 30% is used by overheads, including that of Docker CPU usage always represents a significant contribution
the Docker daemon and of the operating system processes. to the overall power consumption; however, depending on the
The linear fitting is very good, and the linear regression law actual application being run, we might need to account for
is as follows: additional components, e.g., increased strain on the operating
system resources. We are currently working towards character-
P = 0.1065c + 12.4411, izing and quantifying such additional components, especially
with reference to network transfer scenarios.
where P is the power (in watt) and c is the percentage of
used CPU (e.g., 200 for two cores). In summary, Fig. 2(left) R EFERENCES
confirms the intuition that CPU usage is the main reason [1] A. Kansal, F. Zhao, J. Liu, N. Kothari, and A. A. Bhattacharya, “Virtual
behind power consumption. machine power metering and provisioning,” in ACM symposium on Cloud
computing, 2010.
In Fig. 2(center) we present the results of the network test; [2] B. Krishnan, H. Amur, A. Gavrilovska, and K. Schwan, “VM power
specifically, the plot displays the power consumption as the metering: feasibility and challenges,” ACM SIGMETRICS Performance
data transfer rate varies. We can immediately see that the Evaluation Review, 2011.
[3] R. Bertran, Y. Becerra, D. Carrera, V. Beltran, M. Gonzalez, X. Martorell,
dependence is more complicate than in Fig. 2(left). The best J. Torres, and E. Ayguade, “Accurate energy accounting for shared
model we found is a second order polynomial fitting: virtualized environments using pmc-based power modeling techniques,”
in IEEE/ACM GRID, 2010.
[4] R. Morabito, “Power consumption of virtualization technologies: an
P = −17.7368r2 + 37.2859r + 3.8210, empirical investigation,” in IEEE/ACM UCC, 2015.
where P is the power (in watt) consumed by Docker as ACKNOWLEDGMENT
measured by power meter and r is the data rate in Gbits/s.
This work has received funding from the 5G-Crosshaul
We try to make sense of this behavior by looking, in
project (H2020-671598).
Fig. 2(right), at how the CPU load changes with the data
rate. We can clearly see an almost-linear growth until a
rate of 0.6 Gbit/s, and then a basically constant CPU usage
273