陳舒
摘要:在基礎(chǔ)設(shè)施作為一種服務(wù)(Infrastructure-as-a-Service, IaaS)云計(jì)算環(huán)境下,計(jì)算資源以租賃形式提供給遠(yuǎn)端客戶(hù),一個(gè)云用戶(hù)可以同時(shí)請(qǐng)求多個(gè)云服務(wù)。這種情況下,云環(huán)境下的并行處理能夠提高其系統(tǒng)性能。在云計(jì)算環(huán)境中應(yīng)用并行處理技術(shù)時(shí),需要實(shí)現(xiàn)合理的資源分配和任務(wù)執(zhí)行順序安排機(jī)制。該文就目前國(guó)內(nèi)外的相關(guān)機(jī)制和技術(shù)進(jìn)行整理和分析。
關(guān)鍵詞:基礎(chǔ)設(shè)施作為一種服務(wù);云計(jì)算;并行處理
中圖分類(lèi)號(hào):TP393 文獻(xiàn)標(biāo)識(shí)碼:A 文章編號(hào):1009-3044(2017)30-0067-03
Research on Parallel Processing Technology in IaaS Cloud Computing Environment
CHEN Shu
(Department of Computer and Information Security Management, Fujian Police Academy, Fuzhou 350001, China)
Abstract: In Infrastructure-as-a-Service (IaaS) cloud computing environment, computing resources are leased to remote clients, and a cloud user can request multiple cloud services at the same time. In this case, parallel processing in cloud environment can improve the performance of the system. When applying parallel processing technology in cloud computing environment, it is necessary to implement reasonable resource allocation and task execution scheduling mechanism. In this paper, the relevant mechanisms and technologies at home and abroad are collated and analyzed.
Key words: IaaS; Cloud computing;Parallel processing
云計(jì)算是繼20世紀(jì)80年代大型計(jì)算機(jī)到客戶(hù)端-服務(wù)器的大轉(zhuǎn)變之后,資源和服務(wù)分配的又一巨變。云計(jì)算中,云是通過(guò)網(wǎng)絡(luò)向遠(yuǎn)程用戶(hù)提供按需計(jì)算資源或服務(wù)的一個(gè)分布式計(jì)算機(jī)群集[1]。在基礎(chǔ)設(shè)施作為一種服務(wù)(IaaS)的云中,資源或服務(wù)以租賃的形式提供給用戶(hù)。
依托于自由且高效的虛擬化解決方案,例如,Xen超級(jí)監(jiān)督程序[2],用戶(hù)可以安全地控制資源。 IaaS云的優(yōu)點(diǎn)之一是提供給最終用戶(hù)的計(jì)算能力是靈活且高效的。亞馬遜的彈性計(jì)算云中虛擬機(jī)(VMs)以每小時(shí)10美分的價(jià)格租賃給用戶(hù)。其中每個(gè)VM大概有1.2 GHz Opteron處理器的計(jì)算能力,1.7 GB內(nèi)存和160 GB磁盤(pán)空間。例如,當(dāng)一個(gè)用戶(hù)需要一定的磁盤(pán)空間來(lái)維護(hù)某個(gè)數(shù)據(jù)庫(kù)一個(gè)月,他可以從云中租用一定數(shù)量的虛擬機(jī),使用一個(gè)月后再返還云中。這種情況下,用戶(hù)使數(shù)據(jù)庫(kù)維護(hù)費(fèi)用減至最低。用戶(hù)可以添加或刪除云資源,以滿(mǎn)足峰值或起伏不定的服務(wù)需求,只需為所使用的資源容量支付相應(yīng)費(fèi)用。
1 存在的問(wèn)題
隨著云計(jì)算的日益普及,它被應(yīng)用到生活中的各個(gè)方面[3]。然而,現(xiàn)實(shí)社會(huì)中不存在具有無(wú)限容量的數(shù)據(jù)中心。因此,在大量的客戶(hù)需求前提下,將數(shù)據(jù)中心某些溢出的工作負(fù)載轉(zhuǎn)移到另一個(gè)數(shù)據(jù)中心是必要的[4]。這些工作負(fù)載共享可以發(fā)生在私有云和公共云之間,私有云之間或公共云之間。工作負(fù)載共享能夠擴(kuò)大資源池容量,并提供更靈活和便宜的資源。在多個(gè)云之間協(xié)作執(zhí)行工作負(fù)載,監(jiān)控和管理機(jī)制是一個(gè)關(guān)鍵組成部分,需要考慮其配置,調(diào)度,監(jiān)控和故障管理[4]。傳統(tǒng)的監(jiān)控和管理機(jī)制是專(zhuān)為企業(yè)環(huán)境而設(shè)計(jì)的,特別是一個(gè)統(tǒng)一的環(huán)境。然而,大規(guī)模、異構(gòu)資源供應(yīng)的多數(shù)據(jù)中心給資源管理和監(jiān)控機(jī)制帶來(lái)嚴(yán)峻的挑戰(zhàn)。例如,Open Cirrus,一個(gè)云計(jì)算試驗(yàn)臺(tái),由14個(gè)分布在世界各地,并且由不同領(lǐng)域管理的數(shù)據(jù)中心組成。每個(gè)數(shù)據(jù)中心獨(dú)立管理至少1000個(gè)核[5],整個(gè)試驗(yàn)臺(tái)是一個(gè)異構(gòu)聯(lián)合云系統(tǒng)。對(duì)監(jiān)測(cè)和管理機(jī)制來(lái)說(shuō),在多數(shù)據(jù)中心環(huán)境下向客戶(hù)提供不需要處理太多復(fù)雜問(wèn)題的資源池,如資源異構(gòu)和工作負(fù)載分配等,是非常重要的。云計(jì)算的虛擬化技術(shù),如虛擬機(jī),近年來(lái)已經(jīng)社會(huì)各界進(jìn)行深入研究。然而,在相關(guān)文獻(xiàn)中,跨越多個(gè)異構(gòu)數(shù)據(jù)中心的工作負(fù)載調(diào)度并沒(méi)有得到很好的解決。
大量大型數(shù)據(jù)集計(jì)算的應(yīng)用程序運(yùn)行在云系統(tǒng)上[6]。這些“大數(shù)據(jù)”應(yīng)用程序從信息源,如數(shù)字媒體庫(kù),虛擬世界,仿真軌跡,科學(xué)儀器獲得的數(shù)據(jù)和企業(yè)的業(yè)務(wù)數(shù)據(jù)庫(kù)獲得數(shù)據(jù)。這些數(shù)據(jù)饑餓應(yīng)用程序需要大量可擴(kuò)展的計(jì)算資源。幸運(yùn)的是,這些應(yīng)用程序具有非常良好的并行計(jì)算性[6]。云計(jì)算中使用“map/reduce”方法進(jìn)行應(yīng)用程序開(kāi)發(fā),大規(guī)模的批處理過(guò)程可以被劃分為一組離散的相關(guān)處理進(jìn)程,稱(chēng)之為任務(wù)。這些任務(wù)可以被并行執(zhí)行,以提高響應(yīng)時(shí)間[7]。在聯(lián)邦快遞(FedEx)數(shù)據(jù)中心,需要四個(gè)小時(shí)的批處理過(guò)程,應(yīng)用“map/reduce”方法之后,可以成功地將運(yùn)行時(shí)間減少到20分鐘 [7]。在執(zhí)行這些可采用并行處理方式的任務(wù)時(shí),需要考慮以下幾個(gè)問(wèn)題:
(1) 如何將資源分配給任務(wù);
(2) 因?yàn)槿蝿?wù)間有數(shù)據(jù)依賴(lài)關(guān)系,執(zhí)行任務(wù)的順序該如何安排;
(3) 當(dāng)虛擬機(jī)準(zhǔn)備接受、終止或切換任務(wù)時(shí),該如何進(jìn)行費(fèi)用管理。endprint
資源分配和調(diào)度可以解決以上三個(gè)問(wèn)題。在高性能計(jì)算[8,9]和嵌入式系統(tǒng) [10,11] 中已經(jīng)對(duì)資源分配和任務(wù)調(diào)度進(jìn)行了深入研究。然而,云數(shù)據(jù)中心的高度自治性和資源異質(zhì)性[3],以及虛擬技術(shù)的實(shí)現(xiàn),在IaaS云計(jì)算中需要不同的資源分配和任務(wù)調(diào)度算法,特別是在聯(lián)合異構(gòu)多云系統(tǒng)中。
2 相應(yīng)的工作
近幾年,云計(jì)算系統(tǒng)已經(jīng)被進(jìn)行廣泛研究。許多公有云也對(duì)客戶(hù)和研究人員開(kāi)放使用,如亞馬遜的AWS[12],GoGrid[13]和Rackspace[14]。其他一些公司也提供云服務(wù),如微軟[15],IBM[16],谷歌[17]和HP[18]。為有益于云計(jì)算的研究,許多組織提供開(kāi)源云服務(wù),如Eucalyptus[19],Open Nebula[20],Tashi[6],RESEVOIR[21]和Open Cirrus[22]。Open Cirrus是一個(gè)云計(jì)算試驗(yàn)臺(tái),它由14個(gè)分布在世界各地的數(shù)據(jù)中心組成,從本質(zhì)上講,它是一個(gè)聯(lián)合異構(gòu)云系統(tǒng)。
2.1 數(shù)據(jù)密集型應(yīng)用程序
數(shù)據(jù)密集型應(yīng)用程序是運(yùn)行在云計(jì)算平臺(tái)上的主要應(yīng)用類(lèi)型。大多數(shù)的數(shù)據(jù)密集型應(yīng)用程序可以通過(guò)MapReduce的編程模型[23]進(jìn)行建模。在MapReduce模型中,用戶(hù)指定map函數(shù)和reduce函數(shù),前者可以獨(dú)立執(zhí)行,后者收集前者的處理結(jié)果并產(chǎn)生最終的結(jié)果。運(yùn)行時(shí),系統(tǒng)會(huì)自動(dòng)將map函數(shù)并行化處理,并將它們合理分配到云系統(tǒng)中。Apache Hadoop是受MapReduce思想啟發(fā)的一個(gè)流行框架,用于在IaaS云系統(tǒng)中運(yùn)行數(shù)據(jù)密集型應(yīng)用程序。在Hadoop框架中,可靠性保證和數(shù)據(jù)遷移都是對(duì)用戶(hù)透明的。MapReduce編程模型和Hadoop分布式文件系統(tǒng)是在開(kāi)源Hadoop框架下實(shí)現(xiàn)的。All-pairs,一種高層次抽象化形式,使數(shù)據(jù)密集型應(yīng)用程序易于表達(dá)且執(zhí)行高效[24]。Liu等人,設(shè)計(jì)一種用來(lái)處理大規(guī)模數(shù)據(jù)密集型批處理應(yīng)用程序的編程模型GridBatch[25]。在GridBatch模型中,用戶(hù)可以指定數(shù)據(jù)如何分割,并決定計(jì)算任務(wù)的分布情況,隱藏并行編程的復(fù)雜性。文獻(xiàn)[26] 設(shè)計(jì)一種動(dòng)態(tài)分割模型來(lái)提高M(jìn)apReduce平臺(tái)的資源利用率。這個(gè)動(dòng)態(tài)分割模型實(shí)現(xiàn)基于優(yōu)先級(jí)的資源分配方法以及資源使用管道。文獻(xiàn)[27]中通過(guò)軟硬件的服務(wù)等級(jí)協(xié)議(SLA)對(duì)各種數(shù)據(jù)密集型服務(wù)調(diào)度方法進(jìn)行評(píng)估。但是,在異構(gòu)多云平臺(tái)環(huán)境下的工作負(fù)載調(diào)度問(wèn)題在上述相關(guān)工作中并沒(méi)有被考慮。
2.2 虛擬化技術(shù)
虛擬化技術(shù)是云計(jì)算中一個(gè)重要組成部分。Emeneker等人提出一種圖像緩存機(jī)制來(lái)減少虛擬機(jī)加載磁盤(pán)映像的能耗[28]。Fallenbeck等人提出一種用動(dòng)態(tài)方法創(chuàng)建虛擬集群,處理并行和串行工作之間的沖突[8]。這種方法在不運(yùn)行時(shí)間預(yù)測(cè)前提下對(duì)工作負(fù)載進(jìn)行自動(dòng)調(diào)整。文獻(xiàn)[36]利用掛起/恢復(fù)機(jī)制來(lái)提高物理資源的利用率,從而降低能耗。由于該文獻(xiàn)所考慮的VM模型是同構(gòu)的,所以該調(diào)度算法在異構(gòu)虛擬機(jī)環(huán)境中是不適用的。
2.3 計(jì)算資源管理
大量文獻(xiàn)對(duì)云計(jì)算的計(jì)算資源管理進(jìn)行深入研究。為方便用戶(hù)共同管理資源,CloudNet[50]通過(guò)企業(yè)物理主機(jī)提供虛擬私有云,并通過(guò)公共云對(duì)它們進(jìn)行分配。計(jì)算密集型用戶(hù)可以保留計(jì)算資源,根據(jù)自身需求特點(diǎn)創(chuàng)建自己的虛擬私有云[29-34]。然而,CloudNet專(zhuān)注于為企業(yè)用戶(hù)提供安全到云端的鏈接,資源合理分配不是CloudNet的主要目標(biāo)。以租賃為基礎(chǔ)的體系結(jié)構(gòu)[35,36],被廣泛用于為云用戶(hù)提供保留資源。文獻(xiàn)[35]中,應(yīng)用程序可以通過(guò)租賃或票務(wù)方式來(lái)保留來(lái)自多個(gè)站點(diǎn)的一組資源。 Haizea[36]支持盡力而為和提前預(yù)訂兩種租賃方式,這兩種租賃方式的優(yōu)先級(jí)是不同的,它們提高整個(gè)系統(tǒng)的利用率。這兩篇文獻(xiàn)的作業(yè)模型是批處理作業(yè)模型,這意味著每一個(gè)應(yīng)用程序的調(diào)度都是獨(dú)立的,任務(wù)間不存在數(shù)據(jù)依賴(lài)性。因此,這種方法不能在多數(shù)據(jù)中心之間“map/reduce”和并行處理。
Wilde等人設(shè)計(jì)一種分布式計(jì)算的腳本語(yǔ)言Swift[37]。Swift專(zhuān)注于大型獨(dú)立計(jì)算任務(wù)的并發(fā)執(zhí)行,組成和協(xié)調(diào)。Swift中實(shí)現(xiàn)一種基于資源可用性的含自適應(yīng)調(diào)度算法的工作負(fù)載平衡機(jī)制,設(shè)計(jì)了一種動(dòng)態(tài)評(píng)分系統(tǒng)來(lái)對(duì)一個(gè)站點(diǎn)的負(fù)載承受能力提供經(jīng)驗(yàn)估算。但是在Swift中,只有當(dāng)站點(diǎn)執(zhí)行工作出現(xiàn)故障時(shí),其分值才會(huì)下降。因此,即使是“延遲但成功”地完成作業(yè),也將導(dǎo)致該站點(diǎn)下一輪運(yùn)行的估計(jì)完成時(shí)間較長(zhǎng)。ReSS是Swift中的資源選擇服務(wù)。但是,ReSS需要一個(gè)中央信息庫(kù),來(lái)收集來(lái)自不同節(jié)點(diǎn)或集群的信息。
文獻(xiàn)[38]中設(shè)計(jì)一種可以自動(dòng)擴(kuò)展其基礎(chǔ)設(shè)施資源共享的系統(tǒng),自適應(yīng)管理器監(jiān)視資源并自動(dòng)給用戶(hù)動(dòng)態(tài)分配資源。然而,這種集中的方式不適合未來(lái)的多提供商云計(jì)算環(huán)境,因?yàn)椴煌墓?yīng)商不希望這樣的集中化管理控制方式。文獻(xiàn)[39]提出另一種資源共享方式,它是在不侵犯站點(diǎn)各自自主權(quán)前提下,可以在不同站點(diǎn)之間交換主機(jī)。數(shù)據(jù)中心的主機(jī)代理負(fù)責(zé)本地?cái)?shù)據(jù)中心與其他數(shù)據(jù)中心之間進(jìn)行主機(jī)交易過(guò)程,這是一種多數(shù)據(jù)中心之間共享資源的分布式方法。但是,該文獻(xiàn)沒(méi)有考慮資源分配優(yōu)化問(wèn)題。
3 結(jié)束語(yǔ)
隨著客戶(hù)需求的激增,云計(jì)算正在迅速增長(zhǎng),在客戶(hù)的需求不斷擴(kuò)大情況下,多個(gè)數(shù)據(jù)中心甚至多個(gè)云服務(wù)提供商之間共享工作負(fù)載是必要的。工作負(fù)載的共享能夠擴(kuò)大資源池,并提供更靈活和便宜的資源。但目前缺少一種適用于未來(lái)的多提供商,并且改善聯(lián)合異構(gòu)云系統(tǒng)性能的云系統(tǒng),這將是我下一步研究和探索的方向。
參考文獻(xiàn):
[1] Germain-Renaud C,Rana O, The convergence of clouds, grids, and autonomics. IEEE Internet Computing. v13 i6. 9endprint
[2] Sotomayor B, Montero R, Llorente I. et al. Virtual infrastructure management in private and hybrid clouds. IEEE Internet Computing. v13 i5. 14-22.
[3] http://www.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-28.pdf
[4] Forell T, Milojicic D, Talwar V. Cloud management challenges and opportunities, in: IEEE International Symposium on Parallel and Distributed, 2011, pp. 881-889.
[5] Avetisyan A I, Campbell R, Gupta M T, et al. Open Cirrus a global cloud computing testbed. IEEE Computer. v43 i4. 35-43.
[6] Kozuch M A, Ryan M P,Gass R, et al. Cloud management challenges and opportunities, in: Workshop on Automated control for datacenters and cloud, 2009, pp. 43-48.
[7] http://www.gartner.com/it/content/1286700/1286717
[8] Fallenbeck N, Picht H, Smith M, et al. Xen and the art of cluster scheduling, in: Proceedings of the 2nd International Workshop on Virtualization Technology in Distributed Computing, Tampa, Florida, USA, 2006, p. 4.
[9] Huang H, Wang L.a combined push-pull model for resource monitoring in cloud computing environment, in: IEEE International Conference on Cloud Computing, Miami, Florida, USA, 2010, pp. 260-266
[10] Rimal B P, Choi E, Lumb I. A taxonomy and survey of cloud computing systems, in: International Joint Conference on INC, IMS and IDC, 2009, pp. 44-51.
[11] Qiu, M. and Sha, E.H.-M., Cost minimization while satisfying hard/soft timing constraints for heterogeneous embedded systems. ACM Transactions on Design Automation of Electronic Systems (TODAES). v14 i2. 1-30.
[12] http://www.gogrid.com/
[13] http://www.rackspacecloud.com/
[14] http://www.microsoft.com/en-us/cloud/
[15] http://www.ibm.com/ibm/cloud/
[16] http://www.google.com/apps/intl/en/business/index.html
[17] HP cloud, http://www8.hp.com/us/en/solutions/solutionsdetail.html?compURI=tcm:245-300983&pageTitle=cloud.
[18] http://www.eucalyptus.com/
[19] www.reservoir-fp7.eu
[20] C. Moretti, J. Bulosan, P.J. Thain, D. Flynn, All-pairs: an abstraction for data-intensive cloud computing, in: IEEE International Symposium on Parallel and Distributed Processing, 2008, pp. 1-11.
[21] www.reservoir-fp7.eu
[22] Avetisyan, A.I., Campbell, R., Gupta, M.T., Heath, I., Ko, S.Y. and Ganger, G.R., Open Cirrus a global cloud computing testbed. IEEE Computer. v43 i4. 35-43.
[23] Dean, J. and Ghemawat, S., MapReduce: simplified data processing on large clusters. Communications of the ACM. v1. 107-113.endprint
[24] A. Pavlo, E. Paulson, A. Rasin, D.J. Ababi, D. DeWitt, S. Madden, M. Stonebraker, A comparison of approaches to large-scale data analysis, in: SIGMOD, 2009, pp. 1-14.
[25] Open computing facility - ocf, https://computing.llnl.gov/?set=resources&page=OCF-resource.
[26] Wilde, M., Hategan, M., Wozniak, J.M., Clifford, B., Katz, D.S. and Foster, I., Swift: a language for distributed parallel scripting. Parallel Computing. v37 i9. 633-652.
[27] Chi, H.J.M.Y. and Hacigumus, H., Performance evaluation of scheduling algorithms for database services with soft and hard SLAs. In: International Workshop on Data Intensive Computing in the Clouds, pp. 1-10.
[28] W. Emeneker, D. Stanzione, Efficient virtual machine caching in dynamic virtual clusters, in: SRMPDS Workshop of International Conference on Parallel and Distributed Systems, Hsinchu, Taiwan, 2007.
[29] Aron, M., Druschel, P. and Zwaenepoel, W., Cluster reserves: a mechanism for resource management in cluster-based network servers. In: Proceedings of the ACM Sigmetrics, Santa Clara, California, USA.
[30] G. Garzoglio, T. Levshina, P. Mhashilkar, S. Timm, ReSS: a resource selection service for the open science grid, in: International Symposium on Grid Computing, 2007, pp. 1-10.
[31] J.S. Chase, D.E. Irwin, L.E. Grit, J.D. Moore, S. Sprenkle, Dynamic virtual clusters in a grid site manager, in: International Symposium on High-Performance Distributed Computing, HPDC, Seattle, Washington, USA, 2003, pp. 90-103.
[32] X. Wang, J. Zhang, H. Liao, L. Zha, Dynamic split model of resource utilization in mapreduce, in: International Workshop on Data Intensive Computing in the Clouds, 2011, pp. 1-10.
[33] M.A. Kozuch, M.P. Ryan, R. Gass, S.W. Schlosser, D. O'Hallaron, et al. Cloud management challenges and opportunities, in: Workshop on Automated control for datacenters and cloud, 2009, pp. 43-48.
[34] https://www.hpl.hp.com/techreports/2011/HPL-2011-129.pdf
[35] Hagras, T. and Janecek, J., A high performance, low complexity algorithm for compile-time task scheduling in heterogeneous systems. Parallel Computing. v31 i7. 653-670.
[36] B. Sotomayor, R. Llorente, I. Foster, Resource leasing and the art of suspending virtual machines, in: 11th IEEE International Conference on High Performance Computing and Communications, Seoul, Korea, 2009, pp. 59-68.
[37] T. Wood, A. Gerber, K. Ramakrishnan, J. vander Merwe, The case for enterprise-ready virtual private clouds, in: Workshop on Hot Topics in Cloud Computing, San Diego, Califoria, USA, 2009.
[38] W. Smith, I. Foster, V. Taylor, Scheduling with advanced reservations, in: IEEE International Parallel and Distributed Processing Symposium, Cancun, Mexico, 2000, pp. 127-132.
[39] P. Ruth, J. Rhee, D. Xu, R. Kennell, S. Goasguen, Autonomic live adaptation of virtual computational environments in a multi-domain infrastructure, in: IEEE International Conference on Autonomic Computing, 2006:5-14.endprint