衛(wèi) 星 張建軍 石 雷 翟 琰
?
云計算數(shù)據(jù)中心服務器數(shù)量動態(tài)配置策略
衛(wèi) 星①②張建軍*①②石 雷①翟 琰①
①(合肥工業(yè)大學計算機與信息學院 合肥 230009)②(安全關鍵工業(yè)測控技術教育部工程研究中心 合肥 230009)
云計算數(shù)據(jù)中心由通過高速網(wǎng)絡連接的大量服務器構成,一種有效的節(jié)能措施是維持與系統(tǒng)負載成比例的活躍服務器數(shù)量同時切換剩余服務器到空閑模式,由此分別產(chǎn)生操作能耗和切換能耗。該文研究如何動態(tài)配置活躍服務器數(shù)量以最小化數(shù)據(jù)中心能耗(操作與切換能耗之和)的問題。首先,建立了問題的NP數(shù)學模型,并分析了無切換能耗情況下最優(yōu)解的特性;其次,通過消除整數(shù)動態(tài)規(guī)劃的遞推過程,推導具有多項式復雜度的最優(yōu)靜態(tài)算法;最后,采用對未來負載的最壞預測結果作為約束制定了優(yōu)化在線策略。仿真結果表明,所提出的靜態(tài)最優(yōu)和動態(tài)優(yōu)化策略能夠適應外界負載的劇烈變化趨勢始終謹慎調整活躍服務器和休眠服務器的比例,以接近最優(yōu)的能耗代價維持數(shù)據(jù)中心的平穩(wěn)運行。
云計算;數(shù)據(jù)中心;活躍服務器;離線最優(yōu)算法;動態(tài)規(guī)劃;在線算法
云計算通過整合存儲和計算能力有限的大量終端服務器,使得系統(tǒng)用戶只需通過網(wǎng)絡“透明”的訪問其中一臺服務器就可獲得近乎無限的計算能力以及語音、視頻、信息搜索等服務,而資源由云計算數(shù)據(jù)中心統(tǒng)一調度、組織和管理。Amazon, Google, IBM, Microsoft等相繼推出以集群計算為模型的云計算數(shù)據(jù)中心,采用層次結構實現(xiàn)且承載的主要是客戶機/服務器模式應用,具有如下典型特征:(1)數(shù)據(jù)中心內部各服務器間具有高傳輸帶寬。(2)數(shù)據(jù)中心能夠實現(xiàn)服務器和虛擬機的便捷配置和遷移。(3)數(shù)據(jù)中心支持數(shù)十萬甚至上百萬臺的服務器,并允許增量的部署和擴展,其服務能力遠大于外部應用需求。
本文研究如何動態(tài)配置各時隙的活躍服務器數(shù)量從而最小化數(shù)據(jù)中心能耗的問題。首先,從數(shù)據(jù)中心工作模式出發(fā),將任務分發(fā)策略簡化為負載均衡方式并建立了問題數(shù)學模型;其次,分析了無切換能耗情況下最優(yōu)解的特性,并給出了平周期與跟隨周期遞推法則;接下來通過消除整數(shù)動態(tài)規(guī)劃的遞推過程,給出了具有多項式復雜度的靜態(tài)最優(yōu)算法;最后以未來負載的最壞預測結果為約束制定了在線算法。
從而操作能耗函數(shù)為
其次推導切換能耗函數(shù),由于活躍服務器切換到休眠模式需要負載遷移、機器折舊等損耗,而休眠模式到活躍模式的能耗極小可以忽略。切換能耗發(fā)生在相鄰時隙和之間,表達為,其中切換系數(shù)為正常數(shù)。由于“負載均衡”調度策略被廣泛接收是最優(yōu)分配方式[6,12],則任意服務器被分配到的負載為,且有。綜上所述,數(shù)據(jù)中心能耗最小化問題可表述為
問題1
3.1 無切換成本最優(yōu)解
問題2
3.2 一般最優(yōu)解特性
圖1 最優(yōu)解特性—跟隨周期與平周期
問題3
圖2 遞推用例
圖3 計算時存在的兩種情況
綜合以上兩種情況得
表1離線最優(yōu)算法偽代碼
表2在線優(yōu)化算法偽代碼
由于條件所限,仿真實驗在 matlab 2013a環(huán)境下,采用離散事件動態(tài)方法進行仿真。整體運行模式與流程類似于數(shù)據(jù)中心的模型設定:服務器數(shù),服務容量,時隙總長;能耗參數(shù)分別設為,則操作能耗函數(shù)為。
6.1 離線仿真分析
圖4 不同負載變化情況下活躍服務器數(shù)
圖5 不同負載變化情況下系統(tǒng)最小能耗
6.2 在線仿真分析
圖6 在線算法與最優(yōu)離線算法的比較
圖7中online所示為100種場景下所得到的在線算法“性能比”曲線,可見其非常接近1。100種場景下的平均“性能比”為1.151,其中最大值和最小值分別為1.165和1.133。將作為一種在線算法進行比較,所得到的“性能比”并不接近1,因為其僅僅最小化了操作能耗。的“性能比”曲線其平均性能比為2.197,“性能比”最大值和最小值分別為2.297和2.111。而Lazy算法的“性能比”始終穩(wěn)定在1.45,比本文的在線優(yōu)化算法高出10%。由此可見,同時考慮操作能耗和切換能耗是十分必要的,兩者必須同時達到均衡點才能使總體能耗最接近最優(yōu)離線算法所得到的最優(yōu)解。
圖7 100組工作負載場景下“性能比”曲線
本文研究如何靜態(tài)(離線)/動態(tài)(在線)配置連續(xù)運行時隙的活躍服務器數(shù)量,以最小化數(shù)據(jù)中心能耗的問題。數(shù)值結果表明,本文所提出的離線最優(yōu)算法以較低的復雜度縮短了連續(xù)時隙運行時延,同時符合活躍服務器數(shù)量需為整數(shù)的要求,為在線算法提供最優(yōu)參考依據(jù)。仿真分析表明,本文提出的在線優(yōu)化算法,能夠動態(tài)適應外界負載的劇烈變化趨勢,始終較為謹慎地調整活躍服務器和休眠服務器的比例,始終以接近最優(yōu)的能耗代價維持數(shù)據(jù)中心的平穩(wěn)運行。進一步的工作可以分為兩方面,一是以實際云計算數(shù)據(jù)中心的真實海量數(shù)據(jù)為來源,印證和提高算法的可行性與實用性,二是研究負載調度與活躍服務器配置聯(lián)合的綜合策略。
[1] Chong F T, Heck M J R, Ranganathan P,Data center energy efficiency: improving energy efficiency in data centers beyond technology scaling[J].&, 2014, 31(1): 93-104.
[2] Li Jian, Shuang Kai, Su Sen,Reducing operational costs through consolidation with resource prediction in the cloud[C]. 12th IEEE/ACM International Symposium on Cloud and Grid Computing (CCGrid), Ottawa, Canada, 2012: 793-798.
[3] Wang Lin, Zhang Fa, Arjona Aroca J,GreenDCN: a general framework for achieving energy efficiency in data center networks[J]., 2014, 32(1): 4-15.
[4] Urgaonkar R, Kozat U C, Igarashi K,Dynamic resource allocation and power management in virtualized data centers[C]. IEEE/IFIP Network Operations and Management Symposium (NOMS), Osaka, Japan, 2010: 479-486.
[5] Guenter B, Jain N, and Williams C. Managing cost, performance, and reliability tradeoffs for energy-aware server provisioning[C]. 2011 Proceedings of IEEEInternational Conference on Computer Communications (INFOCOM), Shanghai, China, 2011: 1332-1340.
[6] Qureshi A, Weber R, Balakrishnan H,Cutting the electric bill for internet-scale systems[J]., 2009, 39(4): 123-134.
[7] Guo Yuan-xiong and Fang Yu-guang. Electricity cost saving strategy in data centers by using energy storage[J]., 2013, 24(6): 1149-1160.
[8] Rao Lei, Liu Xue, Xie Le,Minimizing electricity cost: Optimization of distributed internet data centers in a multi-electricity market environment[C]. 2010 Proceedings of IEEE International Conference on Computer Communications (INFOCOM), San Diego, CA, USA, 2010: 1-9.
[9] Cao Jun-wei, Li Ke-qin and Stojmenovic I. Optimal power allocation and load distribution for multiple heterogeneous multi-core server processors across clouds and data centers[J]., 2014, 63(1): 45-58.
[10] Beloglazov A, Buyya R, Lee Y C,A taxonomy and survey of energy-efficient data centers and cloud computing systems[J]., 2011, 82(2): 47-111.
[11] Wang Kai, Lin Ming-hong, Ciucu F,Characterizing the impact of the workload on the value of dynamic resizing in data centers[C]. ACM SIGMETRICS/Performance, London, United Kingdom, 2012: 405-406.
[12] Rabbani M G, Zhani M F, and Boutaba R. On achieving high survivability in virtualized data centers[J]., 2014, E97B(1): 10-18.
[13] Liu Zhen-hua, Lin Ming-hong, Adam W,. Greening geographical load balancing[C]. Proceedings ACM SIGMETRICS, San Jose, CA, USA, 2011: 233-244.
[14] Mathew V, Sitaraman R K, and Shenoy P. Energy-aware load balancing in content delivery networks[C]. Proceedings of the ACM SIGMETRICS Joint International Conference on Measurement and Modeling of Computer Systems, Orlando, FL, USA, 2012: 954-962.
[15] Gandhi A, Gupta V, Harchol Balter M,Optimality analysis of energy-performance trade-off for server farm management[J]., 2010, 67(11): 1155-1171.
[16] Lin Ming-hong, Wierman A, Andrew L L H,. Dynamic right-sizing for power-proportional data centers[J]./, 2013, 21(5): 1378-1391.
[17] Michael R G and Johnson D S. Computers and Intractability: A Guide to the Theory of NP-completeness[M]. San Francisco: WH Freeman & Co., 1979: 206-218.
Dynamic Active Servers Allocating Policy for Cloud Computing Data Centers
Wei Xing①②Zhang Jian-jun①②Shi Lei①Zhai Yan①
①(,,230009,)②(-,230009,)
Cloud computing data centers generally consist of a large number of servers connected via high speed network. One promising approach to saving energy is to maintain enough active severs in proportion to system load, while switch left servers to idle mode whenever possible. Then operating cost and switching cost is brought about respectively. The problem of right-sizing active severs to minimize energy consumption (total cost of operating and switching) in data centers is discussed. Firstly, the NP-hard model is established, and the characteristics of the optimal solution when omitting the switching cost are analyzed. Then by revising the solution procedure carefully, the recursive procedure is successfully eliminated. The optimal static algorithm with polynomial complexity is achieved. Finally, the online strategy is developed using the worst predicting load as the constraints. Simulation results show that the proposed offline and online algorithm can adapt the dramatic trend of external load and always carefully adjust the proportion of active servers, to guarantee minimum power consumption with a smooth computing process.
Cloud computing; Data center; Active servers; Offline optimal algorithm; Dynamic programming; Online algorithm
TP393
A
1009-5896(2015)08-2007-07
10.11999/JEIT141286
張建軍 jianjun@hfut.edu.cn
2014-10-09收到,2015-04-16改回,2015-06-09網(wǎng)絡優(yōu)先出版
國家自然科學基金(61370088),國家國際科技合作專項項目(2014DFB10060)和中央高?;究蒲袠I(yè)務費專項資金(2011HGBZ1321, 2012HGQC0012)資助課題
衛(wèi) 星: 男,1980年生,博士后,主要研究方向為計算機網(wǎng)絡、離散事件動態(tài)性能優(yōu)化.
張建軍: 男,1963年生,教授,主要研究方向為機電一體化、物聯(lián)網(wǎng)工程、新能源汽車、汽車電子.
石 雷: 男,1980年生,講師,主要研究方向為無線傳感網(wǎng).
翟 琰: 女,1977年生,講師,主要研究方向為汽車電子、嵌入式系統(tǒng).