IMTC 2006 – Instrumentation and Measurement Technology Conference Sorrento, Italy 24-27 April 2006
Measurement by the Software Design for the Power Consumption of Streaming Media Servers Chia-Hung Lien*, Ming Fong Liu**, Ying-Wen Bai**, Chi Hsiung Lin** and Ming-Bo Lin* *Department of Electronic Engineering, National Taiwan University of Science and Technology Taipei, Taiwan, 106, R.O.C. **Department of Electronic Engineering, Fu Jen Catholic University Taipei, Taiwan, 242, R.O.C. Email:
[email protected] Abstract – The power consumption of the streaming media server can be obtained in real time by the virtual instrumentation software module described in this paper without an additional hardware meter. From the observation of experiment’s data we conclude that the measurement of the power consumption of the streaming media server depends on the CPU utilization exquisite dynamically and with some system operation parameters. We form a model to represent the power consumption with respect to the CPU utilization. By using the software method based on this model, users can perform the measurement of the power consumption of the PC at any time even remotely through the Internet. Once the required measurements are made, the acquired data can be immediately transferred back to the monitor server in order that the measured data can be analyzed in more detail. To facilitate the measurement process, we also design a suitable graphic user interface is also designed. Our method has been tested through a comparison with the measurement results by means of a power meter. Keywords – Power Consumption, Streaming Media Server, CPU Utilization, Monitor Software Module.
I. INTRODUCTION Streaming media makes a user’s life more convenient by being able to use network technology such as, E-Learning and media on line (video-on-demand, KTV, and Web TV). In the World Wide Web, the media transmittal can be differentiated between traditional media and streaming media. The mainly difference is that the traditional media can not be displayed by network streaming. So the research community and the computer industry have developed a special streaming media format for themselves. Now various media format such as, RealNetwork’s RealVideo (.rm) and RealAudio (.ra), Microsoft’s Windows Media Video (.wmv), Windows Media Audio (.wma), Active Streaming Format (.asf) and Apple’s Quicktime(.mov) can be displayed by using network streaming [1-3]. Heterogeneous mixes of clients vary from very powerful ones with excessive memories, to thinner ones with less CPU. The RealNetworks RealPlayer G2 will currently run on any PC-compatible running Windows 95, 98, NT4.0, and Power Macintosh [4, 5]. The performance will vary depending on CPU speed and available memory. For fast, responsive control and playback, a 166-Mhz Pentium with 32Mb of RAM or slower machines will provide sub-optimal playback. PCs also need to be MPC-2 compliant and have appropriate sound-cards, drivers, and headphones or speakers installed. 0-7803-9360-0/06/$20.00 ©2006 IEEE
For corporate intranet sites, overcoming the currently installed base of non multi-media equipped PCs can be a significant challenge [6]. Streaming high quality audio and video to a myriad of clients imposes significant resource demands on the server. The streaming media server should have high resource utilization, and high concurrency. The RealNetworks RealServer G2 products run on a variety of UNIX platforms as well as Microsoft NT. Hardware requirements vary depending on the average number of users. Consult the RealNetworks website for details [7]. Early work on software-managed power consumption focused on embedded and notebook systems, thus trading performance for energy conservation and also extending battery life. Recently, researchers have argued that operating systems should implement power-conservation policies and manage power like other system resources such as CPU time, memory allocation, and disk access [8]. Support for system monitoring and tuning in complex systems such as servers has long been an active research area. In recent years, the emphasis has been on evaluating the health and availability of Windows servers, network services (on Windows, Linux and other operating systems), and power consumption [9]. Using powerful hardware can deliver better performance and quality of service but results in higher power consumption. Clearly, good power monitoring and management is becoming important for all servers. A typical commercial measurement of power consumption uses a power meter [10]. However, this method requires additional hardware which will increase the total cost when the numbers of server increase. In this paper, we propose a software method for the measurement of the power consumption of a streaming media server. Our design measures power consumption based on the accessing of the real-time CPU utilization. A streaming media server is a large, complex, heterogeneous system, often including multiple resources such as electronic, optical, and magnetic components. Our approaches for server power estimation are either based on statistical traffic models, or an analytical model. The rest of this paper is structured as follows. In the next section, we describe our modeling and approach. In subsequent sections we first outline our architecture and then examine each major function in detail. Details of
1597
U = 100% −
Fig. 1. The architecture of the measurement system of the streaming media server for modeling power consumption.
The analyzer runs PPA (Power/Performance Agent) to collect power consumption and CPU utilization data from the streaming media server. The reason for collecting only two
(1)
Figure 2 shows some measurement results of the power consumption associated from the minimum to the maximum percentage of the CPU utilization during the two weeks. 150 140 130 120 110
192.168.100.2 192.168.100.3 192.168.100.4 192.168.100.5 192.168.100.6 192.168.100.7
100 90 80
10 0%
90 %
80 %
70 %
60 %
50 %
40 %
30 %
70 0%
A. The relation between the power consumption and the CPU utilization We measured the power consumption of an typical ACPI-compliant streaming media server system with a single 2.4 GHz Pentium 4 processor [11], 266 MHz bus, 1.0GB RAM, IBM 80GB IDE hard disk, and a single Gigabit Ethernet card as shown in Figure 1. The streaming media server runs on Windows 2003 Advanced Server, and is the IIS5.0 Web server system. The client generates media requests to the server by running Windows Media Load Simulator with six real request traces [12]. We use the log traces of six servers from the streaming media servers, consisting of the 520M media requests received within two weeks.
(average period of idle task with no load) * 100% (average period of idle task with some load)
20 %
Based on long time observations and measurement results of the power consumption of a streaming media server, we found that the power consumption is related to its CPU utilization. This section shows the relationship between the power consumption and the CPU utilization of the streaming media server. Previously, it is known that the power consumption of a streaming media server depends heavily on the characteristics of its load. Starting from the “Test Phase”, it is possible to rely on some data (trace), collected from the system’s log files to create a model that describes, or approximates, the actual workload behavior. From this model, one can predict the impact of the load imposed in the system, when the system goes to the “Production Phase”. Much of the work done in this direction focuses on single load characterization, which considers each application one at a time, creating a model from observation (i.e. a stochastic model) and extracting the parameters needed from the workload traces.
10 %
II. PROPOSED APPROACH
weeks worth of data is that the server’s CPU utilization for six traces had been increasing over time and, prior to this period, some traces did not have sufficient utilization to be analyzed. PPA aggregates the average power consumption and CPU utilization every five minutes and writes this information to a log file which is subsequently extracted and stored in a central repository. For our comparison, we define CPU utilization, U, as the amount of time not in the idle task, as shown in Equation (1). The idle task is the task with the absolute lowest priority in a multitasking system [13].
Power consumption, P (Watts).
implementation, including the experimental results, are given in Section IV. Section V presents the conclusions.
CPU Utilization, U
Fig. 2. The power consumption of six typical workloads served by a streaming server.
Obviously, the different CPU utilization results in a different amount of the power consumption. The larger the CPU utilization, the more the power consumption is. The variance is examined as a smaller value from the repeat measurements. We examined the measurement results and found that the power consumption of the streaming media server system depends on the CPU utilization, the intensity of the service request rates, the working load and the type of servers. These measurement results also lead to the following observations: 1. A key parameter in evaluating the performance and the power consumption of a streaming media server is a server’s CPU utilization U. A small U preserves most resources when idle but only a few resources are for requests. As a large amount of the media requests are for more resources to be utilized to process the requests, such a situation requires larger power consumption. 2. Although, during idle (CPU utilization U = 0%) a streaming media server can have null performance, it has inherent power consumption by some resources to maintain the basic routines of the system. Moreover, the power consumption shows only little variation when in the idle state and the average power consumption is approximately constant.
1598
D represents the average power consumption during an idle period (U = 0%). 3. The power consumption of the server reaches a constant value while the system has a heavy load (U = 100%). M represents the maximum power consumption of the server. 4. The characterization of the different server equipment has an impact on the system’s power consumption. β represents an adjustable parameter for different servers. Based on these observations and the measurement results, we consider the power consumption of a streaming media server as an exponential function of U.
Where P represents the average power consumption, here M-D represents the extra average power consumption in addition to D to process the requests. In this approximate model, we ignore the influence of the high-order effect on the power consumption of the streaming media server. The results show that the power consumption can be predicted. The Bayesian theory of classification tells us that there exists a lower bound on classification accuracy, which does not depend on the particular classification algorithm adopted, or on the number of available samples, but only on the distribution of samples in the feature space. If we estimate those distributions, we can have an idea on what will be the maximum performance attainable with the available dataset. It is necessary to extract from the signals produced by the sensors those features that are relevant to the classification problem, thus making simpler the classifier design and improving classification accuracy. Here the problem is understanding which features describe the process in a way almost accurate as the full signals, and which constitute a minimal set, avoiding both the “curse of dimensionality” and incomplete process description.
Error (β ) = U =0%
U
(β ) − PU* n
Error (%)
β = 7 Error
6%
β = 3.3 Error
2%
4.99%
0%
7. 0
6. 6
5. 0 5. 4 5. 8 6. 2
3. 4 3. 8 4. 2 4. 6
1. 0
0%
β
Fig. 3. The decision of the β from measurement.
Consider D = 110.5W, W and M = 178.0W obtained by a real machine, Error(β) has a minimum at β = βk; that is, for β < βk the function is decreasing, and for β > βk the function is increasing. Therefore, the values of D, M and β can be obtained for the machines with different equipments to construct the different streaming media servers. Table 1 shows the parameters of measured streaming media servers, which can be used for predicting the power consumption by using our software based on the access of the CPU utilization of the streaming media server.
In order to obtain the optimal value of β for predicting the power consumption of the streaming media server we define the Error function:
∑P
8%
4%
B. The decision of β
100%
12.3%
10%
(2)
P = D + (M − D)U β
β = 1 Error
12%
1. 4 1. 8 2. 2 2. 6 3. 0
1
14%
(3)
Where PU(β) represents the predicted value of power consumption from Eq. (1) with respect to β and PU* represents the measured value of power consumption at the CPU utilization U. n, the number of observations for U, are 11 (U = 0%, 10%, …, 100%) in our measurement. To understand how this model yields a decision of β, consider the graphs illustrated in Figure 3.
1599
Table I. The parameters of measured streaming media servers.
NO.
System
D(Watts)
M(Watts)
β
A
P-200
40.4W
60.7
2.0
B
P2-300
44.3W
73.8
3.1
C
P2-400
63.5W
86.3W
2.1
D
P3-450
53.5W
74.7W
2.0
E
P3-800
70.2W
101.2W
2.2
F
P4-1G
76.5W
120.3W
2.8
G
P4-1.7G
80.6W
130.5W
2.3
H
P4-2.4G
83.3W
142.5W
2.0
I
P4-2.8G
110.5W
178.0W
3.3
J
P4-3.0G
117.2W
185.2W
2.8
III. DEVELOPMENT OF SOFTWARE
unloaded CPU to the period of the idle task under some known load.
A. How to calculate CPU utilization
B. Windows-based programming
In our software, we demonstrated a way to employ the technique of CPU utilization [13]. We use this method to obtain the CPU utilization to evaluate the power consumption of the streaming media server. The CPU utilization U is the amount of time not in the idle task, as shown in Equation (1). This task is also sometimes called the background loop, shown in Table 2. This logic traditionally has a while(1) type of loop. In other words, an infinite loop spins the CPU waiting for an indication that critical work needs to be done [14] The logic coded for execution during the idle task must have no hard real-time requirements because there's no guarantee when this logic will be completed. Of the several ways to measure the time spent in the idle task, some techniques don't require any additional codes. Our method is that, under ideal no loaded situations, the idle task would execute a known and constant number of times during any set time period (one second, for instance). Most systems provide a time-based interrupt that we use to compare a free-running background-loop counter to this known constant.
Figure 4 shows the flowchart of Windows-based programming for the software-type power measurement module. We can build a parameter table from the statistical analysis results of the data collection. According to the content of the parameter table, we can obtain the appropriate parameters and constants when the system detects the type of CPU and the server specification. The real power consumption of the server can then be estimated through the CPU utilization and the parameters based on the model calculation. START
Detect the server hardware system Detect RAM Service Rate M, D, β VALUE TABLE Calculate CPU Utilization
Table II. Algorithm: programming of an idle loop.
1
P = D + (M − D)U β
extern INT16U k_loop_cnt = 0; Display CPU Utilization
int main( void ) { SetupInterrupts(); InitializeModules(); EnableInterrupts();
Display Server Service Time
Calculate CPU Utilization
Display Power Consumption Display Server Power Cost
Record/Statistics
End
while(1) /* endless loop spin in the background */ { k_loop_cnt++; CheckCRC(); MonitorStack1(); ... do other non-time critical logic here. }
Fig. 4. The flowchart of Windows-based programming of the power measurement software module.
IV. SYSTEM IMPLEMENTATION
} Once we know the average idle task execution time, we can measure the CPU utilization while the system is under various states of loading. Obviously at the present time there's no way to measure CPU utilization directly. We derived the CPU utilization from measured changes in the period of the background loop. We measured the average background-loop period under various system loads and graphed the CPU utilization. Recall from Equation (1) that the CPU utilization is defined as the time not spent executing the idle task. The amount of time spent executing the idle task can be represented as a ratio of the period of the idle task in an
According to Figure 4, we design a real time monitor software module by accessing the CPU utilization and then computing the power consumption. There are certain operational procedures of our software design. 1) Detect the CPU types, RAM sizes, number of hard disks, maximum power consumption and idle power consumption. Then our software can estimate the power consumption as shown in Figure 5(a). 2) Record and display the CPU Utilization as shown in Figure 5(b). 3) Real time monitor and display energy cost is calculated by the server working time and total power consumption as shown in Figure 5(c)
1600
Clients
PC
180 iMac
WPDA
Power consumption, P (Watts)
Notebook
200
Ethernet X LAN X X X s t d X X a Media server
r t
160 140
Actual Measurement Measurement of the software CPU utilization
120 100 80 60 40 20 0 1
44 87 130 173 216 259 302 345 388 431 474 517 560 Time (Seconds)
(a)The records of 10 minutes. (c) Real time monitor
28
(b) CPU utilization
Eergy accumulation (KWH)
24
(a) Operation interface
Fig. 5. The architecture of the streaming media server and the measurement system.
To validate the accuracy of the model, we compare our method’s results with the meter measurement results. In the experimental environment, the server is the 2.8 GHz Pentium-4 system with dual Gigabit Ethernet NICs connected to the Internet. This server runs a Windows 2003 OS. We use two individual streaming platforms, Windows Media Video (.wmv) and RealNetworks (.rm). Our experiments use a combination of the Windows Media Load Simulator for Windows Media Services 9 Series [12] and the real request traces. We use a log trace of five servers from the university servers, consisting of the 520M requests received. The server’s power consumption also was measured by a DW-6090 POWER ANALYZER with one week measurement intervals and a one-second resolution. Figure 6 shows the estimation by our software module and the measurement results by the power meter for the streaming media server with Windows Media Video (.wmv). After conducting an experiment for one week, we found that the estimated value and the measurement value had an average error of 5.2%.
Actual measurement
20
Measurement of the software
16 12 8 4 0 1
13 25 37 49 61 73 85 97 109 121 133 145 157 Time (Hours) (b) Energy consumption accumulated in one week.
Fig. 6. The comparison of the power consumption between the estimation by our software design and by the power meter for Streaming Media Server with Windows Media Video (.wmv).
Figure 7 shows the comparison results for the streaming media server with RealNetworks (.rm). It shows that the difference between the model and the measurement is within 8.3%.
1601
160
Actual Measurement Measurement of the software CPU utilization
140 Power consumption, P (Watts)
3) Our software design is easy for user to estimate the variation of the operation time of consumer electronics. For example, when we use a notebook powered by batteries, our design can estimate the impacts of the variation of the power consumption due to the operation characteristics. 4) Our software design helps us to make more accurate financial cost analyses such as the quantification statistics of using energy costs. 5) Our software design can also be used to measure the power consumption of real applications from the remote site.
120 100 80 60 40
REFERENCES
20 0
[1]
1
42 83 124 165 206 247 288 329 370 411 452 493 534 575 Time (Hours) [2]
(a) The records of 10 minutes.
[3]
Energy accumulation (KWH)
20
[4]
18
Actual measurement
16
Measurement of the software
[5]
14 12
[6]
10 8 6 4
[7]
2
[8]
0 1
13 25 37 49 61 73 85 97 109 121 133 145 157 Time (Hours)
[9]
(b) Energy consumption accumulated in one week. [10] Fig. 7. The comparison of the power consumption between the estimation by our software module and the power meter for a Streaming Media Server with RealNetworks (.rm).
[11] [12] [13]
V. CONCLUSIONS The main factor is that the server works purely so that the main components can be regularly estimated for the power consumption, which leads us to conclude that there four advantages of our software design. 1) We find that our software design is accurate enough to estimate the power consumption of the media servers. 2) Our software design can be used to estimate accurately without any hardware meter and thus save a power meter fee.
1602
Pan Yi, Meejeong Lee, Jaime Bae Kim and T. Suda, “An end-to-end multipath smooth handoff scheme for stream media”, IEEE Journal on Selected Areas in Communications, Vol. 22, Issue 4, pp. 653-663, May 2004. J. Almeida, J. Krueger, D. Eager, and M. Vernon. “Analysis of educational media server workloads”. In NOSSDAV’01., pp. 53-66, June 2001. Perkis, A., Jijun Zhang, Halvorsen, T., Kjode, J.O., Rivas, F., “A streaming media engine using digital item adaptation”, 2002 IEEE Workshop on Multimedia Signal Processing, pp. 73–76, 9-11 Dec. 2002. Simunic, T., Boyd, S.P., Glynn, P., “Managing power consumption in networks on chips”, IEEE Transactions on Very Large Scale Integration (VLSI) Systems, Vol. 12, Issue 1, pp. 96 – 107, Jan. 2004. Roy, S., Covell, M., Ankcorn, J., Wee, S., Yoshimura, T., “A system architecture for managing mobile streaming media services”, 2003. Proceedings., 23rd International Conference on Distributed Computing Systems Workshops, pp. 408 – 413, 19-22 May 2003. Zhi-Wen Xu, Xiao-Xin Guo, Zhan-Hui Liu, Zheng-Xuan Wang, Yun-Jie Pang, “The batch patching algorithm using dynamic cache of proxy for streaming media”, 2005. Proceedings of 2005 International Conference on Machine Learning and Cybernetics, Vol. 9, pp. 5532–5537, 18-21 Aug. 2005. RealNetworks, Inc., RealNetworks Production Guide, http://www.realnetworks.com/resources/ Z. Ren, B. H. Krogh, and R. Marculescu, “Hierarchical adaptive dynamic power management”, IEEE Transactions on Computers, Vol. 54, Issue 4, pp. 409-420, April 2005. Mihic, K.; Simunic, T.; De Micheli, G.; “Reliability and power management of integrated systems”, 2004 Euromicro Symposium on Digital System Design, DSD 2004, pp. 5 – 11, 31 Aug.-3 Sept. 2004. Chia-Hung Lien, Ying-Wen Bai, Ming-Bo Lin and Po-An Chen, “The saving of energy in web server clusters by utilizing dynamic sever management”, 12th IEEE International Conference on Networks, 2004. (ICON 2004). Proceedings, Vol. 1, pp.253–257, 16-19 Nov. 2004. Intel Inc., Integration Overview for Boxed Pentium® 4 Processor-Based Systems, http://support.intel.com/support/index.htm/ Bill Birney, Checking Server Performance with Windows Media Load Simulator, http://www.microsoft.com/support/index.htm/ Labrosse, Jean J., MicroC/OS-II: The Real Time Kernel, CMP Books, 2002.