Prediction-based memory pre-copying method

Through the combination of Markov prediction model and relative dirty page rate, real-time decision-making memory page migration is solved, and the problem of long migration time of virtual machines in cloud computing systems is achieved, and a more efficient memory migration strategy is implemented, which is suitable for a variety of application scenarios.

CN119201336AInactive Publication Date: 2024-12-27XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411217465.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When migrating virtual machines in cloud computing systems, the migration time in the pre-copy stage is difficult to effectively reduce, resulting in service interruption and downtime.

Method used

Using Markov prediction model and relative dirty page rate, establish a dirty page prediction model, track and record page status in real time, and only perform memory page migration when the prediction probability and relative dirty page rate exceed the threshold value, reducing unnecessary pages transmission.

Benefits of technology

It significantly reduces the migration time of virtual machines, improves migration performance, and is suitable for different types of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201336A_ABST
    Figure CN119201336A_ABST
Patent Text Reader

Abstract

The invention discloses a memory pre-copying method based on prediction, belongs to the field of Internet cloud computing application, and solves the problems that the page is repeatedly retransmitted and the migration time of a virtual machine is too long because the existing method cannot accurately predict whether the page of the virtual machine becomes dirty or not in a pre-copying stage. According to the method, whether the memory page becomes dirty or not is predicted by using the Markov prediction model and the concept of the relative dirty page rate, and a decision is made on when to migrate the memory page according to the predicted value. According to the method, the memory pages needing to be migrated in the pre-copying stage can be greatly reduced, so that the migration time of the VM is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to applications in the field of Internet cloud computing, and in particular to a memory pre-copy method based on prediction. Background Art

[0002] The use of virtualization technology in cloud computing systems can improve service availability and dynamic resource management, but server overload or maintenance may cause service interruption. Virtual machine migration technology can minimize service interruption and downtime. Virtual machine migration can be divided into pre-copy stage and downtime copy stage. Reducing the migration time in the pre-copy stage can greatly reduce the total migration time. Some research methods optimize the migration time in the pre-copy stage by predicting the probability of memory page becoming dirty. [1] Combined the Markov prediction model with Bayesian conditional probability, an algorithm was proposed to predict the probability of page becoming dirty. [2] Two methods were proposed to enhance the pre-copy method: disk cache and memory snapshot and detection of changes in the writable working set (WWS). In [3], the authors proposed two schemes for LRU stack distance and probability prediction and used memory compression techniques such as RLE, Huffman coding, MEMCOM, WKdm and LZ for efficient real-time memory migration. [4] A pre-filter-copy (PFC) algorithm was proposed. The proposed data filter can predict whether a page will become dirty.

[0003] The present invention proposes a memory pre-copy method based on prediction, which uses Markov chain and relative dirty page rate to predict whether the memory page is dirty, and makes a decision on when to migrate the memory page according to the predicted value. The method can greatly reduce the memory pages that need to be migrated in the pre-copy stage, thereby greatly reducing the migration time of the VM.

[0004] References

[0005] [1] Sun, Guo-fei, Gu, Jian-hua, Hu, Jin-hua, Zhao, Tian-hai, 2011. Improvement of livememory migration mechanism for virtual machine based on pre-copy. Comput. Eng.

[0006] 37(13),(July).

[0007] [2]Piao,Guangyong,Oh,Youngsup,Sung,Baegjae,Park,Chanik,2014.Efficientpre-

[0008] copy live migration with memory compaction and adaptive VM downtimecontrol.In:

[0009] Proceedings of the IEEE Fourth International Conference on Big Data and CloudComputing,3-5Dec,pp.85-90.

[0010] [3]Patel,Minal,Chaudhary,Sanjay,2014.Survey on a combined approach using prediction and compression to improve pre-copy for efficient live memorymigration onXen.International Conference on Parallel,Distributed and GridComputing

[0011] (PDGC2014),11-13Dec,pp.445-450.

[0012] [4] Ruan, Yonghui, Cao, Zhongsheng, Cui, Zongmin, 2016. Pre-filter-copy: efficient and self adaptive live migration of virtual machines. IEEE Syst.J.10(4),1459-1469,

