趙 勉,李 燁
(上海理工大學 光電信息與計算機工程學院,上海 200093)
?
基于Q-Learning的虛擬機動態伸縮算法
趙勉,李燁
(上海理工大學 光電信息與計算機工程學院,上海200093)
摘要針對大規模云環境中業務量變化時平臺服務質量和資源消耗的問題,提出一種基于Q-Learning的虛擬機擴容/縮容決策算法。將該問題轉換為馬爾科夫決策模型,為了在業務平臺服務質量和資源消耗之間取得較好的平衡,智能體根據平臺當前狀態計算出最佳策略,執行決策并轉到下一狀態。仿真結果表明,該算法可根據業務量的變化實時作出伸縮決策,并提供最合適的虛擬機資源以滿足業務需求,且能提高平臺的穩定性。
關鍵詞云計算;虛擬機;動態伸縮;Q-Learning;資源利用率
Q-Learning Based Auto-scaling Algorithm for Virtual Machines
ZHAO Mian,LI Ye
(School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093,China)
AbstractTo solve the problem of service quality and resources cost when the service volume changed in large cloud environment,this paper proposes a scaling method for virtual machines based on the Q-Learning algorithm.First,the problem is modeled as a Markov decision process.In order to achieve a better balance between platform service quality and resources consuming,the agent outputs the best decision according to the current state of the platform.The platform executes the decision and transfers to the corresponding state.The simulation results show that the method can make scaling decisions in real time according to the change of service volume so as to provide appropriate resources of virtual machines matching the requirements of service.The method also can enhance the stability of the platform.
Keywordscloud computing;virtual machine;auto-scaling;Q-Learning;resource utilization
一個良好的云計算平臺應該具有高可擴展性、高可用性、高可靠性、能按需分配資源和負載均衡等特性。可伸縮性是分布式及并行計算中的重要指標之一,描述了應用系統通過改變可用硬件資源和調度方式來動態調整自身整體性能的能力[1]。在大規模虛擬環境系統中,利用云計算可伸縮性的特點,可根據業務的資源需求動態伸縮平臺資源,降低運營成本,提高資源利用率。
可伸縮性是當前云計算的研究熱點[2-3]。CloudScale[4]應用快速傅里葉變換識別資源并預測周期性的資源需求,以實現云平臺資源的動態伸縮。在文獻[5]中,利用自回歸滑動平均模型預測虛擬機負載以減少資源消耗。文獻[6~7]提出了混合多種算法的模型來預測虛擬機數量需求,能根據預測誤差自動選擇最優算法。……