﻿ 仿真环境下的云计算数据中心能耗评估方法
 计算机系统应用  2019, Vol. 28 Issue (5): 143-149 PDF

Energy Evaluation of Cloud Data Center in Simulation Environment
WU Jin, HE Li-Li, ZHENG Jun-Hong, CHENG Dan-Dan
School of Informatics and Electronics, Zhejiang Sci-Tech University, Hangzhou 310018, China
Abstract: Data center energy optimization problem is an important research direction in cloud computing field. However, in the real world, relevant research needs to bear high research costs and long experimental period. Therefore, simulation technology has been widely used in this field. In order to improve the accuracy and reliability of the data center energy-aware simulation experiment, this study analyzes the built-in energy consumption model of the simulation platform and the energy consumption evaluation methods proposed by other scholars, and puts forward the energy consumption evaluation method, which considers the impact of CPU utilization on memory energy consumption, based on CPU and memory usage rate. Also, a multivariate nonlinear model is used for regression analysis. The experiment proves that the energy consumption evaluation method proposed in this study can be applied to the simulation platform and has high prediction accuracy, which effectively improves the accuracy of the energy consumption evaluation of the cloud computing simulation platform.
Key words: cloud computing     data center     energy modeling     regression analysis

1 云计算数据中心能耗评估方法概述

2 仿真环境下的数据中心能耗评估原理

 $E(DC) = \sum\limits_{i = 1}^N {E(i)} \;\;{\rm{ + }}E(other)$ (1)

 ${E_i} = {\int_0^T P _{run}}\left( t \right)dt + s \cdot {E_s}$ (2)

 $P(total) = P(cpu) + P(mem) + P(others)\;\;\;\;$ (3)

3 仿真环境下的云计算数据中心能耗评估方法 3.1 数据准备

Cpu(s): 3.3 us, 1.4 sy, 0.0 ni, 94.7 id, 0.6 wa, 0.0 hi, 0.0 si, 0.0 st

Mem: 3803368 total, 2117404 free,1084500 used, 601464 buffers

 $U(cpu) = U(us) + U(sy) = 1 - U(id)\;\;\;\;$ (4)

 $\;U(mem) = \frac{{total - free - buffers}}{{total}} = \frac{{used}}{{total}}$ (5)

 图 1 实时功率采样拓扑

 图 2 采样结果图

3.2 能耗模型

3.2.1 多元线性回归模型

 ${\rm{y = }}{\beta _{\rm{0}}}{\rm{ + }}{\beta _{\rm{1}}}{{\rm{x}}_{\rm{1}}}{\rm{ + }}{\beta _{\rm{2}}}{{\rm{x}}_{\rm{2}}}{\rm{ + }}\cdots + {\beta _n}{{\rm{x}}_n} + \varepsilon \;\;\;\;$ (6)

 $\;\;r = \frac{{\displaystyle\sum\limits_{i = 1}^n {({x_i} - \bar x)} ({y_i} - \bar y)}}{{\sqrt {\displaystyle\sum\limits_{i = 1}^n {{{({x_i} - \bar x)}^2}} \sum\limits_{i = 1}^n {{{({y_i} - \bar y)}^2}} } }}$ (7)

 $P{\rm{ = }}{\beta _{\rm{0}}}{\rm{ + }}{\beta _{\rm{1}}}{{{U}}_{{{cpu}}}}{\rm{ + }}{\beta _{\rm{2}}}{U_{{{mem}}}}\;\;\;\;$ (8)

3.2.2 多元非线性回归模型

 $P{\rm{ = }}{\beta _{\rm{0}}}{\rm{ + }}{\beta _{\rm{1}}}{{{U}}_{{{cpu}}}}{\rm{ + }}{\beta _{\rm{2}}}{{U}}_{{{cpu}}}^{\rm{2}}{\rm{ + }}{\beta _{\rm{3}}}{U_{{{mem}}}}{\rm{ + }}{\beta _{\rm{4}}}U_{{{mem}}}^{\rm{2}}\;\;\;\;$ (9)