[0013] (Dec). Summary of the invention

[0014] The present invention uses the Markov prediction model and the relative dirty page rate to accurately predict when the memory page of the VM becomes dirty, so as to make a decision on when to migrate the memory page. The present invention can greatly reduce the memory pages that need to be migrated in the pre-copy stage, thereby greatly reducing the migration time of the VM;

[0015] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0016] A memory pre-copy method based on prediction includes the following steps:

[0017] Step 1) Establishing a page dirty prediction model;

[0018] Step 2) Pre-copy the virtual machine memory page, including the following sub-steps:

[0019] 2.1. In the first round, all pages are copied to the target host;

[0020] 2.2. In other rounds, the status of the page is recorded, including the status to_send of whether the page became dirty in the previous round, the status to_skip of whether the page became dirty in this round, the status to_fix of high dirty page rate, and the historical status to_sendh of whether the page became dirty in each round, and whether the memory page will become dirty in the next round is predicted, which includes the following sub-steps:

[0021] 2.2.1. Use the prediction model in step 1) to calculate the probability that the page will become dirty in the next round;

[0022] 2.2.2. Use the historical state of the page to_sendh to calculate the relative dirty page rate;

[0023] 2.2.3. Based on the probabilities and relative dirty page rates calculated in steps 2.2.1 and 2.2.2, calculate the comprehensive probability of the page becoming dirty;

[0024] 2.2.4. If the comprehensive probability obtained in step 2.2.3 and the relative dirty page rate obtained in step 2.2.2 both exceed their respective threshold values, the page is not copied to the target host in this round; otherwise, the page is copied to the target host in this round;

[0025] Further, the prediction model in step 1) is expressed as: Among them, P ij =P(E i →E j )=P(E i |E j ), here, E i ,i=0,1,…,n is the status of the memory page, E0 means dirty, and E1 means read-only or not dirty. Where n is the number of states of the memory page. π1(0), π2(0), …, π n (0) represents the probability of the initial state;

[0026] Furthermore, the calculation formula of the relative dirty page rate in step 2.2.2 is: Among them, Tosendnum is the number of times the page becomes dirty obtained by using the historical state to_sendh of the page, and maxTosendnum is the maximum number of times the page becomes dirty among all pages;

[0027] Furthermore, the calculation formula of the comprehensive probability in step 2.2.3 is: P R =P×R, where P is the prediction model in step 1) and R is the relative dirty page rate in step 2.2.2).

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The present invention makes a decision on whether to migrate a page not only based on the predicted value of the Markov prediction model, but also based on the value of the relative dirty page rate. Since the relative dirty page rate is calculated based on the real data of whether the page becomes dirty in each round, the present invention can greatly reduce the number of transmissions of those pages with frequent dirty pages in the pre-copy stage compared with the memory pre-copy method based only on prediction, thereby reducing the migration time of the VM;

[0030] 2. The present invention will track and record the status of the page in real time during the pre-copy phase. The page access mode is closely related to the type of application executed on the VM, and the page status actually reflects the page access mode. This makes the method proposed by the present invention universally applicable regardless of how the type of application executed on the VM changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 Memory pre-copy flow chart

[0032] Figure 2 Performance comparison with other methods. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below with reference to the accompanying drawings and implementation examples;

[0034] A memory pre-copy method based on prediction includes the following steps:

[0035] Step 1) Establishing a page dirty prediction model;

[0036] Step 2) Pre-copy the virtual machine memory page, including the following sub-steps:

[0037] 2.1. In the first round, all pages are copied to the target host;

[0038] 2.2. In other rounds, the status of the page is recorded, including the status to_send of whether the page became dirty in the previous round, the status to_skip of whether the page became dirty in this round, the status to_fix of high dirty page rate, and the historical status to_sendh of whether the page became dirty in each round, and whether the memory page will become dirty in the next round is predicted, which includes the following sub-steps:

[0039] 2.2.1. Use the prediction model in step 1) to calculate the probability that the page will become dirty in the next round;

[0040] 2.2.2. Use the historical state of the page to_sendh to calculate the relative dirty page rate;

