TWI434185B - Method and manager physical machine for virtual machine consolidation - Google Patents
Method and manager physical machine for virtual machine consolidation Download PDFInfo
- Publication number
- TWI434185B TWI434185B TW99145895A TW99145895A TWI434185B TW I434185 B TWI434185 B TW I434185B TW 99145895 A TW99145895 A TW 99145895A TW 99145895 A TW99145895 A TW 99145895A TW I434185 B TWI434185 B TW I434185B
- Authority
- TW
- Taiwan
- Prior art keywords
- host
- entity
- virtual
- resource
- hosts
- Prior art date
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Hardware Redundancy (AREA)
Description
本揭露是關於一種虛擬主機(virtual machine)合併方法與管理實體主機(manager physical machine)。The disclosure relates to a virtual machine merging method and a management physical machine.
如今,由於雲端計算(cloud computing)之趨勢,資料中心(data center)比以往更為重要。典型的資料中心包含數百或數千個實體主機(physical machine),諸如伺服器(server)。每一實體主機可容納多個虛擬主機在其上運行。資料中心的用戶可租借虛擬主機以執行其軟體應用程式。對於資料中心之業者而言,此基於虛擬主機之架構比直接基於實體主機之架構更容易管理且更有效益。具有多個虛擬主機之實體主機可同時服務多個用戶。經由虛擬主機比經由實體主機更容易實行用戶可用之資源限額。此外,虛擬主機比實體主機更穩健,因為虛擬主機可在實體主機發生故障的情況下遷移至另一實體主機,而不中斷提供至用戶的服務。Today, due to the trend of cloud computing, the data center is more important than ever. A typical data center contains hundreds or thousands of physical machines, such as servers. Each physical host can host multiple virtual hosts running on it. Users in the data center can rent virtual hosts to execute their software applications. For data center operators, this virtual host-based architecture is easier to manage and more efficient than a direct host-based architecture. An entity host with multiple virtual hosts can serve multiple users simultaneously. It is easier to implement a resource limit available to the user via the virtual host than via the physical host. In addition, virtual hosts are more robust than physical hosts because virtual hosts can migrate to another physical host in the event of a physical host failure without disrupting the services provided to the user.
對於運行大規模資料中心的業者而言,電費是一項沉重的負擔。電力消耗成本占整個硬體架構之總營運成本的比例可高達20%。時脈頻率之減小以及處理器之功率管理模式並無太大幫助,因為實體主機的一些組件(諸如記憶體及硬碟)之功率消耗不受時脈頻率及處理器之功率管理模式影響,節省電能之最佳方式為完全切斷冗餘實體主機的電源。For operators running large-scale data centers, electricity bills are a heavy burden. The cost of electricity consumption accounts for up to 20% of the total operating cost of the entire hardware architecture. The reduction in clock frequency and the power management mode of the processor are not very helpful, because the power consumption of some components of the physical host (such as memory and hard disk) is not affected by the clock frequency and the power management mode of the processor. The best way to save power is to completely cut off the power to the redundant physical host.
因此,本揭露提供一種虛擬主機合併方法。所述方法試圖在不使個別虛擬主機之效能降級的情況下使所需實體主機的數目最小化。換言之,所述方法試圖藉由將虛擬主機合併至最小數目的存活實體主機上而使待關機之冗餘實體主機的數目最大化。Therefore, the present disclosure provides a virtual host merging method. The method attempts to minimize the number of required physical hosts without degrading the performance of individual virtual hosts. In other words, the method attempts to maximize the number of redundant physical hosts to be shut down by merging virtual hosts onto a minimum number of surviving physical hosts.
本揭露亦提供一種用於虛擬主機合併之管理實體主機。所述管理實體主機執行上文提及之虛擬主機合併方法。所述管理實體主機試圖使虛擬主機合併所需之虛擬主機遷移次數最小化。另外,所述管理實體主機平行遷移虛擬主機,因此使完成所有虛擬主機遷移所需的時間最小化。The disclosure also provides a management entity host for virtual host consolidation. The management entity host performs the virtual host merging method mentioned above. The managed entity host attempts to minimize the number of virtual host migrations required for virtual host consolidation. In addition, the management entity host migrates virtual hosts in parallel, thus minimizing the time required to complete all virtual host migrations.
根據本揭露之一實施例,本揭露提供一種虛擬主機合併方法。所述方法由管理實體主機執行。一網路連接所述管理實體主機與多個伺服實體主機(server physical machine)。多個虛擬主機在所述伺服實體主機上運行。伺服實體主機提供N種資源且虛擬主機消耗資源。N為預設正整數。所述方法包含以下步驟。所述管理實體主機將所述伺服實體主機分類為冗餘實體主機及存活實體主機,其中在冗餘實體主機上運行之虛擬主機可根據一交錯N維優配遞減填充演算法(interleaved N-dimensional best-fit decreasing packing algorithm)而成功地遷移至存活實體主機。所述管理實體主機根據交錯N維優配遞減填充演算法及網路形態(network topology)決定在所述冗餘實體主機上運行之所述虛擬主機至所述存活實體主機的遷移路徑。所述管理實體主機基於所述遷移路徑決定在所述冗餘實體主機上運行之所述虛擬主機的平行遷移序列。所述管理實體主機根據所述平行遷移序列將在所述冗餘實體主機上運行之所述虛擬主機平行地遷移至所述存活實體主機。According to an embodiment of the disclosure, the disclosure provides a virtual host merging method. The method is performed by a management entity host. A network connects the management entity host with a plurality of server physical machines. A plurality of virtual hosts are running on the server entity host. The Servo Entity Host provides N kinds of resources and the virtual host consumes resources. N is a preset positive integer. The method comprises the following steps. The management entity host classifies the server entity host as a redundant entity host and a surviving entity host, wherein the virtual host running on the redundant entity host may perform an interleaved N-dimensional matching decompression filling algorithm (interleaved N-dimensional) Best-fit decreasing packing algorithm) successfully migrated to the surviving entity host. The management entity host determines a migration path of the virtual host running on the redundant entity host to the surviving entity host according to an interleaved N-dimensional matching deprecated padding algorithm and a network topology. The management entity host determines a parallel migration sequence of the virtual host running on the redundant entity host based on the migration path. The management entity host migrates the virtual host running on the redundant entity host to the surviving entity host in parallel according to the parallel migration sequence.
根據本揭露之另一實施例,本揭露提供一種管理實體主機。所述管理實體主機包含一記憶體及耦接至所述記憶體之一處理器。所述處理器執行上文提及之虛擬主機合併方法,且將所述方法之步驟所產生並由所述步驟使用的資料(諸如遷移路徑及平行遷移序列)儲存在記憶體中。According to another embodiment of the disclosure, the disclosure provides a management entity host. The management entity host includes a memory and a processor coupled to the memory. The processor executes the virtual host merging method mentioned above and stores the data generated by the steps of the method and used by the steps, such as migration paths and parallel migration sequences, in memory.
圖1為繪示根據本揭露之一實施例之資料中心之硬體架構的示意圖。在所述架構中,網路110連接管理實體主機120與多個伺服實體主機130。每一伺服實體主機130可容納在其上運行之一或多個虛擬主機。每一伺服實體主機提供N 種不同資源,諸如處理器週期(processor cycles)、記憶體、網路頻寬等。N 為預設正整數。虛擬主機利用且消耗由實體主機提供的資源。本實施例的目標之一是盡可能將所有虛擬主機合併至數量最少的實體主機上,並使遷移虛擬主機所需之時間最小化。在虛擬主機合併之後關閉冗餘實體主機的電源原則上有助於減少資料中心之電力成本。FIG. 1 is a schematic diagram showing a hardware architecture of a data center according to an embodiment of the present disclosure. In the architecture, network 110 connects management entity host 120 with a plurality of server entity hosts 130. Each servo entity host 130 can host one or more virtual hosts running thereon. Each servo entity host provides N different resources, such as processor cycles, memory, network bandwidth, and the like. N is a preset positive integer. The virtual host utilizes and consumes resources provided by the physical host. One of the goals of this embodiment is to consolidate all virtual hosts to the least number of physical hosts as much as possible and to minimize the time required to migrate virtual hosts. Turning off the power of the redundant physical host after the virtual host is merged in principle helps to reduce the power cost of the data center.
此實施例之虛擬主機合併在某種程度上類似於習知的向量裝箱(vector bin packing)問題。每一伺服實體主機130可用一個N維向量表示,此向量之每一元素對應於伺服實體主機所提供之一種資源的剩餘容量。類似地,每一虛擬主機可用一個N維向量表示,此向量之每一元素對應於虛擬主機之一種資源的消耗。上述虛擬主機合併問題之輸入為表示伺服實體主機及虛擬主機之向量,以及伺服實體主機與虛擬主機之間的容納關係(accommodation mapping)之詳細記錄。為了解決虛擬主機合併問題,所有伺服實體主機必須分類為冗餘實體主機及存活實體主機,接著在冗餘實體主機上運行之虛擬主機必須遷移至存活實體主機。為獲得最大效率,待關閉之冗餘實體主機數目應該最大化,而被遷移之虛擬主機數目以及遷移虛擬主機所需之時間應該最小化。The virtual host merging of this embodiment is somewhat similar to the conventional vector bin packing problem. Each servo entity host 130 can be represented by an N-dimensional vector, each element of which corresponds to the remaining capacity of a resource provided by the servo entity host. Similarly, each virtual host can be represented by an N-dimensional vector, each element of which corresponds to the consumption of a resource of the virtual host. The input of the above virtual host merge problem is a vector indicating the host of the servo entity and the virtual host, and a detailed record of the accommodation mapping between the host entity and the virtual host. In order to solve the virtual host consolidation problem, all servo entity hosts must be classified into redundant entity hosts and surviving entity hosts, and then the virtual hosts running on the redundant entity hosts must be migrated to the surviving entity hosts. For maximum efficiency, the number of redundant physical hosts to be shut down should be maximized, and the number of virtual hosts being migrated and the time required to migrate virtual hosts should be minimized.
習知向量裝箱問題與本實施例的虛擬主機合併問題之間存在許多差異。第一,習知向量裝箱問題中的箱子起初均為空箱,而此實施例之虛擬主機合併問題中之伺服實體主機起初已經由在其上運行之虛擬主機部分地填充。每一存活實體主機之每一資源之初始剩餘容量可能會不同。第二,此實施例的虛擬主機合併考慮到負載平衡。存活實體主機之最終剩餘容量應該儘可能相等。第三,某些虛擬主機可能因為其沉重負載而且不能承受遷移所導致之效能下降而不應遷移。此實施例的虛擬主機合併考慮到此類虛擬主機。第四,此實施例的虛擬主機合併藉由將遷移序列平行化而使遷移虛擬主機所需的時間最小化。There are many differences between the conventional vector packing problem and the virtual host merging problem of this embodiment. First, the boxes in the conventional vector boxing problem are initially empty, and the server entity in the virtual host merge problem of this embodiment has initially been partially populated by the virtual host running on it. The initial remaining capacity of each resource of each surviving entity host may be different. Second, the virtual host consolidation of this embodiment allows for load balancing. The final remaining capacity of the surviving physical host should be as equal as possible. Third, some virtual hosts may not migrate due to their heavy load and the performance degradation caused by migration. The virtual host consolidation of this embodiment takes into account such virtual hosts. Fourth, virtual host merging of this embodiment minimizes the time required to migrate virtual hosts by parallelizing the migration sequence.
圖2為繪示圖1中之管理實體主機120之示意圖。管理實體主機120包含記憶體124及耦接至記憶體124之處理器122。處理器122執行圖3至圖10中說明之虛擬主機合併方法的每一步驟以及所有計算。處理器122將上文提及之虛擬主機合併方法之步驟所使用的以及在所述步驟中產生的資料儲存在記憶體124中。舉例而言,記憶體124可儲存表示伺服實體主機及虛擬主機之上文提及之N維向量、伺服實體主機與虛擬主機之間的容納關係之詳細記錄、以及上文提及之虛擬主機合併方法所產生的佇列、遷移路徑、圖形及平行遷移序列。FIG. 2 is a schematic diagram of the management entity host 120 of FIG. 1. The management entity host 120 includes a memory 124 and a processor 122 coupled to the memory 124. Processor 122 performs each step and all calculations of the virtual host merging method illustrated in Figures 3-10. The processor 122 stores the data generated by the steps of the virtual host merging method mentioned above and generated in the steps in the memory 124. For example, the memory 124 can store a detailed record of the above-mentioned N-dimensional vector representing the servo entity host and the virtual host, the accommodation relationship between the servo entity host and the virtual host, and the virtual host merge mentioned above. The queues, migration paths, graphics, and parallel migration sequences produced by the method.
圖3為繪示本揭露之此實施例中之虛擬主機合併方法的流程圖。首先,管理實體主機檢查是否適宜觸發虛擬主機合併(步驟310)。若此時不適合觸發虛擬主機合併,則流程結束。若此時適合觸發虛擬主機合併,則管理實體主機將伺服實體主機分類為冗餘實體主機及存活實體主機,使得存活實體主機可容納所有虛擬主機,剩下的冗餘實體主機會被關閉電源以節省電力(步驟320)。管理實體主機根據一個交錯N維優配遞減填充演算法及網路形態決定在冗餘實體主機上運行之虛擬主機至存活實體主機的遷移路徑(步驟330)。所述管理實體主機基於所述遷移路徑決定在冗餘實體主機上運行之虛擬主機的平行遷移序列(步驟340)。所述管理實體主機根據平行遷移序列將在冗餘實體主機上運行之虛擬主機平行地遷移至存活實體主機(步驟350)。接下來,管理實體主機切斷冗餘實體主機之電源以節省電力成本(步驟360)。稍後將說明上文提及之各步驟的細節。FIG. 3 is a flow chart showing a virtual host merging method in this embodiment of the disclosure. First, the management entity host checks if it is appropriate to trigger a virtual host merge (step 310). If it is not appropriate to trigger a virtual host merge at this time, the process ends. If it is suitable to trigger virtual host merging at this time, the management entity host classifies the servant entity host as a redundant entity host and a surviving entity host, so that the surviving entity host can accommodate all virtual hosts, and the remaining redundant entity hosts are powered off. Power is saved (step 320). The management entity host determines a migration path from the virtual host running on the redundant entity host to the surviving entity host according to an interleaved N-dimensional superior depreciation padding algorithm and network configuration (step 330). The managed entity host determines a parallel migration sequence of virtual hosts running on the redundant physical host based on the migration path (step 340). The managed entity host migrates the virtual hosts running on the redundant physical host to the surviving physical host in parallel according to the parallel migration sequence (step 350). Next, the management entity host shuts off power to the redundant physical host to save power costs (step 360). Details of the steps mentioned above will be explained later.
在步驟310中,針對所有i 計算一系列數字(M 1 、M 2 、...、M N ),其中1<=i <=N 。數字M i 為根據一個一維優配遞減填充演算法(one-dimensional best-fit decreasing packing algorithm)所推算的容納所有虛擬主機之第i 資源之消耗所需的伺服實體主機的估計數量。舉例而言,若資源中之第三者為記憶體,則數字M 3 為根據一維優配遞減填充演算法所估計的容納所有虛擬主機之記憶體之總消耗所需的伺服實體主機的數量。接下來,計算數字M ,其中M =max{M 1 、M 2 、...、M N }。管理實體主機在M *K <P 時觸發虛擬主機合併,其中K 為預設常數且P 為伺服實體主機之數目。由於一維優配遞減填充演算法僅考慮伺服實體主機之單一資源之資源容量以及虛擬主機之單一資源之資源消耗,所以估計數量M i 稍為不準確。常數K 的一個目的為補償估計誤差。常數K 的另一目的為設定用於觸發虛擬主機合併之臨限值。In step 310, a series of numbers ( M 1 , M 2 , ..., M N ) are calculated for all i , where 1 <= i <= N . The number M i is an estimated number of servo entity hosts required to accommodate the consumption of the i-th resource of all virtual hosts, calculated from a one-dimensional best-fit decreasing packing algorithm. For example, if the third of the resources is memory, the number M 3 is the number of servo entity hosts required to accommodate the total consumption of the memory of all virtual hosts according to the one-dimensional superior depreciation filling algorithm. . Next, the number M is calculated, where M = max{ M 1 , M 2 , ..., M N }. The managed entity host triggers virtual host consolidation when M * K < P , where K is a preset constant and P is the number of servo entity hosts. Since the one-dimensional superior declining padding algorithm only considers the resource capacity of a single resource of the servo entity host and the resource consumption of a single resource of the virtual host, the estimated quantity M i is slightly inaccurate. One purpose of the constant K is to compensate for the estimation error. Another purpose of the constant K is to set a threshold for triggering virtual host merging.
圖4為對應於M i 之上文提及之一維優配遞減填充演算法的流程圖。首先,假定所有伺服實體主機皆為空機,其中都沒有虛擬主機在運行(步驟410)。將所有虛擬主機置於佇列中並按第i 種資源之消耗之遞減次序將佇列中之虛擬主機排序(步驟420)。接下來,自佇列中取出第一個虛擬主機(步驟430)。將所取出之虛擬主機指派至可容納所取出之虛擬主機之第i 資源之消耗的具有最小的第i 資源剩餘容量之伺服實體主機(步驟440)。步驟440中僅考慮伺服實體主機之第i 資源的容量及所取出之虛擬主機之第i 資源的消耗,而完全忽略其他資源之容量及其他資源之消耗。4 is a flow chart of one of the above-mentioned dimensions of the preferred decremental padding algorithm corresponding to M i . First, assume that all of the servo entity hosts are empty, with no virtual hosts running (step 410). All virtual hosts are placed in a queue and the virtual hosts in the queue are sorted in descending order of consumption of the i-th resources (step 420). Next, the first virtual host is taken from the queue (step 430). The fetched virtual host is assigned to a Serving Entity Host with a minimum i-th resource remaining capacity that can accommodate the consumption of the i-th resource of the fetched virtual host (step 440). In step 440, only the capacity of the i-th resource of the host entity and the consumption of the i-th resource of the fetched virtual host are considered, and the capacity of other resources and the consumption of other resources are completely ignored.
一個伺服實體主機的一種資源的初始剩餘容量等於此伺服實體主機的此資源的滿載容量。在本揭露之此實施例中,將伺服實體主機之每一種資源之滿載容量定義為此伺服實體主機之同一種資源之總量的一個預設百分比。此預設百分比未必是100%。實驗已證明,當伺服實體主機之資源之利用率接近100%時,伺服實體主機之電力消耗會呈指數式增長。對於每一伺服實體主機的每一種資源,都有一個理想臨限值,諸如70%、80%或90%,只要資源利用率不超過對應的理想臨限值,電力消耗就不會呈現指數式增長。伺服實體主機之理想臨限值可藉由實驗獲得。上文提及之每一伺服實體主機之每一資源之預設百分比等於此伺服實體主機之同一種資源之理想臨限值。The initial remaining capacity of a resource of a servant entity host is equal to the full capacity of this resource of the servant entity host. In this embodiment of the disclosure, the full capacity of each resource of the servo entity host is defined as a predetermined percentage of the total amount of the same resource of the host of the servo entity. This preset percentage is not necessarily 100%. Experiments have shown that when the utilization of the resources of the servo entity host approaches 100%, the power consumption of the servo entity host will increase exponentially. For each resource of each servo entity host, there is an ideal threshold, such as 70%, 80% or 90%. As long as the resource utilization does not exceed the corresponding ideal threshold, the power consumption will not be exponential. increase. The ideal threshold for the servo entity host can be obtained experimentally. The preset percentage of each resource of each of the servo entity hosts mentioned above is equal to the ideal threshold of the same resource of the host of this servo entity.
接下來,自所指派伺服實體主機之第i 資源之剩餘容量減去所取出虛擬主機之第i 資源之消耗,以更新所指派伺服實體主機之第i 資源的剩餘容量(步驟450)。接下來,檢查佇列是否為空(步驟460)。若佇列不為空則返回至步驟430。估計數量M i 為在圖4中說明之對應於第i 資源之一維優配遞減填充演算法中用於容納所有虛擬主機之伺服實體主機的數目。Next, since the host of the assigned physical servo remaining capacity of the resource i of the i-th subtracting the consumption of resources of the virtual hosts taken to update the remaining capacity of the i-th servo physical machine resources of the assigned (step 450). Next, it is checked if the queue is empty (step 460). If the queue is not empty, then return to step 430. The estimated number M i is the number of servo entity hosts for accommodating all virtual hosts in the one-dimensional matching depreciation filling algorithm corresponding to the i-th resource illustrated in FIG.
圖5為繪示圖3中步驟320中之伺服實體主機分類之細節的流程圖。首先,按資源利用率次序將所有伺服實體主機排序(步驟510)。伺服實體主機之資源利用率可以若干方式定義。舉例而言,資源利用率可定義為伺服實體主機之每一種資源之利用率百分比中的最大值。或者,資源利用率可定義為伺服實體主機之每一種資源之利用率百分比的總和或平均值。當使用上文提及之資源利用率定義其中之一時,伺服實體主機必須按資源利用率之遞增次序排序。FIG. 5 is a flow chart showing the details of the classification of the servo entity host in step 320 of FIG. First, all servo entity hosts are sorted in order of resource utilization (step 510). The resource utilization of the Servo Entity Host can be defined in several ways. For example, resource utilization can be defined as the maximum of the utilization percentage of each resource of the server entity host. Alternatively, the resource utilization may be defined as the sum or average of the utilization percentages of each of the resources of the servo entity host. When using one of the resource utilization definitions mentioned above, the Serving Entity Hosts must be ordered in ascending order of resource utilization.
或者,伺服實體主機之資源利用率可定義為此伺服實體主機之每一種資源之上文提及之理想臨限值與此伺服實體主機之相同資源之利用率百分比之間的差之總和。當使用此資源利用率定義時,伺服實體主機必須按資源利用率之遞減次序排序。Alternatively, the resource utilization of the Serving Entity Host may be defined as the sum of the difference between the above-mentioned ideal threshold for each of the resources of the Servo Entity and the utilization percentage of the same resource of the Servo Entity Host. When using this resource utilization definition, the Serving Entity Hosts must be ordered in descending order of resource utilization.
可能會有滿足預設的“不可移動”條件的一些虛擬主機,諸如非常忙的虛擬主機或有沉重負載的虛擬主機。在此情況下,此類虛擬主機不應遷移,且具有此類虛擬主機之伺服實體主機應分類為存活實體主機。當存在一或多個滿足預設條件之虛擬主機時,步驟510中之排序會稍有不同,使具有至少一個滿足預設條件之虛擬主機之伺服實體主機的排序次序在無滿足預設條件之虛擬主機之伺服實體主機之後。無滿足預設條件之虛擬主機之伺服實體主機則按如上文論述之資源利用率次序排序。There may be some virtual hosts that meet the preset "non-removable" conditions, such as very busy virtual hosts or heavily loaded virtual hosts. In this case, such virtual hosts should not be migrated, and the Serving Entity Hosts with such virtual hosts should be classified as surviving entity hosts. When there are one or more virtual hosts that meet the preset conditions, the ordering in step 510 may be slightly different, so that the sort order of the server host having at least one virtual host that satisfies the preset condition does not satisfy the preset condition. After the virtual host's server entity host. Servo entity hosts of virtual hosts that do not meet the pre-conditions are ordered in the order of resource utilization as discussed above.
接下來,初始化變數L 及R (步驟520)。用二分搜尋法找出已排序的伺服實體主機中之劃分點,將伺服實體主機分類為冗餘實體主機及存活實體主機。變數L 表示二分搜尋法搜尋範圍的起點,而變數R 表示二分搜尋法搜尋範圍的終點。變數L 之初始值為圖3中步驟310中使用之數目M ,且變數R 之初始值為所有伺服實體主機之數目P 。Next, the variables L and R are initialized (step 520). The binary search method is used to find the division points in the sorted servo entity host, and the servo entity host is classified into a redundant entity host and a surviving entity host. The variable L represents the starting point of the binary search method search range, and the variable R represents the end point of the binary search method search range. The initial value of the variable L is the number M used in step 310 of Figure 3, and the initial value of the variable R is the number P of all servo entity hosts.
接下來,檢查變數R 是否大於變數L (步驟530)。若變數R 小於或等於變數L ,則流程結束。若變數R 大於變數L ,則計算變數L 及R 之平均值i (步驟540)。去掉平均值i 的小數部分使得i 為整數且1<=i <=P 。接下來,將排序後之伺服實體主機之前i 個分類為冗餘實體主機,並且將排序後之伺服實體主機之後面(P -i )個分類為存活實體主機(步驟550)。執行交錯N維優配遞減填充演算法以瞭解在冗餘實體主機上運行之虛擬主機是否可成功遷移至存活實體主機(步驟560),且接著檢查交錯N維優配遞減填充演算法所傳回的結果(步驟570)。若所傳回的結果為成功,則將變數L 設定為i +1(步驟580)並返回至步驟530。若所傳回的結果為失敗,則將變數R 設定為i (步驟590)並返回至步驟530。Next, it is checked if the variable R is greater than the variable L (step 530). If the variable R is less than or equal to the variable L , the flow ends. If the variable R is greater than the variable L , the average value i of the variables L and R is calculated (step 540). The fractional part of the average value i is removed such that i is an integer and 1 <= i <= P . Next, the first i of the sorted servo entity hosts are classified as redundant entity hosts, and the sorted servo entity host back faces ( P - i ) are classified as surviving entity hosts (step 550). Performing an interlaced N-dimensional superior declining padding algorithm to see if the virtual host running on the redundant entity host can be successfully migrated to the surviving entity host (step 560), and then checking the interleaved N-dimensional superior declining padding algorithm. The result (step 570). If the returned result is successful, the variable L is set to i +1 (step 580) and the process returns to step 530. If the result of the return is a failure, the variable R is set to i (step 590) and the process returns to step 530.
步驟530-590之迴路中之二分搜尋法可根據交錯N維優配遞減填充演算法找出可以使在冗餘實體主機上運行之虛擬主機成功遷移至存活實體主機的最大i 。冗餘實體主機及存活實體主機之最終劃分是由步驟550之最後一次執行所決定。圖3的步驟330的遷移路徑是由步驟530-590的迴路中交錯N維優配遞減填充演算法的最後一次成功執行所決定。The binary search method in the loop of steps 530-590 can find the maximum i that can successfully migrate the virtual host running on the redundant entity host to the surviving entity host according to the interlaced N-dimensional superior decrement filling algorithm. The final partitioning of the redundant physical host and the surviving physical host is determined by the last execution of step 550. The migration path of step 330 of Figure 3 is determined by the last successful execution of the interlaced N-dimensional superior decremental padding algorithm in the loop of steps 530-590.
圖6為圖5的步驟560所執行之交錯N維優配遞減填充演算法的流程圖。首先,基於所有虛擬主機之資源之消耗計算對應於每一資源的標準化因數(步驟605)。自所有存活實體主機之第i 資源之容量總和中減去所有虛擬主機之第i 資源之消耗總和,接著將上述減法結果除以存活實體主機之數目,藉此計算對應於第i 資源之標準化因數,其中i 為整數且1<=i <=N 。6 is a flow chart of the interlaced N-dimensional superior decrement filling algorithm performed by step 560 of FIG. First, a normalization factor corresponding to each resource is calculated based on the consumption of resources of all virtual hosts (step 605). Subtracting the total consumption of the i-th resources of all virtual hosts from the sum of the capacity of the i-th resources of all surviving entity hosts, and then dividing the above-mentioned subtraction result by the number of surviving entity hosts, thereby calculating a normalization factor corresponding to the i-th resource Where i is an integer and 1<= i <= N .
接下來,基於標準化因數計算在冗餘實體主機上運行之每一虛擬主機之資源的標準化消耗以及在冗餘實體主機上運行之每一虛擬主機之代表性消耗(步驟607)。對於在冗餘實體主機上運行之任一虛擬主機,可將此虛擬主機之第i 資源之消耗除以對應於第i 資源之標準化因數,以計算此虛擬主機之第i 資源之標準化消耗。舉例而言,若一虛擬主機之資源消耗之N維向量為(v 1 、v 2 、...、v N ),則此虛擬主機之資源之標準化消耗為(v 1 /n 1 、v 2 /n 2 、...、v N /n N ),其中n i 為對應於第i 資源之標準化因數,1<=i <=N 。在冗餘實體主機上運行之每一虛擬主機之代表性消耗為此虛擬主機之所有資源之標準化消耗中的最大標準化消耗。舉例而言,若標準化消耗v 3 /n 3 為一虛擬主機之標準化消耗之N維向量(v 1 /n 1 、v 2 /n 2 、...、v N /n N )其中之最大值,則標準化消耗v 3 /n 3 為此此虛擬主機之代表性消耗。代表性消耗表示虛擬主機之整體資源消耗。Next, the standardized consumption of resources for each virtual host running on the redundant physical host and the representative consumption of each virtual host running on the redundant physical host are calculated based on the normalization factor (step 607). For any virtual host running on a redundant physical host, the consumption of the i-th resource of the virtual host can be divided by the normalization factor corresponding to the i-th resource to calculate the standardized consumption of the i-th resource of the virtual host. For example, if the N-dimensional vector of resource consumption of a virtual host is ( v 1 , v 2 , . . . , v N ), the standardized consumption of resources of the virtual host is ( v 1 / n 1 , v 2 ) / n 2 , ..., v N / n N ), where n i is a normalization factor corresponding to the ith resource, 1 <= i < =N . The representative consumption of each virtual host running on the redundant physical host consumes the largest standardized consumption of the standardized consumption of all resources of the virtual host. For example, if the standardized consumption v 3 / n 3 is the normalized consumption of a virtual host, the N-dimensional vector ( v 1 / n 1 , v 2 / n 2 , ..., v N / n N ) , then standardize consumption v 3 / n 3 for this representative consumption of this virtual host. The representative consumption represents the overall resource consumption of the virtual host.
接下來,根據每一虛擬主機之資源之標準化消耗,將在冗餘實體主機上運行之每一虛擬主機置於一或多個佇列中(步驟610)。上述佇列總共有N 個,且這N 個佇列與N 種資源之間存在一對一映射關係。將在冗餘實體主機上運行之每一虛擬主機置於對應於與此虛擬主機之代表性消耗相對應的資源之佇列中。舉例而言,若某一虛擬主機之代表性消耗為此虛擬主機之第二種資源之標準化消耗,則將此虛擬主機置於對應於N 種資源中之第二種資源之第二佇列中。每一個虛擬主機置於一個佇列中。Next, each virtual host running on the redundant physical host is placed in one or more queues according to the standardized consumption of resources for each virtual host (step 610). There are a total of N in the above-mentioned queues, and there is a one-to-one mapping relationship between the N queues and the N resources. Each virtual host running on the redundant physical host is placed in a queue corresponding to the resources corresponding to the representative consumption of this virtual host. For example, if the representative consumption of a virtual host consumes the standard consumption of the second resource of the virtual host, the virtual host is placed in the second queue corresponding to the second resource of the N resources. . Each virtual host is placed in a queue.
接下來,按代表性消耗之遞減次序將每一佇列中之虛擬主機排序(步驟615)。換言之,第i 佇列中之虛擬主機按對應於第i 資源之標準化消耗v i /n i 之遞減次序排序。Next, the virtual hosts in each queue are sorted in descending order of representative consumption (step 615). In other words, i-th queue by the virtual host resources corresponding to the i-th normalized consumption of v i / n i in descending order of the sort.
接下來,檢查所有佇列以瞭解是否所有佇列為空(步驟620)。若所有佇列為空,則表示在冗餘實體主機上運行之所有虛擬主機已成功地填充至存活實體主機中,傳回成功結果(步驟625)。否則,根據對應於上述資源之剩餘容量之標準化總和而自所述佇列中選擇一佇列(步驟630)。Next, check all queues to see if all queues are empty (step 620). If all queues are empty, it means that all virtual hosts running on the redundant entity host have been successfully populated into the surviving entity host, returning a successful result (step 625). Otherwise, a queue is selected from the queues according to a normalized sum corresponding to the remaining capacity of the resources (step 630).
為了自所述佇列中選擇一佇列,管理實體主機之處理器將每一種資源之所有存活實體主機之剩餘容量總和除以對應於此資源之標準化因數,藉此計算對應於每一種資源之剩餘容量的標準化總和。舉例而言,對應於第i 資源之剩餘容量的標準化總和是將存活實體主機之第i 資源之剩餘容量之和除以對應於第i 資源之標準化因數n i 而計算產生。管理實體主機之處理器可定義一個包括N -1個佇列的集合,除了對應於與最小的所述剩餘容量標準化總和對應之資源的佇列以外,此集合包括其餘的N -1個佇列。管理實體主機之處理器在此集合中之每一個佇列之第一個虛擬主機之中,選擇具有最大的代表性消耗的第一個虛擬主機所在的佇列。In order to select a queue from the queue, the processor of the management entity host divides the sum of the remaining capacity of all the surviving entity hosts of each resource by the normalization factor corresponding to the resource, thereby calculating corresponding to each resource. The standardized sum of remaining capacity. For example, corresponding to the i normalized sum of the remaining capacity of the resource is to survive the remaining capacity of the i-th physical machine resources divided by the normalization factor corresponding to the i n i is calculated to produce the resources. The processor managing the entity host may define a set comprising N - 1 queues, the set including the remaining N - 1 queues except for the queue corresponding to the resource corresponding to the smallest of the remaining capacity normalized sums . The processor managing the entity host selects the queue of the first virtual host with the largest representative consumption among the first virtual hosts in each of the sets.
接下來,自選定的佇列中取出第一個虛擬主機(步驟635)。上文提及之選擇準則保證上述選定的佇列非空。上文提及之佇列之交錯選擇確保了將虛擬主機平衡地填充至存活實體主機中。接下來,檢查以瞭解是否存在任何可容納所取出虛擬主機之所有資源之消耗的存活實體主機(步驟640)。若不存在可容納所取出虛擬主機之所有資源之消耗的存活實體主機,則傳回失敗結果(步驟650)。否則,將所取出虛擬主機指派至可容納所取出虛擬主機之所有資源之消耗的具有最小代表性剩餘容量的存活實體主機(步驟645)並返回至步驟620。Next, the first virtual host is taken from the selected queue (step 635). The selection criteria mentioned above ensure that the above selected queues are not empty. The staggered selection of the queues mentioned above ensures that the virtual host is balancedly populated into the surviving entity host. Next, a check is made to see if there are any surviving entity hosts that can accommodate the consumption of all resources of the fetched virtual host (step 640). If there is no surviving entity host that can accommodate the consumption of all of the resources of the fetched virtual host, then the failure result is returned (step 650). Otherwise, the fetched virtual host is assigned to a surviving physical host with the smallest representative remaining capacity consuming the consumption of all resources of the fetched virtual host (step 645) and returns to step 620.
為了指派所取出的虛擬主機,管理實體主機之處理器必須計算每一存活實體主機之代表性剩餘容量。每一存活實體主機之代表性剩餘容量為此實體主機之所有資源之標準化剩餘容量其中的最小值。若要計算某一個實體主機的某一種資源的標準化剩餘容量,可將此實體主機之此資源之剩餘容量除以對應於此資源之標準化因數。舉例而言,若某一個存活實體主機之資源之剩餘容量的N維向量為(p 1 ,p 2 ,...,p N ),則此實體主機之資源之標準化剩餘容量為(p 1 /n 1 ,p 2 /n 2 ,...,p N /n N ),其中n i 為對應於第i 資源之標準化因數,1<=i <=N 。此實體主機之代表性剩餘容量為標準化剩餘容量(p 1 /n 1 ,p 2 /n 2 ,...,p N /n N )其中的最小值。將步驟635中取出之虛擬主機指派至可容納所取出的虛擬主機之所有資源之消耗的具有最小代表性剩餘容量的存活實體主機。此優配策略有助於平衡虛擬主機在存活實體主機上的負載分佈。管理實體主機之處理器會自所指派的實體主機之資源之剩餘容量中減去所取出的虛擬主機之資源消耗,以更新所指派的實體主機之資源的剩餘容量。In order to assign the fetched virtual host, the processor managing the physical host must calculate the representative remaining capacity of each surviving physical host. The representative remaining capacity of each surviving entity host is the minimum of the standardized remaining capacity of all resources of this entity host. To calculate the standardized remaining capacity of a resource of an entity host, the remaining capacity of this resource of the entity host can be divided by the normalization factor corresponding to the resource. For example, if the N-dimensional vector of the remaining capacity of a resource of a surviving entity host is ( p 1 , p 2 , . . . , p N ), the normalized remaining capacity of the resource of the entity host is ( p 1 / n 1 , p 2 / n 2 , ..., p N / n N ), where n i is a normalization factor corresponding to the ith resource, 1 <= i <= N . The representative remaining capacity of this entity host is the minimum of the normalized residual capacity ( p 1 / n 1 , p 2 / n 2 , ..., p N / n N ). The virtual host fetched in step 635 is assigned to a surviving physical host with the smallest representative remaining capacity that can accommodate the consumption of all resources of the fetched virtual host. This optimization strategy helps balance the load distribution of virtual hosts on surviving physical hosts. The processor managing the entity host subtracts the resource consumption of the fetched virtual host from the remaining capacity of the resource of the assigned entity host to update the remaining capacity of the resource of the assigned entity host.
圖6的交錯N維優配遞減填充演算法具有兩個可選實施方案。第一可選方案已在上文中論述。下文描述第二可選方案。The interleaved N-dimensional superior declining padding algorithm of Figure 6 has two alternative implementations. The first alternative has been discussed above. The second alternative is described below.
第二可選方案在步驟610、630及635中不同於第一可選方案。在步驟610中,總共存在N *(N -1)個佇列。每一佇列對應於N 種資源中之兩者的不同排列。舉例而言,當N =3且資源為處理器週期、記憶體及網路頻寬時,三種資源中之任意兩者共有六種不同排列,即{處理器,記憶體}、{處理器,網路}、{記憶體,處理器}、{記憶體,網路}、{網路,處理器}及{網路,記憶體}。上文提及之範例中存在六個佇列,且六個佇列與六種排列之間存在一對一映射關係。對於在冗餘實體主機上運行之每一個虛擬主機,只要此虛擬主機之第i 資源之標準化消耗大於第j 資源之標準化消耗,就會被置於對應於先是第i 資源隨後是第j 資源之排列的佇列中。其中i 及j 均為整數,1<=i <=N ,1<=j <=N 且i 不等於j 。舉例而言,若某一虛擬主機之網路頻寬之標準化消耗大於虛擬主機之記憶體之標準化消耗,則虛擬主機被置於對應於{網路,記憶體}排列的佇列中。在第二可選方案中,一個虛擬主機可被置於多個佇列中,因為一個虛擬主機可能同時滿足多個佇列的準則。The second alternative is different from the first alternative in steps 610, 630, and 635. In step 610, there are a total of N *( N -1) queues. Each queue corresponds to a different arrangement of two of the N resources. For example, when N = 3 and the resource is processor cycle, memory, and network bandwidth, any two of the three resources have six different permutations, namely, {processor, memory}, {processor, Network}, {memory, processor}, {memory, network}, {network, processor} and {network, memory}. There are six queues in the example mentioned above, and there is a one-to-one mapping relationship between the six queues and the six arrays. For each virtual host running on the redundant entity host, as long as the standardized consumption of the i-th resource of the virtual host is greater than the standardized consumption of the j-th resource, it is placed corresponding to the first i-th resource and then the j-th resource. Arranged in the queue. Where i and j are integers, 1<= i <= N , 1<= j <= N and i is not equal to j . For example, if the standardized consumption of the network bandwidth of a virtual host is greater than the standardized consumption of the memory of the virtual host, the virtual host is placed in a queue corresponding to the {network, memory} arrangement. In a second alternative, one virtual host can be placed in multiple queues because one virtual host may satisfy multiple queue criteria at the same time.
在步驟630中,管理實體主機之處理器選擇對應於先是與最大的剩餘容量標準化總和對應的資源隨後是與最小的剩餘容量標準化總和對應的資源之排列的佇列。舉例而言,在每一資源之剩餘容量標準化總和中,若處理器週期之剩餘容量標準化總和為最大而且網路頻寬之剩餘容量標準化總和為最小,則管理實體主機之處理器選擇對應於{處理器,網路}排列的佇列。第二可選方案中佇列之交錯選擇亦可保證選定的佇列非空。In step 630, the processor of the management entity host selects a queue corresponding to the resource corresponding to the largest remaining capacity normalized sum and then the resource corresponding to the smallest remaining capacity normalized sum. For example, in the sum of the remaining capacity of each resource, if the sum of the remaining capacity of the processor cycle is the largest and the sum of the remaining capacity of the network bandwidth is the smallest, the processor selection of the managed entity host corresponds to { Processor, network} array of queues. The interleaving selection of the queue in the second alternative also ensures that the selected queue is not empty.
在步驟635中,除了自選定佇列中取出第一個虛擬主機外,管理實體主機之處理器亦自所有佇列移除所取出之虛擬主機,因為所取出之虛擬主機亦可能存在於其他佇列中。In step 635, in addition to taking the first virtual host from the selected queue, the processor of the management entity host also removes the extracted virtual host from all queues, because the extracted virtual host may also exist in other ports. In the column.
圖6中之其他步驟在第一可選方案及第二可選方案兩者之中皆相同。The other steps in Figure 6 are the same in both the first alternative and the second alternative.
在冗餘實體主機上運行之虛擬主機至存活實體主機之遷移路徑是由圖5中步驟560中執行之交錯N維優配遞減填充演算法的最後一次成功執行所決定。每一遷移路徑對應在冗餘實體主機上運行之虛擬主機其中之一。每一遷移路徑的起點為對應的虛擬主機在上面運行之冗餘實體主機,而且此遷移路徑的目的地為交錯N維優配遞減填充演算法之最後一次成功執行所指派之對應此虛擬主機的存活實體主機。每一遷移路徑之其餘部分可根據網路形態決定。舉例而言,每一遷移路徑之其餘部分可通過諸如交換器(switch)及路由器(router)等網路之路由元件,甚至通過由網路連接的其他實體主機。The migration path from the virtual host to the surviving entity host running on the redundant physical host is determined by the last successful execution of the interlaced N-dimensional superior depreciation padding algorithm performed in step 560 of FIG. Each migration path corresponds to one of the virtual hosts running on the redundant physical host. The starting point of each migration path is a redundant entity host on which the corresponding virtual host runs, and the destination of the migration path is the corresponding successful execution of the interleaved N-dimensional matching deprecated padding algorithm corresponding to the virtual host. Survival entity host. The rest of each migration path can be determined based on the network form. For example, the remainder of each migration path may pass through routing elements of the network, such as switches and routers, or even through other physical hosts connected by the network.
圖7為根據本揭露之一實施例的圖3中步驟340中決定平行遷移序列的流程圖。首先,定義一衝突圖(conflict graph)(步驟710)。衝突圖之每一節點表示遷移路徑其中之一。衝突圖之每一節點具有一權重,此權重表示將對應於特定節點之虛擬主機遷移至對應的存活實體主機所需之估計時間。由於遷移虛擬主機所需的時間主要花費在傳輸虛擬主機之記憶體內容上,所以可基於虛擬主機之記憶體消耗及遷移路徑之網路頻寬來估計遷移虛擬主機所需的時間。若對應於衝突圖中兩個節點之兩個遷移路徑有任何部分重疊,則這兩個節點之間存在一連線。衝突圖中之連線意謂對應於連線末端處的兩個節點的兩個虛擬主機由於其遷移路徑之重疊部分而不能平行遷移。FIG. 7 is a flow diagram of determining a parallel migration sequence in step 340 of FIG. 3 in accordance with an embodiment of the present disclosure. First, a conflict graph is defined (step 710). Each node of the conflict graph represents one of the migration paths. Each node of the conflict graph has a weight that represents the estimated time required to migrate a virtual host corresponding to a particular node to the corresponding surviving entity host. Since the time required to migrate the virtual host is mainly spent on the memory content of the transfer virtual host, the time required to migrate the virtual host can be estimated based on the memory consumption of the virtual host and the network bandwidth of the migration path. If there is any partial overlap of the two migration paths corresponding to the two nodes in the conflict graph, there is a connection between the two nodes. The connection in the conflict graph means that the two virtual hosts corresponding to the two nodes at the end of the connection cannot migrate in parallel due to the overlapping portion of their migration paths.
接下來,在衝突圖上使用最大節點著色演算法(maximum vertex-coloring algorithm)來找出一種包括所有節點的著色方式,使得此著色方式之各顏色的權重總和在所有可能的著色方式之中為最小(步驟720)。其中每一顏色的權重定義為此顏色之所有節點之權重的最大值。舉例而言,若衝突圖中某一些節點由最大節點著色演算法塗繪為黃色,則黃色之權重為所有黃色節點之權重的最大值。由於同一連線末端處的兩個節點始終由最大節點著色演算法以不同顏色塗繪,所以對應於同一顏色之節點之虛擬主機可平行遷移,因為其遷移路徑中不存在衝突。Next, use the maximum vertex-coloring algorithm on the conflict graph to find a coloring method that includes all nodes, so that the sum of the weights of the colors of this coloring method is among all possible coloring methods. Minimal (step 720). The weight of each color is defined as the maximum of the weights of all nodes of this color. For example, if some nodes in the conflict graph are painted yellow by the maximum node shading algorithm, the weight of yellow is the maximum weight of all yellow nodes. Since the two nodes at the end of the same line are always painted in different colors by the maximum node shading algorithm, the virtual hosts corresponding to the nodes of the same color can be migrated in parallel because there is no conflict in their migration path.
接下來,將對應於每一種顏色之節點的遷移路徑作為一批遷移路徑添加至平行遷移序列中(步驟730)。換言之,將對應於同一顏色之節點之遷移路徑作為一批遷移路徑添加至平行遷移序列中。將對應於另一顏色之節點之遷移路徑作為另一批遷移路徑添加至平行遷移序列中,依此類推。Next, the migration path corresponding to the node of each color is added to the parallel migration sequence as a batch migration path (step 730). In other words, the migration paths corresponding to the nodes of the same color are added to the parallel migration sequence as a batch migration path. The migration path corresponding to the node of another color is added to the parallel migration sequence as another batch migration path, and so on.
圖7中之流程可用於決定具有最小遷移時間之平行遷移序列。然而,步驟720之計算複雜度為NP-hard。一個資料中心可能具有數千個虛擬主機等待遷移,步驟720在此情況下可能會花費過多時間。為了加速平行遷移序列之決定,必須簡化此問題。The flow in Figure 7 can be used to determine parallel migration sequences with minimal migration times. However, the computational complexity of step 720 is NP-hard. A data center may have thousands of virtual hosts waiting to be migrated, and step 720 may take too much time in this case. In order to speed up the decision of the parallel migration sequence, this problem must be simplified.
圖8為根據本揭露之另一實施例的圖3中步驟340中決定平行遷移序列的流程圖。在此實施例中,藉由假定遷移每一虛擬主機所需之時間相同來簡化問題。首先,根據遷移路徑及網路形態定義一有向圖(directed graph)(步驟810)。有向圖之節點包含冗餘實體主機及存活實體主機,以及(若有必要)諸如交換器及路由器等網路之路由元件。上述有向圖其中之連線是由上述遷移路徑所定義。FIG. 8 is a flow diagram of determining a parallel migration sequence in step 340 of FIG. 3 in accordance with another embodiment of the present disclosure. In this embodiment, the problem is simplified by assuming that the time required to migrate each virtual host is the same. First, a directed graph is defined based on the migration path and network morphology (step 810). The nodes of the directed graph contain redundant physical hosts and surviving physical hosts, and, if necessary, routing elements for networks such as switches and routers. The connection in the above directed graph is defined by the above migration path.
接下來,在有向圖中找出不相交路徑之最大集合(maximum set of disjoint paths)(步驟820)。此為演算圖形理論(algorithmic graph theory)中之習知問題,目前已存在許多習知演算法,可用在有向圖中找出不相交路徑之最大集合。每一個不相交路徑之最大集合對應於一組可平行遷移之虛擬主機。接下來,將對應於此不相交路徑之最大集合之遷移路徑作為一批遷移路徑添加至平行遷移序列中(步驟830)。自有向圖移除對應於此不相交路徑之最大集合之連線(步驟840)。檢查以瞭解是否有向圖中仍存在至少一個連線(步驟850)。若有向圖中仍存在至少一個連線,則返回至步驟820。Next, the maximum set of disjoint paths are found in the directed graph (step 820). This is a well-known problem in algorithmic graph theory. There are many conventional algorithms that can be used to find the largest set of disjoint paths in a directed graph. The largest set of each disjoint path corresponds to a set of virtual hosts that can be migrated in parallel. Next, the migration path corresponding to the largest set of disjoint paths is added to the parallel migration sequence as a batch migration path (step 830). The own line map removes the line corresponding to the largest set of disjoint paths (step 840). Check to see if there is still at least one connection in the directed graph (step 850). If there is still at least one connection in the directed graph, then return to step 820.
圖9為根據本揭露之另一實施例的圖3中步驟340中決定平行遷移序列的流程圖。在此實施例中,藉由假定遷移每一虛擬主機所需之時間相同,而且兩個遷移路徑只要其起點實體主機不同且其目的地實體主機亦不同就不重疊,來進一步簡化問題。以上簡化適用於一些簡單網路,諸如藉由單一開關連接之多個伺服實體主機。首先,根據遷移路徑定義一個二分圖(bipartite graph)(步驟910)。此二分圖之節點為冗餘實體主機及存活實體主機。若存在自一冗餘實體主機至一存活實體主機之一遷移路徑,則此冗餘實體主機與此存活實體主機之間存在一連線。FIG. 9 is a flow chart of determining a parallel migration sequence in step 340 of FIG. 3 in accordance with another embodiment of the present disclosure. In this embodiment, the problem is further simplified by assuming that the time required to migrate each virtual host is the same, and the two migration paths do not overlap as long as their origin entity hosts are different and their destination entity hosts are different. The above simplification applies to some simple networks, such as multiple servo entity hosts connected by a single switch. First, a bipartite graph is defined based on the migration path (step 910). The nodes of this bipartite graph are redundant entity hosts and surviving entity hosts. If there is a migration path from a redundant physical host to a surviving physical host, there is a connection between the redundant physical host and the surviving physical host.
接下來,在二分圖中找出一個最大匹配(maximum matching)(步驟920)。此亦為演算圖形理論中之習知問題,已經有許多習知演算法可用在二分圖中以找出最大匹配。每一最大匹配對應於一組可平行遷移之虛擬主機。接下來,將對應於此最大匹配之遷移路徑作為一批遷移路徑添加至平行遷移序列中(步驟930)。自二分圖移除對應於此最大匹配之連線(步驟940)。檢查以瞭解是否二分圖中仍存在至少一個連線(步驟950)。若二分圖中仍存在至少一個連線,則返回至步驟920。Next, a maximum matching is found in the bipartite graph (step 920). This is also a well-known problem in the calculation of graph theory. There are many conventional algorithms that can be used in bipartite graphs to find the largest match. Each maximum match corresponds to a set of virtual hosts that can be migrated in parallel. Next, the migration path corresponding to this maximum match is added to the parallel migration sequence as a batch migration path (step 930). The line corresponding to this maximum match is removed from the bipartite graph (step 940). Check to see if there is still at least one connection in the bipartite graph (step 950). If at least one connection still exists in the bipartite graph, then return to step 920.
圖10為繪示根據本揭露之一實施例的圖3中步驟350中之平行遷移的流程圖。所述平行遷移可依據圖7、圖8或圖9的流程所決定的平行遷移序列。如上文論述,平行遷移序列包含一或多批遷移路徑。首先,選擇平行遷移序列中的第一批遷移路徑(步驟1010)。根據選定批次之遷移路徑將對應於選定批次之虛擬主機平行遷移至存活實體主機(步驟1020)。接下來,檢查以瞭解在目前的選定批次之後是否存在至少一批遷移路徑(步驟1030)。若在目前的選定批次之後存在至少一批遷移路徑,則選擇平行遷移序列中的下一批遷移路徑並返回至步驟1020(步驟1040)。FIG. 10 is a flow chart showing parallel migration in step 350 of FIG. 3 in accordance with an embodiment of the present disclosure. The parallel migration may be based on the parallel migration sequence determined by the flow of FIG. 7, FIG. 8, or FIG. As discussed above, a parallel migration sequence contains one or more batch migration paths. First, the first batch of migration paths in the parallel migration sequence is selected (step 1010). The virtual hosts corresponding to the selected batch are migrated in parallel to the surviving entity host according to the migration path of the selected batch (step 1020). Next, a check is made to see if there is at least one migration path after the current selected batch (step 1030). If there is at least one migration path after the current selected batch, the next migration path in the parallel migration sequence is selected and returned to step 1020 (step 1040).
圖11A至圖11H說明根據圖9之流程決定平行遷移序列之一範例。如圖11A所示,此實例包含四個冗餘實體主機、三個存活實體主機以及十個待遷移的虛擬主機。圖11A至圖11H的二分圖其中的每一個連線對應一條遷移路徑。首先,將對應於圖11B所示之三個連線之遷移路徑作為第一批遷移路徑添加至平行遷移序列。接下來,如圖11C所示移除三個連線。接下來,將對應於圖11D所示之三個連線之遷移路徑作為第二批遷移路徑添加至平行遷移序列。如圖11E所示移除三個連線。接下來,將對應於圖11F所示之兩個連線之遷移路徑作為第三批遷移路徑添加至平行遷移序列。如圖11G所示移除兩個連線。最後,將對應於圖11H所示之最後兩個連線之遷移路徑作為第四批遷移路徑添加至平行遷移序列。11A through 11H illustrate an example of determining a parallel migration sequence according to the flow of FIG. As shown in FIG. 11A, this example includes four redundant physical hosts, three surviving physical hosts, and ten virtual hosts to be migrated. Each of the wires of the bipartite graphs of FIGS. 11A to 11H corresponds to one migration path. First, the migration path corresponding to the three connections shown in FIG. 11B is added as a first batch migration path to the parallel migration sequence. Next, three connections are removed as shown in FIG. 11C. Next, the migration path corresponding to the three connections shown in FIG. 11D is added as a second batch migration path to the parallel migration sequence. The three connections are removed as shown in Figure 11E. Next, the migration path corresponding to the two lines shown in FIG. 11F is added as a third batch migration path to the parallel migration sequence. Remove the two wires as shown in Figure 11G. Finally, the migration path corresponding to the last two connections shown in FIG. 11H is added as a fourth batch migration path to the parallel migration sequence.
概括而言,以上實施例所提供之用於虛擬主機合併之方法及管理實體主機嘗試在不使個別虛擬主機之效能降級的情況下將可關機之冗餘實體主機數目最大化。所述方法及管理實體主機嘗試藉由平行化遷移序列而將完成所有虛擬主機遷移所需的時間最小化。所述方法及管理實體主機使用二分搜尋法以找出存活實體主機之最佳數目。所述方法及管理實體主機將具有輕負載之伺服實體主機分類為冗餘實體主機以盡量減少待遷移之虛擬主機數目。此外,所述方法及管理實體主機以交錯優配遞減方式將虛擬主機填充至存活實體主機中以取得更佳的合併結果,諸如負載平衡。In summary, the method for managing virtual host merging provided by the above embodiments and the management entity host attempt to maximize the number of redundant physical hosts that can be shut down without degrading the performance of the individual virtual hosts. The method and management entity host attempt to minimize the time required to complete all virtual host migrations by parallelizing the migration sequence. The method and management entity host uses a binary search method to find the optimal number of surviving entity hosts. The method and the management entity host classify the server entity with light load as a redundant entity host to minimize the number of virtual hosts to be migrated. In addition, the method and the management entity host populate the virtual host into the surviving entity host in an interleaved match decrement manner to achieve better merge results, such as load balancing.
雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露,任何所屬技術領域中具有通常知識者,在不脫離本揭露之精神和範圍內,當可作些許之更動與潤飾,故本揭露之保護範圍當視後附之申請專利範圍所界定者為準。The present disclosure has been disclosed in the above embodiments, but it is not intended to limit the disclosure, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the disclosure. The scope of protection of this disclosure is subject to the definition of the scope of the patent application.
110...網路110. . . network
120...管理實體主機120. . . Management entity host
122...處理器122. . . processor
124...記憶體124. . . Memory
130...伺服實體主機130. . . Servo entity host
310-360...流程步驟310-360. . . Process step
410-460...流程步驟410-460. . . Process step
510-590...流程步驟510-590. . . Process step
605-650...流程步驟605-650. . . Process step
710-730...流程步驟710-730. . . Process step
810-850...流程步驟810-850. . . Process step
910-950...流程步驟910-950. . . Process step
1010-1040...流程步驟1010-1040. . . Process step
圖1為繪示根據本揭露之一實施例之資料中心之硬體架構的示意圖。FIG. 1 is a schematic diagram showing a hardware architecture of a data center according to an embodiment of the present disclosure.
圖2為繪示根據本揭露之一實施例之用於虛擬主機合併之管理實體主機的示意圖。2 is a schematic diagram of a management entity host for virtual host merging according to an embodiment of the disclosure.
圖3為繪示根據本揭露之一實施例之虛擬主機合併方法的流程圖。FIG. 3 is a flow chart showing a virtual host merging method according to an embodiment of the present disclosure.
圖4至圖10為繪示根據本揭露之實施例之虛擬主機合併方法的更詳細流程圖。4 to 10 are more detailed flowcharts of a virtual host merging method according to an embodiment of the present disclosure.
圖11A至圖11H為繪示根據本揭露之一實施例之平行遷移序列之產生之一實例的示意圖。11A-11H are schematic diagrams showing an example of generation of a parallel migration sequence according to an embodiment of the present disclosure.
310-360...流程步驟310-360. . . Process step
Claims (30)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW99145895A TWI434185B (en) | 2010-12-24 | 2010-12-24 | Method and manager physical machine for virtual machine consolidation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW99145895A TWI434185B (en) | 2010-12-24 | 2010-12-24 | Method and manager physical machine for virtual machine consolidation |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201227329A TW201227329A (en) | 2012-07-01 |
TWI434185B true TWI434185B (en) | 2014-04-11 |
Family
ID=46933190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW99145895A TWI434185B (en) | 2010-12-24 | 2010-12-24 | Method and manager physical machine for virtual machine consolidation |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI434185B (en) |
-
2010
- 2010-12-24 TW TW99145895A patent/TWI434185B/en active
Also Published As
Publication number | Publication date |
---|---|
TW201227329A (en) | 2012-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8745234B2 (en) | Method and manager physical machine for virtual machine consolidation | |
Farzai et al. | Multi-objective communication-aware optimization for virtual machine placement in cloud datacenters | |
US8924392B2 (en) | Clustering-based resource aggregation within a data center | |
WO2016090946A1 (en) | Method and device for mapping virtual data centre resources | |
CN108108224B (en) | Virtual machine placement method in cloud data center based on ant colony optimization algorithm | |
US20130212578A1 (en) | Optimizing traffic load in a communications network | |
EP2524322A2 (en) | A virtualization and consolidation analysis engine for enterprise data centers | |
US11588884B2 (en) | Utilizing network analytics for service provisioning | |
US20190018698A1 (en) | Optimizing virtual machine placement for multi-destination traffic | |
CN110221920A (en) | Dispositions method, device, storage medium and system | |
CN110851235A (en) | Virtual network function deployment method suitable for multidimensional resource optimization configuration | |
CN113630328A (en) | Data center virtual network mapping method and system | |
Yang et al. | Reliable virtual machine placement in distributed clouds | |
Im et al. | Tight bounds for online vector scheduling | |
CN116501594B (en) | System modeling evaluation method and device, electronic equipment and storage medium | |
Mihailescu et al. | Optimized application placement for network congestion and failure resiliency in clouds | |
Yao et al. | VM migration planning in software-defined data center networks | |
TWI434185B (en) | Method and manager physical machine for virtual machine consolidation | |
WO2015055502A2 (en) | Method of partitioning storage in a distributed data storage system and corresponding device | |
Portaluri et al. | Multi objective virtual machine allocation in cloud data centers | |
Ajmera et al. | Dynamic Virtual Machine Scheduling Using Residual Optimum Power-Efficiency In The Cloud Data Center | |
CN110958192A (en) | Virtual data center resource allocation system and method based on virtual switch | |
Esnault et al. | Energy-aware distributed ant colony based virtual machine consolidation in IaaS Clouds bibliographic study | |
CN118076945A (en) | Cloud-local workload optimization | |
Lu et al. | NPIY: A novel partitioner for improving mapreduce performance |