CPU是计算机的主要能耗组件, 并且对内存能耗存在着一定的影响, 因此内存相关系数β3, β4可能与CPU利用率相关. 我们首先通过多项式回归分析, 得到只考虑CPU利用率时β0, β1, β2的值. 之后将采样数据分为38组, 每组一百份数据, 在β0, β1, β2值固定的情况下, 观察CPU利用率的变化对内存的相关系数β3, β4的影响. 分析发现, β4的值随CPU利用率变化不明显, 在一定的区间内上下浮动, 而β3随CPU利用率变化明显, 其变化趋势如图3.

 图 3 CPU利用率与内存相关系数分布图

 $\left\{ \begin{gathered} P{\rm{ = }}{\beta _{\rm{0}}}{\rm{ + }}{\beta _1}{U_{cpu}}{\rm{ + }}{\beta _{\rm{2}}}U_{cpu}^{\rm{2}}{\rm{ + }}\operatorname{f} {\rm{(}}{{{U}}_{cpu}}{\rm{)}}{U_{mem}}{\rm{ + }}{\beta _4}U_{mem}^{\rm{2}} \hfill \\ \operatorname{f} {\rm{(}}{{{U}}_{cpu}}{\rm{)}} = {\gamma _0} + {\gamma _1}{U_{cpu}} + {\gamma _2}{\rm{ln(}}{{{U}}_{cpu}}{\rm{)}} \hfill \\ \end{gathered} \right.$ (10)

3.3 预测和评估

 ${P_{\text{相对偏差}}}{\rm{ = }}\frac{{{P_{\text{预测}}}{\rm{ - }}{P_{\text{真实}}}}}{{{P_{\text{真实}}}}}$ (11)
 ${P_{\text{平均相对偏差}}}{\rm{ = }}\frac{{\displaystyle\sum\limits_{{\rm{i = 1}}}^{\rm{n}} {\left| {{P_{\text{偏差}}}} \right|} }}{n}$ (12)
4 实验分析

CloudSim一元线性模型、CloudSim一元分段式模型、多元线性模型、多元非线性模型的能耗预测值和能耗真实值的对比情况依次如图4图7所示.

 图 4 CloudSim一元线性模型预测情况

 图 5 CloudSim一元分段式模型预测情况

 图 6 多元线性回归模型预测情况

 图 7 多元非线性回归模型预测情况

 图 8 CloudSim一元线性模型相对偏差

5 结论与展望

 图 9 CloudSim一元线分段模型相对偏差

 图 10 多元线性回归模型相对偏差

 图 11 多元非线性回归模型相对偏差

 [1] Shehabi A, Smith S, Sartor D, et al. United States Data Center energy usage report. Berkeley: Lawrence Berkeley National Laboratory, 2016. [2] 林伟伟, 吴文泰. 面向云计算环境的能耗测量和管理方法. 软件学报, 2016, 27(4): 1026-1041. [3] Calheiros RN, Ranjan R, De Rose CAF, et al. CloudSim: A novel framework for modeling and simulation of cloud computing infrastructures and services. arXiv: 0903.2525, 2009. [4] Chen G, He WB, Liu J, et al. Energy-aware server provisioning and load dispatching for connection-intensive internet services. Proceedings of the 5th USENIX Symposium on Networked Systems Design and Implementation. San Francisco, CA, USA. 2008. 337–350. [5] Fan XB, Weber WD, Barroso LA. Power provisioning for a warehouse-sized computer. ACM Sigarch Computer Architecture News, 2007, 35(2): 13-23. DOI:10.1145/1273440 [6] Basmadjian R, Ali N, Niedermeier F, et al. A methodology to predict the power consumption of servers in data centres. Proceedings of the 2nd International Conference on Energy-Efficient Computing and Networking. New York, NY, USA. 2011. 1–10. [7] 陈俊, 胡悦, 杨娇, 等. 云计算数据中心实时能耗建模. 计算机工程与设计, 2017, 38(9): 2494-2497, 2555. [8] 罗亮, 吴文峻, 张飞. 面向云计算数据中心的能耗建模方法. 软件学报, 2014, 25(7): 1371-1387. [9] Isci C, Martonosi M. Runtime power monitoring in high-end processors: Methodology and empirical data. Proceedings of the 36th Annual IEEE/ACM International Symposium on Microarchitecture. San Diego, CA, USA. 2003. 93–104. [10] 程华, 陈左宁, 孙凝晖, 等. 一种基于细粒度性能计数器建立系统实时功耗模型的方法. 计算机学报, 2014, 37(3): 687-699.