[0041] 2.2.3. Based on the probabilities and relative dirty page rates calculated in steps 2.2.1 and 2.2.2, calculate the comprehensive probability of the page becoming dirty;

[0042] 2.2.4. If the comprehensive probability obtained in step 2.2.3 and the relative dirty page rate obtained in step 2.2.2 both exceed their respective threshold values, the page is not copied to the target host in this round; otherwise, the page is copied to the target host in this round.

[0043] The present invention is run on a PC computer (Core i7, 3.33GHz, 6G RAM) with Windows 10 operating system and simulated using Matlab7.9.0 environment. The parameters of the simulation environment are shown in Table 1;

[0044] Table 1 Parameters of the simulation environment

[0045]

[0046] The downtime and total migration time are selected as performance indicators, and the traditional pre-copy method and the timing method are selected as the benchmark methods. The traditional pre-copy method transfers the page as long as the page becomes dirty, and the timing method calculates the dirty page rate based on historical data. When the threshold value is exceeded, the page is not transferred, otherwise, the page is transferred. The comparison between the present invention and the benchmark method in terms of the two indicators of downtime and total migration time is shown in the figure of the specification. Figure 2 As shown. The results show that the downtime and total migration time of the present invention are both shorter than the baseline method, especially after a certain number of rounds. This can be attributed to the dirty page strategy based on prediction and relative dirty page rate used in the present invention, which makes the present invention better than the traditional pre-copy method that transfers pages as soon as they become dirty. Compared with the timing method, the prediction function of the present invention can select pages that will become dirty in the future, reduce the number of transmissions of these pages, and thus improve the migration performance.

[0047] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A memory pre-copy method based on prediction, comprising the following steps: Step 1) Establishing a page dirty prediction model; Step 2) Pre-copy the virtual machine memory page, including the following sub-steps: 2.

1. In the first round, all pages are copied to the target host; 2.

2. In other rounds, the status of the page is recorded, including the status to_send of whether the page became dirty in the previous round, the status to_skip of whether the page became dirty in this round, the status to_fix of high dirty page rate, and the historical status to_sendh of whether the page became dirty in each round, and whether the memory page will become dirty in the next round is predicted, which includes the following sub-steps: 2.2.

1. Use the prediction model in step 1) to calculate the probability that the page will become dirty in the next round; 2.2.

2. Use the historical state of the page to_sendh to calculate the relative dirty page rate; 2.2.

3. Based on the probabilities and relative dirty page rates calculated in steps 2.2.1 and 2.2.2, calculate the comprehensive probability of the page becoming dirty; 2.2.

4. If the comprehensive probability obtained in step 2.2.3 and the relative dirty page rate obtained in step 2.2.2 both exceed their respective threshold values, the page is not copied to the target host in this round; otherwise, the page is copied to the target host in this round.

2. The memory pre-copy method based on prediction according to claim 1, characterized in that: The prediction model in step 1) is expressed as: Among them, P ij =P(E i →E j )=P(E i |E j ), here, E i ,i=0,1,…,n is the status of the memory page, E0 means dirty, and E1 means read-only or not dirty. Where n is the number of states of the memory page. π1(0), π2(0), …, π n (0) represents the probability of the initial state.

3. The memory pre-copy method based on prediction according to claim 1, characterized in that: The calculation formula of the relative dirty page rate in step 2.2.2 is: Among them, Tosendnum is the number of times the page becomes dirty obtained by using the historical state to_sendh of the page, and max Tosendnum is the maximum number of times the page becomes dirty among all pages.

4. The prediction-based memory pre-copy method according to claim 1, characterized in that: The calculation formula of the comprehensive probability in step 2.2.3 is: R P =P×R, where P is the prediction model in step 1) and R is the relative dirty page rate in step 2.2.

2.

5. The multi-target virtual machine integration method according to claim 1, characterized in that: The resource waste model in step 1) is expressed as: Where M represents the number of PMs, here, in, represents the capability of resource r owned by PMj, represents the VM's demand for resource r, x ij Indicates whether VMi is assigned to PMj, and N represents the number of VMs.