WO2025243103A1 - 内存超分处理方法以及系统 - Google Patents

内存超分处理方法以及系统

Info

Publication number
WO2025243103A1
WO2025243103A1 PCT/IB2025/053505 IB2025053505W WO2025243103A1 WO 2025243103 A1 WO2025243103 A1 WO 2025243103A1 IB 2025053505 W IB2025053505 W IB 2025053505W WO 2025243103 A1 WO2025243103 A1 WO 2025243103A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
virtual machines
time period
determining
performance loss
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/IB2025/053505
Other languages
English (en)
French (fr)
Inventor
罗宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloud Intelligence Singapore Holding Pvt Ltd
Original Assignee
Cloud Intelligence Singapore Holding Pvt Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloud Intelligence Singapore Holding Pvt Ltd filed Critical Cloud Intelligence Singapore Holding Pvt Ltd
Publication of WO2025243103A1 publication Critical patent/WO2025243103A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • embodiments of this specification provide a memory over-allocation processing method.
  • This specification relates to one or more embodiments of a memory super-distribution processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical defects in the prior art where persistent page faults lead to reduced host machine performance and decreased operational stability.
  • a memory super-distribution processing method applied to a host machine running multiple virtual machines.
  • the method includes: determining page fault state data of the multiple virtual machines in a first historical time period; determining performance loss results of the multiple virtual machines based on the page fault state data; determining predicted cold page data of the multiple virtual machines in a future time period based on historical cold page data of the multiple virtual machines in a second historical time period, wherein the duration of the second historical time period is less than or equal to the duration of the first historical time period, and the duration of the second historical time period is the same as the duration of the future time period; and determining a memory super-distribution index of the multiple virtual machines in the future time period based on the performance loss results and the predicted cold page data.
  • a memory super-division processing system applied to a host machine, the host machine running multiple virtual machines, the system comprising: a status data determination unit, configured to determine page fault status data of the multiple virtual machines in a first historical time period; A performance loss result determination unit is configured to determine the performance loss result of the plurality of virtual machines based on the page fault status data; a cold page data determination unit is configured to determine the predicted cold page data of the plurality of virtual machines in a future time period based on the historical cold page data of the plurality of virtual machines in a second historical time period, wherein the duration of the second historical time period is less than or equal to the duration of the first historical time period, and the duration of the second historical time period is the same as the duration of the future time period; a memory over-distribution index determination unit is configured to determine the memory over-distribution index of the plurality of virtual machines in the future time period based on the performance loss result and the predicted cold page data.
  • a computing device including: a memory and a processor; the memory is used to store computer programs/instructions, and the processor is used to execute the computer programs/instructions, wherein the computer programs/instructions, when executed by the processor, implement the steps of the above-described memory over-distribution processing method.
  • a computer-readable storage medium is provided, which stores computer programs/instructions, wherein the computer programs/instructions, when executed by a processor, implement the steps of the above-described memory over-distribution processing method.
  • a computer program product including a computer program/instructions that, when executed by a processor, implement the steps of the above-described memory over-division processing method.
  • This specification provides a memory over-distribution processing method in one embodiment.
  • the predicted cold page data of the multiple virtual machines in future time periods can be determined to obtain the upper limit of memory over-distribution that the multiple virtual machines can handle.
  • the memory over-distribution index of the multiple virtual machines in future time periods is determined. Considering the handling capacity of the multiple virtual machines, the available virtual memory is increased, reducing the page replacement pressure and address translation pressure during the operation of each virtual machine. This reduces the probability of a decrease in host machine memory performance and I/O performance, and further improves the stability of host machine memory and the stability of host machine operation.
  • Figure 1 is a specific application scenario diagram of a memory super-resolution processing method provided in one embodiment of this specification
  • Figure 2 is a flowchart of a memory super-resolution processing method provided in one embodiment of this specification
  • Figure 3 is a flowchart of the processing procedure of a memory super-resolution processing method provided in one embodiment of this specification
  • Figure 4 is a structural schematic diagram of a memory super-resolution processing system provided in one embodiment of this specification
  • Figure 5 is a structural block diagram of a computing device provided in one embodiment of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first.
  • the word “if” as used herein may be interpreted as “when,” “when,” or “in response to a determination.”
  • the user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
  • Host operating system The operating system of the host machine, which can manage various resources on the host machine.
  • Guest operating system The guest operating system running in the virtualization environment, which can manage various resources in the virtual machine.
  • Memory overcommitment Can be understood as excessive memory allocation, a memory allocation strategy that allows temporarily unused memory from one guest to be borrowed for use by other guests or by the host.
  • Overallocation quota The amount of memory exceeding the allocated memory limit. Memory overallocation can be understood as the excess memory load that a single guest needs to handle.
  • Holt-Winters model Also known as the triple exponential smoothing model, it's a time series forecasting model used to predict future values of time series.
  • Page fault Also known as a page miss, page fault, page fault interrupt, hard error, hard interrupt, etc., it refers to an interrupt that occurs when software (such as a virtual machine) attempts to access a memory page that is mapped in the virtual address space but not loaded into physical memory.
  • Central Processing Unit CPU
  • CPU Central Processing Unit
  • guest memory overallocation can help improve the utilization of host memory resources; to improve the utilization of host memory resources, quotas can be allocated to each guest to swap out the corresponding pages for each guest. This specification provides an embodiment of a quota allocation scheme, specifically, distributing the total memory excess of the host evenly among each guest.
  • one embodiment of this specification provides an alternative quota allocation scheme, specifically allocating quotas based on the load of each guest.
  • real-time quota allocation can significantly degrade host performance.
  • failure to allocate quotas to guests with high loads in a timely manner will cause guests to perform continuous and frequent paging and address switching operations during operation, also leading to a significant reduction in host performance. In more severe cases, it can cause significant performance fluctuations in the host, making stable operation impossible.
  • Figure 1 illustrates a specific application scenario of a memory super-division processing method provided according to an embodiment of this specification.
  • Figure 1 includes a client 102, a host machine 104, and multiple virtual machines 106 running on the host machine 104.
  • the client 102 can be understood as a mobile phone, tablet, laptop, desktop computer, smart bracelet, smartwatch, etc.
  • the host machine 104 can be understood as the client 102, or as other servers, including but not limited to a single physical server, a physical server cluster, a single cloud server, a cloud server cluster, etc.
  • Virtual machines 106 can be understood as complete computer systems with full hardware system functionality, running in a completely isolated environment within the host machine 104.
  • the host machine 104 is understood as a server other than the client 102
  • the client 102 and the host machine 104 can communicate through connection methods including but not limited to wired connections and wireless connections.
  • the user can use any one or more virtual machines 106 running on the host machine 104 within the client 102.
  • the host machine provides memory support to each virtual machine 106, that is, allocates memory to each virtual machine 106. Since each virtual machine 106 does not simultaneously use all the memory allocated to it, there is a situation where the utilization rate of total memory (i.e., the sum of the memory allocated to each virtual machine) is low. Therefore, the host machine 104 can perform memory over-allocation for each virtual machine 106. Specifically, the host machine 104 determines the page fault status data of multiple virtual machines 106 in the first historical time period. By using the page fault status data of multiple virtual machines 106, it determines the page fault situation of multiple virtual machines 106 and the impact of page faults, and evaluates the performance loss results of multiple virtual machines 106.
  • the method determines the performance loss of these VMs, thereby identifying the host machine performance (e.g., memory performance, I/O performance) loss caused by page faults. Furthermore, by utilizing historical cold page data from the VMs in a second historical time period, the method determines the predicted cold page data for future time periods, thus obtaining the upper limit of memory over-distribution that the VMs can handle. Based on the performance loss results of the VMs and the predicted cold page data for future time periods, the method determines the future performance of the VMs.
  • the host machine performance e.g., memory performance, I/O performance
  • the memory over-allocation metric considering the capacity of multiple virtual machines, increases the available virtual memory, reduces page replacement and address translation pressures during virtual machine operation, thereby reducing the probability of host machine memory performance and I/O performance degradation, and further improving the host machine's operational stability. Furthermore, it can also improve the operational stability of virtual machines used by users and running on the host machine, thus enhancing the user experience. See Figure 2, which shows a flowchart of a memory over-allocation processing method according to an embodiment of this specification, applied to a host machine running multiple virtual machines, specifically including the following steps.
  • Step 202 Determine the page fault status data of the multiple virtual machines in a first historical time period.
  • the host machine can be understood as the aforementioned host machine 104.
  • Page fault status data can be understood as data describing page fault events and/or the impact of page faults.
  • page fault status data can be understood as the occurrence of page fault events (e.g., number of page faults), page fault types (e.g., major page fault, minor page fault), page fault causes (e.g., first access, insufficient memory leading to replacement, shared resource access), page fault rate, page fault impacts (response time, CPU utilization, CPU performance, disk I/O performance), etc.
  • the first historical time period can be understood as one or more historical time periods.
  • a first historical time period can be understood as from 10:30:00 on January 1, 2024 to 10:30:05 on January 1, 2024.
  • a first historical time period can be understood as from 10:30:00 AM to 11:00:00 AM on January 1, 2024, or from 10:30:00 AM to 10:30:00 PM on January 1, 2024, and so on.
  • the page fault state data of the virtual machine in the first historical time period can be understood as the page fault state data of the virtual machine where the data timestamp is located in the first historical time period.
  • the memory over-splitting processing method provided in this specification can perform memory over-splitting processing according to a scheduling cycle, that is, perform memory over-splitting once every scheduling cycle.
  • the memory over-splitting processing server can calculate the first historical time period based on the current scheduling moment.
  • the specific implementation method is as follows: Before determining the page fault state data of the multiple virtual machines in the first historical time period, it further includes: determining the current scheduling moment and a preset duration, and determining the first historical time period based on the current scheduling moment and the preset duration, wherein the current scheduling moment is the starting point of the future time period.
  • the current scheduling moment can be understood as the start moment of the current memory over-splitting processing server performing memory over-splitting processing
  • the preset duration can be understood as one or more pre-set time dimensions to analyze the page fault state data of multiple virtual machines under one or more time dimensions.
  • the future time period can be understood as the time period that corresponds to the current scheduling cycle. For example, if the length of the scheduling cycle is set to 5 seconds, and the current scheduling time is 10:30:00 on January 1, 2024, then the time period corresponding to the current scheduling cycle is from 10:30:00 on January 1, 2024 to 10:30:05 on January 1, 2024. Based on this, the future time period can be understood as from 10:30:00 on January 1, 2024 to 10:30:05 on January 1, 2024.
  • the starting point of a time period can be understood as the beginning of a time interval.
  • the starting point of a time interval can be understood as the earliest moment of that time interval, or the latest moment of that time interval.
  • this specification uses the example of understanding the starting point of a time interval as the earliest moment and the ending point of a time interval as the latest moment for illustrative purposes.
  • the current scheduling time and preset duration are determined.
  • the first historical time period is determined. This can be understood as taking the current scheduling time as a time endpoint and the preset duration as a duration. Based on the time endpoint and the duration, a corresponding time starting point can be determined. Then, the time period between the time starting point and the time endpoint is determined as the first historical time period. For example, if the current scheduling time is 10:30:00 on January 1, 2024, and the preset duration is 5 seconds, the first historical time period can be determined as from 10:29:55 on January 1, 2024 to 10:30:00 on January 1, 2024.
  • This specification provides a memory over-splitting method that, by utilizing the current scheduling time and a preset duration, determines a first historical time period.
  • page fault status data of multiple virtual machines within the first historical time period closer to the current scheduling time, thereby improving the accuracy of subsequent memory over-splitting based on the page fault status data of multiple virtual machines within the first historical time period.
  • memory over-splitting is performed in each scheduling cycle, allowing for dynamic memory over-splitting based on the dynamic information of each virtual machine. This further reduces the probability of host machine memory performance and I/O performance degradation, and improves the stability of host machine operation.
  • page fault status data can be determined from multiple time dimensions.
  • the preset duration includes a first preset duration, a second preset duration, and a third preset duration; determining the first historical time period based on the current scheduling time and the preset duration includes: determining three first historical time periods based on the current scheduling time, the first preset duration, the second preset duration, and the third preset duration.
  • the first, second, and third preset durations can be understood as three preset durations of different lengths.
  • the first preset duration can be understood as 5 seconds, the second preset duration as half an hour, and the third preset duration as 12 hours; or, the first preset duration can be understood as 10 seconds, the second preset duration as 1 minute, and the third preset duration as 1 hour.
  • the settings of the first, second, and third preset durations can be set according to actual needs, and this specification does not limit this. Furthermore, for ease of explanation, this specification uses the example of the first preset duration being less than the second preset duration, and the second preset duration being less than the third preset duration, for subsequent explanation and description, but this specification is not limited to this size limitation relationship.
  • the first preset duration can be understood as the time length used to observe sudden page misses
  • the second preset duration can be understood as the time length used to observe short-term page misses
  • the third preset duration can be understood as the time length used to observe long-term page misses.
  • sudden page misses, short-term page misses, and long-term page misses are three types of events.
  • Page fault states in the time dimension A sudden page fault can be understood as a memory page fault caused by a sudden loading of a page that exceeds the physical memory limit, resulting in the page not being stored in physical memory.
  • a short-term page fault can be understood as a page that will not be used for a short period (e.g., half an hour, an hour) in the physical memory, and is loaded from memory to disk when memory is insufficient, but will be used after that short period, resulting in a page fault for that page.
  • a long-term page fault can be understood as a page fault caused by using a rarely used page that will not be used for a long period (e.g., half a day, a day).
  • the first preset duration, the second preset duration, and the third preset duration can be understood as three preset durations of different time lengths for the time dimensions corresponding to the three page fault states.
  • determining the three first historical time periods based on the current scheduling time, the first preset duration, the second preset duration, and the third preset duration can be understood as the first historical time periods under the three time dimensions corresponding to the current scheduling time, namely, the first historical time period for observing sudden page faults, the second historical time period for observing short-term page faults, and the third historical time period for observing long-term page faults.
  • a first historical time period can be determined based on the current scheduling time and the first preset duration; another first historical time period can be determined based on the current scheduling time and the second preset duration; and yet another first historical time period can be determined based on the current scheduling time and the third preset duration, thus determining three first historical time periods.
  • the specific implementation of determining the corresponding first historical time period based on the current scheduling time and a certain preset duration can be found in the embodiments described above, and will not be repeated here.
  • This specification provides a memory super-splitting processing method that determines three first historical time periods based on the current scheduling time and three different preset durations. This allows for subsequent analysis of page fault information from three time dimensions, increasing the richness of the page fault information.
  • the page fault state data corresponding to each of the three historical time periods can be determined to improve data richness.
  • the specific implementation is as follows.
  • Determining the page fault state data of the multiple virtual machines in the first historical time period includes: determining the page fault state data of the multiple virtual machines in each of the three first historical time periods.
  • This specification provides a memory super-splitting processing method that determines the page fault state data of multiple virtual machines in the three first historical time periods through three time dimensions, making the page fault state data richer. Furthermore, it avoids the problem of errors in page fault state data observed in a single time dimension, which could lead to inaccuracies in the subsequent memory super-splitting processing, thereby further improving the accuracy of subsequent memory super-splitting processing based on the page fault state data.
  • Step 204 Determine the performance loss results of the multiple virtual machines based on the page fault state data.
  • the performance loss result can be understood as a score of the performance loss of the virtual machine.
  • page fault status data includes one or more of the following: page fault event occurrence (e.g., number of page faults), page fault type (e.g., major page fault, minor page fault), page fault cause (e.g., first access, insufficient memory leading to replacement, shared resource access), page fault rate, and page fault impact (response time, CPU utilization, CPU performance, disk I/O performance), when evaluating virtual machine performance loss based on page fault status data, more suitable data can be selected according to actual needs, and the virtual machine performance loss evaluation can be performed based on the selected data.
  • page fault event occurrence e.g., number of page faults
  • page fault type e.g., major page fault, minor page fault
  • page fault cause e.g., first access, insufficient memory leading to replacement, shared resource access
  • page fault rate e.g., page fault rate
  • page fault impact response time, CPU utilization, CPU performance, disk I/O
  • page fault status data including the number of page faults and page fault costs as an example. This is an example, but not a limitation.
  • the specific implementation method for determining the performance loss of multiple virtual machines based on the page fault status data is as follows.
  • the page fault status data includes the number of page faults and the page fault cost; determining the performance loss result of the multiple virtual machines based on the page fault status data includes: determining the number of page faults and the page fault cost of the multiple virtual machines in the first historical time period based on the page fault status data; determining a first performance loss result of the multiple virtual machines for the number of page faults in the first historical time period and a second performance loss result of the multiple virtual machines for the page fault cost in the first historical time period; using the weights of the first performance loss result and the second performance loss result, performing weighted summation and normalization processing on the first performance loss result of the multiple virtual machines for the number of page faults in the first historical time period and the second performance loss result of the multiple virtual machines for the page fault cost in the first historical time period to determine the performance loss result of the multiple virtual machines.
  • page fault count (hereinafter referred to as pf) can be understood as the number of times a page fault occurs.
  • the page fault count of a virtual machine can be understood as the number of times a page fault occurs during the virtual machine's operation.
  • Page fault cost can be understood as the additional CPU performance usage caused by page faults.
  • page fault cost (hereinafter referred to as psi) can be understood as the additional CPU time consumption and power consumption caused by page faults.
  • a weighted sum and normalization process is performed on the first and second performance loss results to obtain the performance loss result of each virtual machine among the multiple virtual machines.
  • the number of page faults for a virtual machine in the first historical period can be understood as 2, and the first performance loss for that virtual machine due to the number of page faults can be understood as 2.
  • the number of page faults for a virtual machine in the first historical period can be understood as 5, and the first performance loss for that virtual machine due to the number of page faults can be understood as 5.
  • the page fault cost for a virtual machine in the first historical period can be understood as 10ms, 20ms, etc., and correspondingly, the second performance loss for that virtual machine due to the page fault cost can be understood as 500J, 600J, etc.
  • the page fault cost for a virtual machine in the first historical period can be understood as 500, 600, etc.
  • a weighted summation and normalization process can be performed on the first and second performance loss results according to their respective weights.
  • Normalization can be understood as standardizing the summation result of the weighted summation of the first and second performance loss results to a value between (0, 1) to obtain the performance loss result for each virtual machine. It should be noted that the weights of the first and second loss results can be set according to actual needs, and the embodiments in this specification do not limit the numerical values of the weights of the first and second loss results.
  • the memory over-distribution processing method provided in this embodiment utilizes page fault state data... The determination of performance loss results by including page fault counts and page fault costs makes the analysis of page fault information more comprehensive and improves the accuracy of performance loss results.
  • the performance loss data of the determined multiple virtual machines is more standardized, improving the accuracy of the memory overspending index of each virtual machine in the subsequently determined multiple virtual machines.
  • the performance loss data of multiple virtual machines can also be determined based on the page fault status data of multiple virtual machines in the three first historical time periods.
  • Determining the performance loss results of the multiple virtual machines based on the page fault status data includes: determining the performance loss results of the multiple virtual machines in each first historical time period based on the page fault status data of the multiple virtual machines in each first historical time period; and using the weights corresponding to the multiple virtual machines in each first historical time period, performing weighted summation and normalization on the performance loss results of the multiple virtual machines in each first historical time period to determine the performance loss results of the multiple virtual machines.
  • the performance loss of multiple virtual machines in each first historical time period can be determined based on the page fault status data of multiple virtual machines in each first historical time period.
  • the weights corresponding to each first historical time period can be understood as the weights of each first historical time period itself; for example, the weights of the three first historical time periods can be understood as 0.2, 0.3, and 0.5, or 0.4, 0.3, and 0.3, etc.
  • the weights of multiple virtual machines in each first historical time period can be understood as the weights of each virtual machine in each first historical time period; for example, the weights of each virtual machine in each first historical time period can be understood as 0.2, 0.3, and 0.5, or 0.4, 0.3, and 0.3, with multiple virtual machines having the same weight for the same first historical time period. Furthermore, after determining the weights of multiple virtual machines in each first historical time period and the performance loss results of multiple virtual machines in each first historical time period, the weights of each first historical time period are used to perform weighted summation and normalization on the performance loss results of multiple virtual machines in each first historical time period, thereby determining the individual performance loss results of multiple virtual machines.
  • weights corresponding to each first historical time period can also be set according to actual needs, and can be used to specifically increase the emphasis on a certain first historical time period.
  • the memory super-score processing method provided in this specification by performing weighted summation and normalization on the performance loss results of three first historical time periods, enables the performance loss analysis of the three first historical time periods to be comprehensively analyzed from multiple time dimensions, and can consider the time dimension with emphasis, thereby improving the accuracy of the performance loss analysis of multiple virtual machines. Furthermore, by comparing the normalized results, the standardization of the performance loss results is improved, and the accuracy of the subsequently obtained memory super-score indicators is improved.
  • the page fault status data can also include the number of page faults and the page fault cost. This allows for a comprehensive consideration of the three historical time periods and the two types of page fault status data, resulting in a more comprehensive and accurate analysis of the performance loss.
  • the page fault status data includes the number of page faults and the page fault cost
  • Determining the performance loss results of the multiple virtual machines based on the page fault status data includes: Based on the page fault status data, the number of page faults and page fault costs of the multiple virtual machines in the first historical time period are determined; a first performance loss result for the number of page faults of the multiple virtual machines in the first historical time period and a second performance loss result for the page fault costs of the multiple virtual machines in the first historical time period are determined; using the weights of the first performance loss result and the second performance loss result, a weighted summation and normalization process is performed on the first performance loss result for the number of page faults of the multiple virtual machines in the first historical time period and the second performance loss result for the page fault costs of the multiple virtual machines in the first historical time period to determine the performance loss result of the multiple virtual machines.
  • the three first historical time periods are labeled as burst (i.e., the first historical time period corresponding to burst page faults), short (i.e., the first historical time period corresponding to short page faults), and long (i.e., the first historical time period corresponding to long page faults), where the burst duration is less than the short duration, and the short duration is less than the long duration.
  • the second historical time period has the same duration as the future time period.
  • a cold page can be understood as a memory page that has not been used by the virtual machine for a period of time, such as a memory page that has not been used for 7 days, a memory page that has not been used for 8 days, etc.
  • Cold page data can be understood as data related to cold pages, including but not limited to the number of cold pages, the type of cold pages, the memory occupied by cold pages, etc.
  • the second historical time period can be understood as one or more historical time periods with the same duration as the scheduling cycle.
  • the future time period can be understood as the current scheduling cycle (i.e., the current scheduling cycle mentioned above).
  • time-series forecasting methods can be used to predict future cold page data using historical cold page data. For example, the above-mentioned prediction of cold page data for multiple virtual machines in a future time period can be achieved using a time-series forecasting model to improve prediction efficiency and accuracy.
  • Determining the predicted cold page data for the multiple virtual machines in a future time period based on the historical cold page data of the multiple virtual machines in a second historical time period includes: using a time-series forecasting model to determine the predicted cold page data for the multiple virtual machines in a future time period based on the historical cold page data of the multiple virtual machines in the second historical time period, wherein the time-series forecasting model is a machine learning model.
  • a time-series forecasting model can be understood as a model used to predict data for a future period based on historical data, such as the Holt-Winters model, the Autoregressive Model (AR), and other machine learning models used for time-series forecasting.
  • a time-series prediction model is used to determine the predicted cold page data of the multiple virtual machines in the future time period. This can be understood as inputting the historical cold page data of multiple virtual machines in the second historical time period into the time-series prediction model respectively, and obtaining the predicted cold page data of the multiple virtual machines in the future time period output by the time-series prediction model.
  • the time-series prediction model can be pre-trained by a third party, or it can be trained by the host/virtual machine based on the historical cold page data of multiple virtual machines in multiple historical time periods. The training process of the time-series prediction model will not be described in detail in the embodiments of this specification.
  • cold page data is understood as the number of cold pages
  • a virtual machine has 30 cold pages from 10:00:00 AM to 10:30:00 AM on January 1, 2024
  • the virtual machine will have 60 cold pages from 10:00:00 AM to 10:30:00 AM on January 1, 2024.
  • the memory over-allocation processing method provided in this specification predicts the cold page data for future time periods based on the historical cold page data of multiple virtual machines in the second historical time period.
  • Step 208 Based on the performance loss results and the predicted cold page data, determine the memory over-allocation metric for the multiple virtual machines in the future time period.
  • the memory over-allocation metric can be understood as a quota indicator for excessive memory allocation; for example, it can be understood as the amount of excessive memory a virtual machine can handle, i.e., the aforementioned quota.
  • the performance loss results represent the amount of excessive memory that multiple virtual machines need to handle
  • the predicted cold page data represents the limit of the amount of excessive memory that multiple virtual machines can handle.
  • the memory over-allocation metric can be determined... This involves determining the memory over-allocation metric allocated by the host machine to multiple virtual machines over a future time period.
  • Determining the memory over-allocation metric for the multiple virtual machines over the future time period based on the performance loss results and the predicted cold page data includes: determining the memory over-allocation ratio of the multiple virtual machines based on the performance loss results; determining the initial memory over-allocation metric for the multiple virtual machines based on the memory over-allocation ratio and the host machine's memory over-allocation; and determining the memory over-allocation metric for the multiple virtual machines over the future time period based on the initial memory over-allocation metric and the predicted cold page data.
  • the memory over-allocation ratio can be understood as the proportion of memory overload that needs to be borne.
  • the sum of the memory over-allocation ratios of multiple virtual machines is lo.
  • Determining the memory over-allocation ratio of multiple virtual machines based on the performance loss results can be understood as determining the memory over-allocation ratio of multiple virtual machines based on the numerical ratio between the performance loss results of multiple virtual machines.
  • the specific implementation method is as follows: Determining the memory over-allocation ratio of the multiple virtual machines based on the performance loss results includes: adding the performance loss results of the multiple virtual machines to obtain a total performance loss result; and determining the memory over-allocation ratio of each virtual machine based on the proportion of each virtual machine's performance loss result relative to the total performance loss result.
  • the sum of performance losses can be understood as the sum of the performance losses of multiple virtual machines.
  • multiple virtual machines include virtual machine 1, virtual machine 2, and virtual machine 3.
  • the performance loss of virtual machine 1 is 0.1, the performance loss of virtual machine 2 is 0.2, and the performance loss of virtual machine 3 is 0.2.
  • the memory overrun ratio of virtual machine 1 is 0.1/(0.1+0.2+0.2), which is 20%; the memory overrun ratio of virtual machine 2 is 0.2/(0.1+0.2+0.2), which is 40%; and the memory overrun ratio of virtual machine 3 is 0.2/(0.1+0.2+0.2), which is 40%.
  • the memory over-allocation processing method provided in this specification determines the memory over-allocation ratio of each virtual machine (VM) based on the proportion of its performance loss to the total performance loss of all VMs.
  • the initial memory index can be understood as the memory over-allocation required by each VM among multiple VMs. Based on this, the initial memory index of multiple VMs can be determined according to the memory over-allocation ratios of multiple VMs and the host machine's memory over-allocation.
  • the initial memory quota for virtual machine 1 can be determined as 100 * 20%, or 20quota; the initial memory quota for virtual machine 2 is 100 * 40%, or 40quota; and the initial memory quota for virtual machine 3 is 100 * 40%, or 40quota .
  • the memory quotas that multiple virtual machines need to handle and the memory quotas they can handle can be determined based on these initial memory quotas and predicted cold page data. Therefore, the memory overage quotas for multiple virtual machines can be determined.
  • the memory over-allocation processing method provided in this specification involves the host machine determining the memory over-allocation index for multiple virtual machines by perceiving damage to multiple virtual machines (i.e., using initial memory metrics determined based on performance loss results) and predicting load (i.e., using predicted cold page data obtained from the above predictions).
  • the determination of the memory over-allocation index becomes more reasonable and accurate, thereby reducing the probability of memory failures (i.e., the probability of page faults occurring in virtual machines) and greatly improving the operational stability of the host machine.
  • the memory over-allocation index for multiple virtual machines is determined based on the initial memory metrics and predicted cold page data.
  • the specific implementation method is as follows.
  • the step of determining the memory over-spending index of the plurality of virtual machines in the future time period based on the initial memory over-spending index and predicted cold page data of the plurality of virtual machines includes: sequentially determining a target virtual machine from the plurality of virtual machines; if the initial memory over-spending index of the target virtual machine is greater than or equal to the predicted cold page data of the target virtual machine, determining the memory index contained in the predicted cold page data as the memory over-spending index of the target virtual machine in the future time period; or if the initial memory over-spending index of the target virtual machine is less than the predicted cold page data of the target virtual machine, determining the initial memory over-spending index as the memory over-spending index of the target virtual machine in the future time period; and determining the memory over-spending index of the plurality of virtual machines in the future time period based on the memory over
  • the smaller value between the initial memory index and the predicted cold page data of each virtual machine can be determined as the memory over-spending index of each virtual machine.
  • the memory overspending metric for virtual machine 1 can be determined as min(100, 20), i.e., 20; the memory overspending metric for virtual machine 2 is min(20, 40), i.e., 20; and the memory overspending metric for virtual machine 3 is min(60, 40), i.e., 40.
  • the memory overspending processing method determines the smaller value among the initial memory metrics of multiple virtual machines and the predicted cold page data as the memory overspending metric for multiple virtual machines. This ensures that the memory overspending does not exceed the memory overspending capacity of the virtual machines. Since memory overspending processing for multiple virtual machines can be achieved through the cold page data of multiple virtual machines, it avoids the need to process memory pages used frequently by multiple virtual machines, thus preventing an increase in page faults caused by virtual machines bearing a high memory overspending. This further improves the operational stability of multiple virtual machines and reduces the impact of page faults on host performance. In practical applications, the unallocated memory excess portion during the above allocation process can also be re-allocated, as described below.
  • the process includes: determining the total memory excess allocation index based on the memory excess allocation index of the multiple virtual machines in the future time period; if the total memory excess allocation index is determined to be less than the host machine's memory excess portion, then, based on the memory excess allocation index of the multiple virtual machines in the future time period and the predicted cold page data, selecting from the multiple virtual machines...
  • the total memory overspending metric can be understood as the sum of the memory overspending metrics of multiple virtual machines in a future time period. Based on the total memory overspending metric, the allocated memory overspending portion of the host machine's memory overspending can be determined.
  • Virtual machines to be supplemented can be understood as those virtual machines that need additional memory overspending allocation.
  • the overspending difference between the total memory overspending metric and the host machine's memory overspending can be understood as the difference in the number of pages included in the total memory overspending metric and the number of pages included in the host machine's memory overspending.
  • the supplementary memory overspending ratio can be understood as the proportion of the number of pages for which additional memory overspending allocation is needed for the virtual machines to be supplemented relative to the above overspending difference. Based on this ratio and the overspending difference, the number of pages for which additional memory overspending allocation is needed for the virtual machines to be supplemented can be determined, i.e., the supplementary memory overspending metric.
  • the host machine's memory excess is 100.
  • the memory excess metrics for the three virtual machines in the future time period are 20, 20, and 40 respectively, with a total memory excess of 20 + 20 + 40, or 80.
  • the total memory excess is less than the host machine's memory excess. Therefore, the difference between the total memory excess and the host machine's memory excess can be determined to be 20.
  • the virtual machines to be supplemented are determined from among the multiple virtual machines. This can be understood as determining the virtual machines whose memory excess metrics in the future time period are less than the predicted cold page data, and identifying them as virtual machines to be supplemented.
  • the virtual machines to be supplemented are determined from among the multiple virtual machines. This can also be understood as, based on the memory overspending metrics and predicted cold page data of multiple virtual machines over a future time period, identifying the virtual machines whose memory overspending metrics are less than a preset memory overspending metric reference value and/or whose predicted cold page data are less than a preset predicted cold page data reference value, and then identifying them as virtual machines to be supplemented.
  • virtual machine 1 has a memory overspending metric of 20 and predicted cold page data of 100 cold pages. Since virtual machine 1's memory overspending metric is less than its predicted cold page data, virtual machine 1 is identified as a virtual machine to be supplemented. Similarly, virtual machine 3 can be identified as a virtual machine to be supplemented. After identifying the virtual machines to be supplemented, the proportion of memory excess that each virtual machine needs to be supplemented is determined based on its performance loss. Continuing with the previous example, the performance loss data for virtual machine 1 is 0.1, and the performance loss data for virtual machine 3 is 0.2.
  • the proportion of memory excess that virtual machine 1 needs to supplement i.e., the supplementary memory excess ratio
  • the proportion of memory excess that virtual machine 2 needs to supplement i.e., the supplementary memory excess ratio
  • the supplementary memory super-resolution index of the virtual machine to be supplemented is determined. Continuing with the previous example, the supplementary super-resolution ratio of virtual machine 1 is 0.33.
  • the supplementary memory super-resolution index of virtual machine 1 can be obtained, which is 6.6; Virtual machine 2...
  • the supplementary over-allocation ratio is 0.67.
  • the supplementary memory over-allocation index for virtual machine 1 i.e., 13.4, can be obtained.
  • the memory over-allocation processing method provided in this specification after determining the memory over-allocation index of multiple virtual machines in a future time period, performs secondary memory over-allocation on the unallocated memory over-allocation component of the host machine's memory over-allocation component.
  • the method further includes: determining memory quantity control parameters; determining the predicted memory quantity of the host machine in the future time period based on the memory quantity control parameters; determining the currently used memory quantity and the currently free memory quantity of the multiple virtual machines; and determining the host machine's memory over-allocation amount based on the predicted memory quantity, the currently used memory quantity, and the currently free memory quantity.
  • the memory quantity control parameters can be understood as user-input configuration parameters, i.e., configuration parameters that the user needs to configure for the total virtual memory level of the host machine in the future time period.
  • the number of memory pages in the host machine's virtual memory in the future time period can be determined, i.e., the predicted memory quantity of the host machine in the future time period.
  • the currently used memory quantity of the multiple virtual machines can be understood as the number of virtual memory pages currently used by the multiple virtual machines, and the currently free memory quantity can be understood as the number of virtual memory pages currently not used by any virtual machine.
  • the predicted memory amount of the host machine in the future time period is subtracted from the current memory used by multiple virtual machines and the current free memory amount.
  • the host machine's memory over-allocation component This yields the amount of memory that the host machine needs to over-allocate, i.e., the host machine's memory over-allocation component. For example, if the predicted memory amount of the host machine in the future time period is 1000, the current memory used by multiple virtual machines is 600, and the current free memory amount is 300, then according to 1000-600-300, the host machine's memory over-allocation component can be determined to be 100.
  • the memory over-allocation processing method provided in the embodiments of this specification, after determining the memory over-allocation index of multiple virtual machines in the future time period, performs secondary memory over-allocation on the unallocated memory over-allocation component of the host machine's memory over-allocation component, so that all the host machine's memory over-allocation component can be borne by the virtual machines, ensuring the stability of the host machine's memory level and improving the host machine's operational stability.
  • page swapping can be performed on multiple virtual machines to achieve dynamic memory overspending.
  • the specific implementation method is as follows: After determining the memory overspending metric for the multiple virtual machines in the future time period based on the performance loss results and the predicted cold page data, the process further includes: determining the target memory pages of the multiple virtual machines based on the memory overspending metric; swapping the target memory pages to the page swap space, wherein the page swap space is a storage space different from memory.
  • the target memory pages can be understood as cold pages in the multiple virtual machines, and the page swap space includes, but is not limited to, hard disks (HDDs), solid-state drives (SSDs), and memory cards.
  • HDDs hard disks
  • SSDs solid-state drives
  • memory cards Specifically, based on the memory overspending metrics of each virtual machine, the cold pages (target memory pages) requiring page swapping in each virtual machine can be identified.
  • the memory overspending processing method provided in this specification, based on the determined memory overspending metrics, identifies target memory pages in multiple virtual machines and swaps them to a storage space different from the main memory, thus achieving memory overspending on the host machine. This expands the virtual memory of each virtual machine, and because the target memory pages are cold pages, it reduces the impact of memory overspending on virtual machine operation while achieving memory overspending.
  • an algorithm pool can be configured, and multiple performance loss algorithms and multiple cold page prediction algorithms can be pre-stored to optimize memory overspending processing. The specific implementation method is described below.
  • the method further includes: determining a target performance loss algorithm and a target cold page prediction algorithm from an algorithm pool, wherein the algorithm pool includes at least two performance loss algorithms and at least two cold page prediction algorithms; determining the performance loss result of the plurality of virtual machines based on the page fault status data includes: determining the performance loss result of the plurality of virtual machines based on the page fault status data using the target performance loss algorithm; determining the predicted cold page data of the plurality of virtual machines in the future time period based on the historical cold page data of the plurality of virtual machines in the second historical time period includes: determining the predicted cold page data of the plurality of virtual machines in the future time period based on the historical cold page data of the plurality of virtual machines in the second historical time period using the target cold page prediction algorithm.
  • the algorithm pool contains multiple selectable performance loss algorithms and cold page prediction algorithms, and the algorithms in the algorithm pool are pluggable and replaceable.
  • a performance loss algorithm can be understood as the specific implementation of determining the performance loss results of multiple virtual machines based on page fault status data, or it can also be understood as determining the loss value based on the number of page faults that occurred in the virtual machines within 5 seconds before the current scheduling time and the scheduling cycle, or other performance loss algorithms, etc.
  • a cold page prediction algorithm can be understood as the specific implementation of determining the predicted cold page data of multiple virtual machines, or it can also be understood as using the average of the cold page amounts of the five scheduling cycles before the current scheduling cycle of multiple virtual machines to determine the predicted cold page data of the current scheduling cycle, that is, the predicted cold page data of multiple virtual machines in the future time period, or other cold page prediction algorithms, etc.
  • the memory super-division processing method provided in the embodiments of this specification improves the scalability of memory super-division processing by designing a pluggable algorithm pool, and improves the adaptability, flexibility and algorithm failure recovery capability of memory super-division processing by dynamically selecting performance loss algorithms and cold page prediction algorithms from the algorithm pool in each scheduling cycle.
  • a performance loss algorithm and a cold page prediction algorithm can be selected from the algorithm pool as an algorithm combination to implement the above-mentioned memory super-resolution processing method.
  • the specific implementation method is as follows. Determining the target performance loss algorithm and the target cold page prediction algorithm from the algorithm pool includes: determining multiple algorithm combinations from the algorithm pool, wherein any one of the multiple algorithm combinations includes a performance loss algorithm and a cold page prediction algorithm; Multiple algorithm combinations are determined as initial algorithm combinations.
  • the initial algorithm combinations are used for data processing to obtain the initial memory super-scoring index of the multiple simulated virtual machines in the simulation future time period corresponding to the initial algorithm combinations.
  • a target memory super-scoring index is determined, and based on the target algorithm combination corresponding to the target memory super-scoring index, the target performance loss algorithm and the target cold page prediction algorithm are determined.
  • an algorithm combination can be understood as an algorithm combination consisting of a performance loss algorithm and a cold page prediction algorithm.
  • a simulated virtual machine can be understood as a simulated virtual machine
  • simulation page fault state data can be understood as the page fault state data of the simulated virtual machine
  • the second simulation historical time period can be understood as the second historical time period set during simulation
  • simulation historical cold page data can be understood as the simulation historical cold page data obtained by simulating the historical cold page data of the simulated virtual machine.
  • the specific implementation method for determining the initial memory super-scoring index of multiple simulated virtual machines in the simulation future time period can be found in the above-described embodiment, and will not be repeated here.
  • a target memory super-scoring index is determined from the initial memory super-scoring indices.
  • the overall loss corresponding to the target memory super-scoring index is less than the overall loss corresponding to other initial memory super-scoring indices.
  • the overall loss can be understood as a comprehensive score of the performance loss results of multiple simulated virtual machines and page fault state data.
  • the performance loss algorithm and cold page prediction algorithm included in the target algorithm combination can be determined, i.e., the target performance loss algorithm and the target cold page prediction algorithm.
  • the memory super-scoring processing method provided in the embodiments of this specification determines the target algorithm combination by conducting simulation tests on each algorithm combination in the algorithm pool that contains one performance loss algorithm and one cold page prediction algorithm.
  • the selection of the target performance loss algorithm and the target cold page prediction algorithm can be achieved by using the damage value corresponding to each initial memory super-resolution index as a reference factor.
  • Determining the target memory super-resolution index based on each initial memory super-resolution index, and determining the target performance loss algorithm and the target cold page prediction algorithm based on the target algorithm combination corresponding to the target memory super-resolution index includes: determining the damage value corresponding to each initial memory super-resolution index; determining the target memory super-resolution index from the initial memory super-resolution indices based on the damage value corresponding to each initial memory super-resolution index, wherein the damage value of the target memory super-resolution index is less than or equal to any one of the damage values of the initial memory super-resolution indices; determining the initial algorithm combination corresponding to the target memory super-resolution index as the target algorithm combination corresponding to the target memory super-resolution index; determining the performance loss algorithm included in the target algorithm combination as the target performance loss algorithm, and determining the cold page prediction algorithm included in the target algorithm combination...
  • the loss value can be understood as the performance loss result of the simulated virtual machine.
  • the loss value can be understood as the sum of the performance loss results of multiple simulated virtual machines.
  • the sum; the performance loss result can be understood as the above performance loss result; the simulation virtual machine can be understood as a virtual machine used for simulation testing.
  • simulation tests can be performed using each initial memory index to determine the corresponding loss value of each initial memory index.
  • Determining the loss value corresponding to each initial memory super-resolution index based on each initial memory super-resolution index includes: determining each initial memory super-resolution index as a target simulation memory super-resolution index; using the target simulation memory super-resolution index, performing memory super-resolution simulation on multiple simulation virtual machines to obtain the initial loss value of the multiple simulation virtual machines; determining the loss value corresponding to the target simulation memory super-resolution index by summing the initial loss values of each simulation virtual machine; and determining the loss value corresponding to each initial memory super-resolution index based on the loss value corresponding to the target simulation memory super-resolution index.
  • the initial loss value of the multiple simulation virtual machines can be understood as the performance loss result of each virtual machine in the multiple simulation virtual machines.
  • memory over-distribution simulation is performed on multiple virtual machines. This can be understood as follows: using the target simulated memory over-distribution metric and the memory over-distribution method provided in the above-described embodiments, the memory over-distribution component of each virtual machine is determined, and simulated memory over-distribution is performed on each virtual machine based on its memory over-distribution component.
  • the performance loss result corresponding to each virtual machine at the moment of completing the simulated memory over-distribution is obtained, and the performance loss result of each virtual machine is determined as its initial loss value. Further, the initial loss values of each virtual machine are added together, and the sum of the initial loss values is determined as the loss value corresponding to the target simulated memory over-distribution metric, thereby determining the loss value corresponding to each initial memory over-distribution metric.
  • the memory over-scaling method provided in this specification utilizes initial memory over-scaling metrics to perform memory over-scaling simulations on multiple virtual machines to determine the simulated memory over-scaling results, i.e., the damage values of multiple virtual machines. This allows for analysis of the memory over-scaling effect corresponding to each initial memory over-scaling metric, reducing resource consumption during actual memory over-scaling testing and improving the iterative update efficiency of the memory over-scaling processing system. Furthermore, after determining the damage values corresponding to each initial simulated memory over-scaling metric, a target memory over-scaling metric can be determined based on the smaller of these damage values.
  • the damage value of the target memory over-scaling metric is less than or equal to any one of the damage values of the initial memory over-scaling metrics.
  • the performance loss algorithm included in the initial algorithm combination corresponding to the target memory over-allocation metric can be determined as the target performance loss algorithm
  • the cold page prediction algorithm included in the initial algorithm combination corresponding to the target memory over-allocation metric can be determined as the target cold page prediction algorithm.
  • the target performance loss algorithm and the target cold page prediction algorithm can be used to achieve memory over-allocation for multiple virtual machines.
  • the memory over-allocation processing method determines the algorithm combination corresponding to the initial memory over-allocation metric with the smaller damage value as the algorithm combination for actual application, thereby optimizing the memory over-allocation processing by selecting the algorithm combination with the lower overall damage amount in each scheduling cycle.
  • the iterative selection for rapid iteration of the management system based on the simulation page fault state data of multiple simulated virtual machines and the simulation historical cold page data of the multiple simulated virtual machines in the second simulation historical time period, the specific implementation method of determining the initial memory over-allocation index is as follows.
  • the step of processing data based on the determined simulation page fault state data of multiple virtual machines and the simulation historical cold page data of the multiple virtual machines in the second simulation historical time period, using the initial algorithm combination to obtain the initial memory super-scoring index of the multiple virtual machines in the simulation future time period corresponding to the initial algorithm combination includes: determining the simulation initial performance loss result of the multiple virtual machines using the performance loss algorithm included in the initial algorithm combination based on the determined simulation page fault state data of the multiple virtual machines; determining the simulation initial predicted cold page data of the multiple virtual machines in the simulation future time period using the simulation cold page prediction algorithm included in the initial algorithm combination based on the simulation historical cold page data of the multiple virtual machines in the second simulation historical time period; and determining the initial memory super-scoring index of the multiple virtual machines in the simulation future time period corresponding to the initial algorithm combination based on the simulation initial performance loss result and the simulation initial predicted cold page data.
  • the memory super-resolution processing method provided in the embodiments of this specification improves the accuracy of the simulation test by simulating and testing each combination of algorithms in the algorithm pool that includes a performance loss algorithm and a cold page prediction algorithm.
  • the performance loss algorithm and the cold page prediction algorithm are used to determine the initial performance loss result and the initial predicted cold page data of the simulation, respectively, thereby improving the accuracy of the simulation test and making the target algorithm combination determined subsequently more accurate.
  • This specification provides a memory over-distribution processing method in one embodiment.
  • the performance loss results of the VMs are determined, thereby identifying the host machine performance loss (e.g., memory performance, I/O performance) caused by page faults.
  • the host machine performance loss e.g., memory performance, I/O performance
  • predicted cold page data for future time periods can be determined, thus obtaining the upper limit of memory over-distribution that the VMs can handle.
  • the memory over-distribution index for the VMs in future time periods is determined.
  • the available virtual memory is increased, reducing the page replacement pressure and address translation pressure during the operation of each VM, thereby reducing the probability of host machine memory performance and I/O performance degradation, and further improving the stability of host machine operation.
  • the above is an illustrative scheme of a memory over-distribution processing method according to this embodiment. It should be noted that the technical solution of this memory super-division processing method belongs to the same concept as the above-mentioned memory super-division processing method. Details not described in detail in the above-mentioned memory super-division processing method can be found in the description of the above-mentioned memory super-division processing method.
  • Step 302 Acquire data.
  • data acquisition can be understood as acquiring the status information of each virtual machine operating system (guest).
  • the host operating system deploys host kernel components (such as memory control components, memory management components, etc.).
  • the host kernel components provide virtual machine status information in real time through the interaction interface with the memory management system.
  • the memory management system i.e., the aforementioned memory over-allocation processing system periodically collects the virtual machine status information from the data input layer through the interaction interface between the host kernel components and the memory management system.
  • a damage assessment algorithm i.e., the aforementioned target performance loss algorithm
  • a load prediction algorithm i.e., the aforementioned target cold page prediction algorithm
  • the damage assessment algorithm is used for virtual machine damage detection
  • the load prediction algorithm is used for load prediction.
  • the damage assessment algorithm and the load prediction algorithm can be determined through configuration parameters, which include selection parameters for the damage assessment algorithm and the complex prediction algorithm. These configuration parameters can be determined by user input (i.e., the developers or users of the host machine's memory management system) or based on simulation results from a simulation testing system. Furthermore, the selection parameters for the damage assessment algorithm and the complex prediction algorithm can be obtained through a simulation testing system.
  • the damage assessment algorithm and the load prediction algorithm are randomly combined to obtain multiple algorithm combinations. Simulation tests are performed on these multiple algorithm combinations, and the algorithm combination with the lowest overall damage is determined as the target algorithm combination. Based on the damage assessment algorithm and the load prediction algorithm included in this target algorithm combination, the selection parameters for the damage assessment algorithm and the complex prediction algorithm in the aforementioned configuration parameters are updated.
  • a specific implementation of a performance degradation assessment algorithm involves, based on the collected virtual machine state information, acquiring the number of page faults (pf) and the CPU time overhead (psi) caused by page faults across three time dimensions (i.e., the first historical time period corresponding to the sudden page fault) with the current scheduling time (the start time of the current scheduling cycle) as the time endpoint.
  • This data is used to measure the performance degradation of the virtual machine (including but not limited to memory performance, I/O performance, etc.), resulting in the following data:
  • burst page fault (burst pf, burst psi);
  • Short-term page faults short-term pf, short-term psi
  • burst_pf can be understood as the number of page faults that occur during a burst page fault
  • burst_psi can be understood as the CPU time overhead caused by a burst page fault
  • short_term_pf can be understood as the number of page faults that occur during a short-term page fault
  • short-term psi can be understood as the CPU time overhead caused by a short-term page fault
  • long-term pf can be understood as the number of page faults that occur during a long-term page fault
  • long_term_psi can be understood as the CPU time overhead caused by a long-term page fault.
  • the damage score is calculated using the following virtual machine damage assessment formula.
  • t can be understood as the current scheduling time
  • Impair(t) can be understood as the damage score determined by the target virtual machine at the current scheduling time
  • Pfbm-sdt' can be understood as the burst damage score of the target virtual machine at the current scheduling time.
  • the Holt-Winters model is used to predict the number of cold pages for each virtual machine in the future time period.
  • the number of cold pages for each virtual machine in the historical time period can be determined by identifying the number of memory pages that have exceeded the preset cold page timeout within that historical time period.
  • the duration of the future time period can be consistent with the duration of the scheduling cycle.
  • Quota allocation can be understood as calculating the quota that each virtual machine needs to bear based on the damage score of each virtual machine obtained in step 306 and the predicted number of cold pages for each virtual machine obtained in step 308. The specific calculation steps are as follows:
  • Step 312 Assembly instruction.
  • the assembly instruction can be understood as generating control instructions according to the quotas that each virtual machine needs to bear, and using the control instructions to implement memory over-allocation control.
  • step 310 based on the quotas that each virtual machine needs to bear calculated in step 310, generate quota memory over-allocation control instructions, and send the quota memory over-allocation control instructions to the instruction output layer, so that the memory management system can set the paging target for each virtual machine, specifically, paging the number of cold pages corresponding to the quota amount to the disk.
  • This specification provides a memory over-allocation processing method.
  • the upper limit of memory over-allocation that multiple virtual machines can handle can be determined. Therefore, based on the number of page faults, the CPU time overhead caused by page faults, and the predicted amount of cold pages for multiple virtual machines in future time periods, the quota for multiple virtual machines in future time periods is determined.
  • the available virtual memory is increased, dynamically reducing the pressure of page replacement and address translation during the operation of each virtual machine, reducing the probability of host machine performance degradation, thereby improving the overall memory stability of the host machine and making the host machine run more smoothly.
  • FIG. 4 shows a schematic diagram of the structure of a memory super-resolution processing system provided in one embodiment of this specification. As shown in Figure 4, this system is applied to a host machine running multiple virtual machines.
  • the system includes: a status data determination unit 402, configured to determine page fault status data of the multiple virtual machines in a first historical time period; a performance loss result determination unit 404, configured to determine the performance loss result of the multiple virtual machines based on the page fault status data; a cold page data determination unit 406, configured to determine the predicted cold page data of the multiple virtual machines in a future time period based on the historical cold page data of the multiple virtual machines in a second historical time period, wherein the duration of the second historical time period is less than or equal to the duration of the first historical time period, and the duration of the second historical time period is the same as the duration of the future time period; and a memory overspending index determination unit 408, configured to determine the memory overspending index of the multiple virtual machines in the future time period based on the performance loss result and the predicted cold page data.
  • a status data determination unit 402 configured to determine page fault status data of the multiple virtual machines in a first historical time period
  • a performance loss result determination unit 404 configured to determine the performance loss result of the multiple virtual
  • the memory overspending metric determination unit 408 is further configured to: determine the memory overspending ratio of the plurality of virtual machines based on the performance loss result; determine the initial memory overspending metric of the plurality of virtual machines based on the memory overspending ratio and the memory overspending of the host machine; and determine the memory overspending metric of the plurality of virtual machines in the future time period based on the initial memory overspending metric of the plurality of virtual machines and the predicted cold page data.
  • the memory overspending metric determination unit 408 is further configured to: sequentially determine a target virtual machine from the plurality of virtual machines; if the initial memory overspending metric of the target virtual machine is greater than or equal to the predicted cold page data of the target virtual machine, determine the memory metric included in the predicted cold page data as the memory overspending metric of the target virtual machine in the future time period; or if the initial memory overspending metric of the target virtual machine is less than the predicted cold page data of the target virtual machine, determine the initial memory overspending metric as the memory overspending metric of the target virtual machine in the future time period.
  • the device includes a memory over-splitting metric; based on the memory over-splitting metric of the target virtual machine in the future time period, the memory over-splitting metric of the plurality of virtual machines in the future time period is determined.
  • the device further includes a supplementary over-splitting unit, configured to: determine a total memory over-splitting metric based on the memory over-splitting metric of the plurality of virtual machines in the future time period; if the total memory over-splitting metric is determined to be less than the memory over-splitting metric of the host machine, determine a virtual machine to be supplemented from the plurality of virtual machines based on the memory over-splitting metric of the plurality of virtual machines in the future time period and predicted cold page data; determine the over-splitting difference between the total memory over-splitting metric and the memory over-splitting metric of the host machine; determine the supplementary memory over-splitting ratio of the virtual machine to be supplemented based on
  • the apparatus further includes a host machine memory excess component determination unit, configured to: determine memory quantity control parameters; determine the predicted memory quantity of the host machine in the future time period based on the memory quantity control parameters; determine the currently used memory quantity and the currently free memory quantity of the plurality of virtual machines; and determine the host machine memory excess component based on the predicted memory quantity, the currently used memory quantity, and the currently free memory quantity.
  • the apparatus further includes a time period determination unit, configured to: determine the current scheduling time and a preset duration; and determine a first historical time period based on the current scheduling time and the preset duration, wherein the current scheduling time is the starting point of the future time period.
  • the preset duration includes a first preset duration, a second preset duration, and a third preset duration; the time period determination unit is further configured to: determine three first historical time periods based on the current scheduling time, the first preset duration, the second preset duration, and the third preset duration.
  • the state data determining unit 402 is further configured to: determine the page fault state data of the plurality of virtual machines in each of the three first historical time periods.
  • the performance loss result determining unit 404 is further configured to: determine the performance loss result of the plurality of virtual machines in each of the first historical time periods based on the page fault state data of the plurality of virtual machines in each of the first historical time periods; and perform weighted summation and normalization processing on the performance loss result of the plurality of virtual machines in each of the first historical time periods using the weights corresponding to the plurality of virtual machines in each of the first historical time periods to determine the performance loss result of the plurality of virtual machines.
  • the page fault state data includes the number of page faults and the page fault cost
  • the performance loss result determining unit 404 is further configured to: determine the number of page faults and the page fault cost of the plurality of virtual machines in the first historical time period based on the page fault state data; The system determines a first performance loss result for the number of page faults of the multiple virtual machines during the first historical time period, and a second performance loss result for the page fault cost of the multiple virtual machines during the first historical time period.
  • the system uses the weights of the first performance loss result and the second performance loss result to determine the performance loss result of the multiple virtual machines.
  • the cold page data determination unit 406 is further configured to: determine the predicted cold page data of the multiple virtual machines in future time periods based on the historical cold page data of the multiple virtual machines during the second historical time period, using a time-series prediction model, wherein the time-series prediction model is a machine learning model.
  • the apparatus further includes an algorithm selection unit configured to: determine a target performance loss algorithm and a target cold page prediction algorithm from an algorithm pool, wherein the algorithm pool includes at least two performance loss algorithms and at least two cold page prediction algorithms; determining the performance loss result of the plurality of virtual machines based on the page fault status data includes: determining the performance loss result of the plurality of virtual machines based on the page fault status data using the target performance loss algorithm; determining the predicted cold page data of the plurality of virtual machines in a future time period based on the historical cold page data of the plurality of virtual machines in a second historical time period includes: determining the predicted cold page data of the plurality of virtual machines in a future time period based on the historical cold page data of the plurality of virtual machines in a second historical time period using the target cold page prediction algorithm.
  • the algorithm selection unit is further configured to: determine multiple algorithm combinations from the algorithm pool, wherein any one of the multiple algorithm combinations includes a performance loss algorithm and a cold page prediction algorithm; determine the multiple algorithm combinations as initial algorithm combinations; based on the determined simulation page fault state data of the multiple simulated virtual machines and the simulation historical cold page data of the multiple simulated virtual machines in the second simulation historical time period, perform data processing using the initial algorithm combinations to obtain the initial memory super-scoring index of the multiple simulated virtual machines in the simulation future time period corresponding to the initial algorithm combinations; determine the target memory super-scoring index based on each initial memory super-scoring index, and determine the target performance loss algorithm and the target cold page prediction algorithm based on the target algorithm combination corresponding to the target memory super-scoring index.
  • the algorithm selection unit is further configured to: determine the initial performance loss result of the multiple simulated virtual machines based on the determined simulation page fault state data of the multiple simulated virtual machines, using the performance loss algorithm included in the initial algorithm combination; determine the initial predicted cold page data of the multiple simulated virtual machines in the simulation future time period based on the simulation historical cold page data of the multiple simulated virtual machines in the second simulation historical time period, using the simulation cold page prediction algorithm included in the initial algorithm combination; and determine the initial memory super-resolution index of the multiple simulated virtual machines in the simulation future time period corresponding to the initial algorithm combination based on the initial performance loss result and the initial predicted cold page data.
  • the device further includes a paging unit, configured to: Based on the memory overspending metric, target memory pages of the plurality of virtual machines are determined; the target memory pages are swapped to the page swap space, wherein the page swap space is a storage space different from memory.
  • the memory overspending metric determining unit 408 is further configured to: add the performance loss results of the plurality of virtual machines to obtain a total performance loss result; and determine the memory overspending ratio of each virtual machine among the plurality of virtual machines based on the proportion of the performance loss result of each virtual machine relative to the total performance loss result.
  • the algorithm selection unit is further configured to: determine the damage value corresponding to each initial memory super-resolution index based on each initial memory super-resolution index; determine a target memory super-resolution index from the initial memory super-resolution indexes based on the damage value corresponding to each initial memory super-resolution index, wherein the damage value of the target memory super-resolution index is less than or equal to any one of the damage values of each initial memory super-resolution index; determine the initial algorithm combination corresponding to the target memory super-resolution index in the initial algorithm combination as the target algorithm combination corresponding to the target memory super-resolution index based on the target memory super-resolution index; determine the performance loss algorithm included in the target algorithm combination as the target performance loss algorithm; and determine the cold page prediction algorithm included in the target algorithm combination as the target cold page prediction algorithm.
  • the algorithm selection unit is further configured to: determine each initial memory super-resolution index as a target simulation memory super-resolution index; use the target simulation memory super-resolution index to perform memory super-resolution simulation on multiple simulation virtual machines to obtain the initial damage values of the multiple simulation virtual machines; determine the sum of the initial damage values of each simulation virtual machine as the damage value corresponding to the target simulation memory super-resolution index; and determine the damage value corresponding to each initial memory super-resolution index based on the damage value corresponding to the target simulation memory super-resolution index.
  • This specification provides a memory over-division processing system in one embodiment.
  • a state data determination unit determines page fault state data of multiple virtual machines (VMs) in a first historical time period, thereby determining the performance loss results of the VMs.
  • a performance loss result determination unit determines the host machine performance loss (e.g., memory performance, I/O performance) caused by page faults in the VMs.
  • a cold page data determination unit utilizes historical cold page data of the VMs in a second historical time period to determine predicted cold page data for the VMs in future time periods, thus obtaining the upper limit of memory over-division that the VMs can handle.
  • a memory over-division index determination unit determines the memory over-division index for the VMs in future time periods.
  • virtual memory is increased, reducing the page replacement pressure and address translation pressure during VM operation. This reduces the probability of decreased host machine memory performance and I/O performance, thereby improving the stability of host machine operation.
  • the above is an illustrative scheme of a memory super-resolution processing system according to this embodiment. It should be noted that the technical solution of this memory super-resolution processing system and the technical solution of the memory super-resolution processing method described above belong to the same concept.
  • Figure 5 shows a structural block diagram of a computing device 500 according to one embodiment of this specification.
  • the components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520.
  • the processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
  • the computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560.
  • Access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
  • NIC network interface controller
  • WLAN Wireless Local Area Network
  • Wi-MAX Worldwide Interoperability for Microwave Access
  • Ethernet interface e.g., a Universal Serial Bus (USB) interface
  • USB Universal Serial Bus
  • NFC Near Field Communication
  • the computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs).
  • the computing device 500 can also be a mobile or stationary server.
  • the processor 520 is used to execute a computer program/instruction that, when executed by the processor, implements the steps of the above-described memory super-resolution processing method.
  • the various embodiments in this specification are described in a progressive manner; similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments.
  • the computing device embodiments are basically similar to the memory super-resolution processing method embodiments, so the description is relatively simple; relevant parts can be referred to in the description of the memory super-resolution processing method embodiments.
  • This specification also provides a computer-readable storage medium storing a computer program/instructions that, when executed by a processor, implement the steps of the memory super-division processing method described above.
  • the various embodiments in this specification are described in a progressive manner; similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments.
  • the computer-readable storage medium embodiment is basically similar to the memory super-division processing method embodiment, so the description is relatively simple; relevant parts can be referred to the description of the memory super-division processing method embodiment.
  • This specification also provides a computer program product, including a computer program/instructions that, when executed by a processor, implement the steps of the memory super-division processing method described above. The above is an illustrative scheme of a computer program product according to this embodiment.
  • the computer instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content of the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals. It should also be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

说明书摘要本说明书实施例提供内存超分处理方法以及系统,其中所述内存超分处理方法应用于宿主机,所述宿主机运行有多个虚拟机,所述方法包括:确定多个虚拟机在第一历史时间段的缺页状态数据;根据缺页状态数据,确定多个虚拟机的性能损失结果;根据多个虚拟机在第二历史时间段的历史冷页数据,确定多个虚拟机在未来时间段的预测冷页数据,其中,第二历史时间段的时长小于或等于第一历史时间段的时长,且第二历史时间段与未来时间段的时长相同;根据性能损失结果以及预测冷页数据,确定多个虚拟机在未来时间段的内存超分指标;该方法降低了虚拟机页面置换压力、地址转换压力,减少宿主机性能降低概率,提高了宿主机内存及运行的平稳性。

Description

内存超 分处理 方法 以及 系统 本公开要求申请号为 202410627061. 4的中国专利申请的优先权,该中国专利申请 于 2024年 05月 20日提交中国专利局, 申请名称为 “内存超分处理方法以及系统” , 其全部 内容通过引用结合在本公开 中。 技术领域 本说明书实施例涉及计 算机技术领域, 特别涉及一种内存超分处理方法 。 本说明 书一个或者 多个实施例同时涉及一种 内存超分处理系统。 背景技术 通常, 为了平衡各个虚拟机的内存资源, 宿主机的内存管理系统会针对虚拟 机的 虚拟内存进 行内存超分, 以实现内存资源的调度。 然而, 内存超分存在缺页的情况,发生持续缺页时, 由于缺页所带来的页面置换、 地址转换等 操作会持续进行,导致宿主机的内存性能、输入输出性能等性能严重 降低, 由此降低宿 主机运行的平稳性。 因此, 亟需一种技术方案以解决上述技术问题。 发明内容 有鉴于此, 本说明书实施例提供了一种内存超分 处理方法。 本说明书一个或者多 个实施例 同时涉及一种内存超分处理 装置, 一种计算设备, 一种计算机可读存储介质 以及一种计 算机程序产品, 以解决现有技术中存在的由于持续缺 页导致宿主机性能降 低、 运行平稳性降低的技术缺陷。 根据本说明书实施例 的第一方面,提供了一种内存超分处理方法,应用于宿主机, 所述宿主机 运行有多个虚拟机, 所述方法包括: 确定所述多个虚拟机在第 一历史时间段的缺页状态数 据; 根据所述缺页状态数据 , 确定所述多个虚拟机的性能损失结果; 根据所述多个虚拟机在 第二历史时间段的历史冷 页数据, 确定所述多个虚拟机在 未来时 间段的预测冷页数据, 其中, 所述第二历史时间段的时长小于或等于所述第一 历史时 间段的时长, 且所述第二历史时间段与所述未来时间段的 时长相同; 根据所述性能损失结果 以及所述预测冷页数据 , 确定所述多个虚拟机在所述未来 时间段 的内存超分指标。 根据本说明书实施例 的第二方面,提供了一种内存超分处理系统,应用于宿主机, 所述宿主机 运行有多个虚拟机, 所述系统包括: 状态数据确定单元, 被配置为确定所述多个虚拟机在 第一历史时间段的缺页状 态 数据; 性能损失结果确定单元 , 被配置为根据所述缺页状态数据, 确定所述多个虚拟机 的性能损失 结果; 冷页数据确定单元, 被配置为根据所述多个虚拟机 在第二历史时间段的历史冷 页 数据, 确定所述多个虚拟机在未来时 间段的预测冷页数据, 其中, 所述第二历史时间 段的时长 小于或等于所述第一历史时 间段的时长, 且所述第二历史时间段与所述未来 时间段的时 长相同; 内存超分指标确定单元 ,被配置为根据所述性能损失结果以及所述预测冷 页数据, 确定所述多个 虚拟机在所述未来时间段 的内存超分指标。 根据本说明书实施例 的第三方面, 提供了一种计算设备, 包括: 存储器和处理器; 所述存储器用于存储计 算机程序/指令, 所述处理器用于执行所述计算机程序/指 令, 该计算机程序/指令被处理器执行时实 现上述内存超分处理方法 的步骤。 根据本说明书实施例 的第四方面, 提供了一种计算机可读存储介质, 其存储有计 算机程序/指令 , 该计算机程序/指令被处理器执行时实现上述内存超分 处理方法的步 骤。 根据本说明书实施例 的第五方面, 提供了一种计算机程序产品, 包括计算机程序/ 指令, 该计算机程序/指令被处理器执行时 实现上述内存超分处理方法 的步骤。 本说明书一个实施例提 供的一种内存超分处理方法 , 通过确定多个虚拟机在第一 历史时间段 的缺页状态数据, 确定多个虚拟机的性能损失结果 , 以确定多个虚拟机由 于缺页带来 的宿主机性能 (例如内存性能、 输入输出性能等) 损失, 进一步的, 可以 利用多个虚 拟机在第二历史时间段 的历史冷页数据, 确定多个虚拟机在未来时间段的 预测冷页数 据, 以得到多个虚拟机可承担的内存超分上限, 从而根据多个虚拟机的性 能损失结果 、 以及多个虚拟机在未来时间段的预测冷页数据, 确定出多个虚拟机在未 来时间段 的内存超分指标, 在考虑多个虚拟机的承担能力的情况 下, 增加可利用的虚 拟内存, 降低各个虚拟机运行过程中的页面置换压力、 地址转换压力, 从而达到减少 宿主机 内存性能、 输入输出性能的降低概率, 以及更进一步的, 提高宿主机的内存的 平稳性, 以及宿主机运行的平稳性的效果。 附图说明 图 1是本说明书一个实施例提供 的一种内存超分处理方法 的具体应用场景图; 图 2是本说明书一个实施例提供 的一种内存超分处理方法 的流程图; 图 3是本说明书一个实施例提供 的一种内存超分处理方法 的处理过程流程图; 图 4是本说明书一个实施例提供 的一种内存超分处理系统 的结构示意图; 图 5是本说明书一个实施例提供 的一种计算设备的结构框图 。 具体实龄 式 在下面的描述中阐述 了很多具体细节以便于充分 理解本说明书。 但是本说明书能 够以很多不 同于在此描述的其它方式 来实施, 本领域技术人员可以在不违背本说明书 内涵的情况 下做类似推广, 因此本说明书不受下面公开的具体实施 的限制。 在本说明书一个或多个 实施例中使用的术语是仅仅 出于描述特定实施例的 目的, 而非 旨在限制本说明书一个或多个实施 例。 在本说明书一个或多个实施例和所附权利 要求书 中所使用的单数形式的 “一种” 、 “所述 ”和 “该”也旨在包括多数形式, 除 非上下文清 楚地表示其他含义。 还应当理解, 本说明书一个或多个实施例中使用的术 语 “和 /或”是指并包含一个或多个相关联的列出项目的任何 或所有可能组合。 应当理解, 尽管在本说明书一个或多个实施例 中可能采用术语第一、 第二等来描 述各种信 息, 但这些信息不应限于这些术语。 这些术语仅用来将同一类型的信息彼此 区分开 。 例如, 在不脱离本说明书一个或多个实施例范围的情况下, 第一也可以被称 为第二,类似地,第二也可 以被称为第一。取决于语境,如在此所使用的词语 “如果” 可以被解释 成为 “在 ……时” 或 “当 … …时”或 “响应于确定” 。 此外, 需要说明的是, 本说明书一个或多个实施例所涉及的用户信息 (包括但不 限于用户设 备信息、 用户个人信息等) 和数据 (包括但不限于用于分析的数据、 存储 的数据、 展示的数据等) , 均为经用户授权或者经过各方充分授权的信息和数据, 并 且相关数据 的收集、 使用和处理需要遵守相关国家和地区的相关 法律法规和标准, 并 提供有相应 的操作入口, 供用户选择授权或者拒绝。 首先, 对本说明书一个或多个实施例涉及的名词术语 进行解释。 宿主机操作系统 (host) : 宿主机的操作系统, 可以管理宿主机上的各项资源。 虚拟机操作系统 ( guest) : 虚拟化环境中运行的客户操作系统, 可以管理虚拟机 中的各项资 源。 内存超分 (memory overcommitment) : 可以理解为内存超量分配, 一种内存分配 策略, 可以将某一个 guest中暂不使用的内存借用给其他的 guest使用, 或者借用给 host使用。 超分配额 (quota) : 内存超分量的配额, 内存超分量可以理解为单个的 guest 需要承担 的内存超分量。 霍尔特-温特模型 (Holt-Winters 模型) : 也称三次指数平滑模型, 一种时序序 列预测模型 , 可以用于预测时序序列未来的预测值。 缺页: 又称页缺失 (Page fault) 、 寻页缺失、 缺页中断、 页故障、 硬错误、 硬 中断等, 指的是当一个软件 (例如虚拟机) 试图访问已映射在虚拟地址空间中, 但是 并未加载在 物理内存中的一个内存页时 , 所产生的中断。 中央处理器 (Central Process ing Unit , CPU) : 计算机系统的核心部件之一, 负责执行指 令、 处理数据以及控制整个系统的操作。 在虚拟化系统中, guest内存超分可以帮助提高 host内存资源的利用率; 为了提 高 host内存资源的利用率, 可以为各个 guest分配 quota, 以换出各个 guest对应的 页面。 本说明书一个实施例提供 了一种 quota分配方案,具体为将 host整体的内存超分 量, 平均分配给每个 guest o 然而, 由于每个 guest处理的任务类型不同, 内存占用不同, 平均分配 quota可 能会导致负 载较高的 guest内存不够用, 而复杂较低的 guest内存富余并空闲, 导致 host整体内存资源 利用率降低。 为此, 本说明书一个实施例提供了另一 种 quota 的分配方案, 具体是根据各个 guest的负载情况进行 quota的分配。 但是, 由于 guest负载实时变化, 实时进行 quota的分配会导致 host的性能大幅 降低, 另外, 未及时进行较高负载 guest的 quota分配, 会使得 guest在运行中进行 持续的、频繁的换页、地址切换等操作,也会带来 host性能大幅降低的问题,更甚者, 还会导致 host出现较多的性能波动, 无法平稳运行。 有鉴于此, 在本说明书中, 提供了一种内存超分处理方法, 本说明书同时涉及一 种内存超分 处理装置, 一种计算设备, 一种计算机可读存储介质, 以及一种计算机程 序产品, 在下面的实施例中逐一进行详细 说明。 参见图 1 , 图 1示出了根据本说明书一个实施例提供的一种内存超分处理方法的 具体应用场 景图。 如图 1所示, 图 1中包括客户端 102、 宿主机 104以及宿主机 104中运行的多个 虚拟机 106; 其中客户端 102可以理解为手机、 平板电脑、 笔记本电脑、 台式电脑、 智能手环 、 智能手表等, 宿主机 104可以理解为客户端 102, 也可以理解为其他服务 器, 包括但不限于单个物理服务器 、 物理服务器集群、 单个云服务器、 云服务器集群 等, 虚拟机 106可以理解为具有完整硬件系统功能、 运行在宿主机 104中的完全隔离 环境中的完 整计算机系统, 在宿主机 104理解为客户端 102之外的其他服务器的情况 下, 客户端 102和宿主机 104可以通过包括但不限于有线连接、 无线连接等连接方式 进行通信 。 具体实施时, 用户可以客户端 102中使用运行在宿主机 104中的任意一个或者多 个虚拟机 106, 宿主机为支持各虚拟机 106的运行, 向各虚拟机 106提供内存支持, 即为各虚拟 机 106分配内存。 由于各虚拟机 106并不是同时使用分配给自身的全部内存, 存在总内存 (即各个 虚拟机被分 配的内存总和)的利用率低的情况,因此宿主机 104可以向各个虚拟机 106 进行内存超 分。 具体的, 宿主机 104确定多个虚拟机 106在第一历史时间段的缺页状态数据, 以 通过多个虚 拟机 106的缺页状态数据, 确定多个虚拟机 106的缺页情况以及缺页所带 来的影响情况 ,评估得到多个虚拟机 106的性能损失结果,之后,根据多个虚拟机 106 在第二历史 时间段的历史冷页数据, 确定多个虚拟机 106的未来时间段的预测冷页数 据, 以确定多个虚拟机 106可以承担的内存超分量, 进一步的, 根据上述性能损失结 果以及预测 冷页数据, 确定多个虚拟机在未来时间段的内存超分 指标, 以用于对各个 虚拟机的 内存超分。 本说明书实施例提供 的一种内存超分处理方法 , 通过确定多个虚拟机在第一历史 时间段的缺 页状态数据, 确定多个虚拟机的性能损失结果, 以确定多个虚拟机由于缺 页带来的宿 主机性能 (例如内存性能、 输入输出性能等) 损失, 进一步的, 可以利用 多个虚拟机 在第二历史时间段的历史冷 页数据, 确定多个虚拟机在未来时间段的预测 冷页数据 , 以得到多个虚拟机可承担的内存超分上限, 从而根据多个虚拟机的性能损 失结果、 以及多个虚拟机在未来时间段的预测冷页数据, 确定出多个虚拟机在未来时 间段的 内存超分指标, 在考虑多个虚拟机的承担能力的情况下 , 增加可利用的虚拟内 存, 降低各个虚拟机运行过程中的页面置 换压力、 地址转换压力, 从而达到减少宿主 机内存性能 、 输入输出性能的降低概率, 以及更进一步的, 提高宿主机的运行平稳性 的效果, 进一步的, 还可以提高用户所使用的、 运行与宿主机中的虚拟机的运行平稳 性, 从而提高用户使用体验。 参见图 2, 图 2示出了根据本说明书一个实施例提供的一种内存超分处理 方法的 流程图, 应用于宿主机, 所述宿主机运行有多个虚拟机, 具体包括以下步骤。 步骤 202: 确定所述多个虚拟机在第一历史时间段的缺页状态数据。 其中, 宿主机可以理解为上述宿主机 104, 宿主机操作系统重运行有内存超分处 理系统, 该内存超分处理系统可以实现 对宿主机的内存进行 内存超分处理; 虚拟机可 以理解为上述 虚拟机 106o 缺页状态数据可 以理解为用于描述缺页 事件的相关数据和/或 缺页所带来的影响 数据, 例如, 缺页状态数据可以理解为缺页事件发生情况 (例如缺页次数) 、 缺页类 型 (例如主缺页、 次缺页) 、 缺页原因 (例如首次访问、 内存不足导致替换、 共享资 源访问) 、 缺页率、 缺页影响 (响应时间、 CPU利用率、 CPU性能、 磁盘 I/O性能) 等 等 ° 第一历史时间段可 以理解为一个或者多个历史时 间段, 例如, 一个第一历史时间 段可以理解 为 2024年 1月 1日 10点 30分 00秒至 2024年 1月 1日 10点 30分 05秒, 或者一个第 一历史时间段可以理解为 2024年 1月 1 日 10点 30分 00秒至 2024年 1 月 1日 11点 00分 00秒, 再或者, 一个第一历史时间段可以理解为 2024年 1月 1日 10点 30分 00秒至 2024年 1月 1日 22点 30分 00秒等等。 基于此, 虚拟机在第一历史时间段的缺页状态数据 可以理解为虚拟机的缺页状 态 数据中, 数据时间戳位于第一历史时间段 的缺页状态数据。 实际应用中, 本说明书实施例提供的一种内存超分 处理方法可以按照调度周 期进 行内存超 分处理, 即在每个调度周期进行每一次 的内存超分, 例如, 调度周期为 5s 的情况下 , 在每个调度周期进行每一次的内存超分可以理解为, 每 5秒进行一次内存 超分处理 ; 以在当前调度时刻为例 , 内存超分处理服务器可以根据当前的调度时刻, 计算得 到第一历史 时间段, 具体实现方式如下所述: 所述确定所述多个虚拟机在 第一历史时间段的缺页状态 数据之前, 还包括: 确定当前调度时刻以及预 设时长, 并根据所述当前调度时刻以及所述预设时长 , 确定第一历史 时间段, 其中, 所述当前调度时刻为所述未来时间段的时间起点。 具体的, 当前调度时刻可以理解为当前内存超分处 理服务器进行内存超分处 理的 开始时刻 , 预设时长可以理解为预先设置的一种或多种时间维度 , 以分析一种或多种 时间维度下 多个虚拟机的缺页状态数据 。 未来时间段可以理解为 与当前调度周期所对应的 时间段一致的时间段, 例如, 调 度周期的长度 设置为 5s, 当前调度时刻 2024年 1月 1日 10点 30分 00秒, 则当前调 度周期对应 的时间段为 2024年 1月 1日 10点 30分 00秒至 2024年 1月 1日 10点 30 分 05秒, 基于此, 未来时间段可以理解为 2024年 1月 1 日 10点 30分 00秒至 2024 年 1月 1日 10点 30分 05秒。 时间起点可以理解为时 间段的起点, 时间段的起点可以理解为该时间段的最 早时 刻, 也可以理解为该时间段的最晚时刻 , 为便于理解, 本说明书实施例以时间段的起 点理解为时 间段的最早时刻, 以时间段的时间终点理解为时间段 的最晚时刻为例进行 示例性说 明, 但不限定于此, 具体实施时可以根据需求设置; 例如一个时间段 2024 年 1月 1日 10点 30分 00秒至 2024年 1月 1日 10点 30分 10秒,其时间起点为 2024 年 1月 1日 10点 30分 00秒。 具体实施时, 确定当前调度时刻以及预设时长, 并根据所述当前调度时刻 以及所 述预设时长 , 确定第一历史时间段, 可以理解为, 以当前调度时刻为一个时间终点, 以预设时长 为一个时长长度, 根据该时间终点以及该时长长度 , 可以确定出对应的一 个时间起 点, 进而, 将该时间起点与该时间终点之间的时间段, 确定为第一历史时间 段。 例如, 当前调度时刻为 2024年 1月 1日 10点 30分 00秒, 预设时长为 5s, 根据 当前调度时刻 以及预设时长可以确定第一 历史时间段为 2024年 1月 1 日 10点 29分 55秒至 2024年 1月 1日 10点 30分 00秒。 本说明书实施例提供 的一种内存超分处理方法, 通过利用当前调度时刻以及 预设 时长, 确定第一历史时间段, 使得确定的多个虚拟机在第一历史时 间段的缺页状态数 据与当前调 度时刻更接近, 从而提高了后续根据多个虚拟机在第 一历史时间段的缺页 状态数据进 行的内存超分处理的准确性 ,并且,在每个调度周期均进行内存超分处理, 从而可 以根据各个虚拟机的动态信息 , 进行动态的内存超分处理, 进一步减少了宿主 机内存性能 、 输入输出性能的降低概率, 以及提高了对宿主机的运行平稳性。 实际应用中, 为了提高根据缺页状态数据进行的后 续内存超分处理的准确性 , 可 以从多个时 间维度确定缺页状态数据, 具体实现方式如下所述。 所述预设时长包括第一预 设时长、 第二预设时长、 第三预设时长; 所述根据所述当前调度时 刻以及所述预设时长, 确定第一历史时间段, 包括: 根据所述当前调度时刻 、 所述第一预设时长、 所述第二预设时长、 所述第三预设 时长, 确定三个第一历史时间段。 其中, 第一预设时长、 第二预设时长、 第三预设时长可以理解为三个不同时间长 度的预设时 长,例如,第一预设时长可以理解为 5s,第二预设时长可以理解为半小时, 第三预设时 长可以理解为 12小时; 再或者, 第一预设时长可以理解为 10s, 第二预设 时长可 以理解为 1分钟, 第三预设时长可以理解为 1小时, 实际应用中, 第一预设时 长、 第二预设时长以及第三预设时长 的设置可以根据实际需求设置 , 本说明书实施例 对此不做 限定, 此外, 为了便于解释, 本说明书实施例以第一预设时长小于第二预设 时长, 第二预设时长小于第三预设时长 为例进行后续解释说 明, 但本说明书不限定于 此大小限定 关系。 进一步的, 在第一预设时长小于第二预设时长, 第二预设时长小于第三预设 时长 的情况下 , 第一预设时长的时间长度可以理解为用于观察突发缺 页的时间长度; 第二 预设时长 的时间长度可以理解为用于观 察短期缺页的时间长度 ; 第三预设时长可以理 解为用于观 察长期缺页的时间长度 ; 其中, 突发缺页、 短期缺页、 长期缺页为三种时 间维度下 的缺页状态。 突发缺页可以理解为 内存中突发的加载超出物理 内存限制的页面的情况下 , 未存 储在物理 内存中的内存所导致的内存缺 页状态; 短期缺页可以理解为在物理页面中, 某些页面在 较短时间内 (例如半小时、 一小时) 不会被使用, 物理页面在内存不足的 情况下将该 页面从内存中加载至磁盘 , 但是超过该较短时间之后该页面会被使用, 并 由此产生 的该页面的缺页状态; 长期缺页可以理解为在物理页面 中, 某些不常使用页 面在较长时 间内 (例如半天、 一天) 不会被使用, 由于使用该不常使用页面所产生的 缺页状态 。 基于此, 第一预设时长、 第二预设时长、 第三预设时长可以理解为针对三种缺页 状态对应 的时间维度所预设的三个不 同时间长度的预设时长, 并相应的, 根据当前调 度时刻、 第一预设时长、 第二预设时长、 第三预设时长, 确定三个第一历史时间段可 以理解为与 当前调度时刻相对应的三个 时间维度下的第一历史时 间段, 即用于观测突 发缺页的第 一历史时间段、 用于观测短期缺页的第二历史时间段 、 用于观测长期缺页 的第三历史 时间段。 具体实施时, 根据当前调度时刻与第一预设时长可 以确定一个第一历史时间段 , 根据当前调 度时刻与第二预设时长可 以确定另一个第一历史时间段 , 根据当前调度时 刻与第三预 设时长可以确定又一个第一历 史时间段,从而确定出三个第一历史时间段; 具体的, 根据当前调度时刻与某一个预 设时长确定对应的第一历史 时间段的具体实现 可参见上述 说明书实施例, 在此不再赘述。 本说明书实施例提供 的一种内存超分处理方法, 通过当前调度时刻和三个不 同的 预设时长 , 确定分别对应的三个第一历史时间段, 使得后续可以从三个时间维度进行 缺页信息 的分析, 提高了缺页信息的丰富程度。 实际应用中, 在确定了三个第一历史时间段后, 可以确定三个历史时间段分别对 应的缺页状态 数据, 以提高数据丰富度, 具体实现方式如下所述。 所述确定所述多个虚拟机在 第一历史时间段的缺页状态 数据, 包括: 确定所述多个虚拟机在所 述三个第一历史时间段 中各第一历史时间段的缺页状 态 数据。 本说明书实施例提供 的一种内存超分处理方法, 通过三个时间维度, 确定多个虚 拟机在三个 第一历史时间段的缺页状态 数据, 使得缺页状态数据更丰富, 并且, 避免 了单一时 间维度观测的缺页状态数据存 在误差、 而导致后续内存超分处理过程不准确 的问题, 从而进一步提高了后续根据该缺 页状态数据进行的内存超分 处理的准确性。 步骤 204: 根据所述缺页状态数据, 确定所述多个虚拟机的性能损失结果。 其中, 性能损失结果可以理解为对虚拟机性能的损失进 行评分的结果。 具体的, 由于缺页状态数据中包含有缺页事件发生 情况 (例如缺页次数) 、 缺页 类型 (例如主缺页、 次缺页) 、 缺页原因 (例如首次访问、 内存不足导致替换、 共享 资源访 问) 、 缺页率、 缺页影响 (响应时间、 CPU利用率、 CPU性能、 磁盘 I/O性能) 等数据的一 种或者多种, 在根据缺页状态数据进行虚拟机性能损 失评估时, 可以根据 实际需求选 取较为合适的数据, 并根据选取的数据进行虚拟机性 能损失评估, 需要说 明的是, 下述本说明书实施例以缺页状 态数据包括缺页次数 以及缺页代价为例进行示 例性说明 , 但不限定于此。 实际应用中, 在缺页状态数据包括缺页次数以及缺 页代价的情况下, 根据缺页状 态数据确定多个 虚拟机的性能损失的具体 实现方式如下所述。 所述缺页状态数据包括缺 页次数以及缺页代价; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 确定所述多个虚拟机在所述第一历史时间段的缺页次 数 以及缺页代价 ; 确定所述多个虚拟机针对 所述第一历史时间段的缺 页次数的第一性能损失结果 、 以及所述多个 虚拟机针对所述第一历史 时间段的缺页代价的第二性 能损失结果; 利用所述第一性能损失 结果的权重、 以及所述第二性能损失结果的权重, 对所述 多个虚拟机 针对所述第一历史时间段 的缺页次数的第一性能损失 结果、 以及所述多个 虚拟机针对 所述第一历史时间段的缺页 代价的第二性能损失结果 , 进行加权求和处理 以及归一化 处理, 确定所述多个虚拟机的性能损失结果。 具体的, 缺页次数 (下述表示为 pf) 可以理解为缺页发生的次数, 虚拟机的缺页 次数可 以理解为虚拟机在运行过程中导致 缺页发生的次数; 缺页代价可以理解为由于 缺页导致 的 CPU额外的性能使用量, 例如, 缺页代价 (下述表示为 psi) 可以理解为 由于缺页导致 的 CPU的额外的时间消耗量、 功耗消耗量等。 基于此, 在上述获得缺页状态数据之后, 根据该缺页状态数据, 可以确定多个虚 拟机在第一 历史时间段的缺页次数 以及缺页代价, 从而根据多个虚拟机针对缺页次数 的第一性能 损失结果以及针对缺页代价 的第二性能损失结果、 以及第一性能损失结果 和第二性能 损失结果各自的权重, 对第一性能损失结果和第二性 能损失结果进行加权 求和以及归 一化处理, 可以得到多个虚拟机中各个虚拟机的性能损失 结果。 例如, 某一个虚拟机在第一历史时间段的缺页次数可 以理解为 2次, 该虚拟机针 对缺页次数 的第一性能损失结果可 以理解为 2, 再例如, 某一个虚拟机在第一历史时 间段的缺页 次数可以理解为 5次, 该虚拟机针对缺页次数的第一性能损失结果可以理 解为 5; 在缺页代价理解为由于缺页导致的 CPU的时间开销的情况下, 某一个虚拟机 在第一历史 时间段的缺页代价可以理解为 10ms. 20ms等, 相对应的, 该虚拟机针对缺 页代价的第 二性能损失结果可以理解为 500J、 600J等, 或者在缺页代价理解为由于缺 页导致的 CPU的功耗开销的情况下, 某一个虚拟机在第一历史时间段的缺页代价 可以 理解为 500、 600等。 在确定多个虚拟机的第一 性能损失结果和第二性能损 失结果的情况下, 可以根据 多个虚拟机 的第一性能损失结果和第二 性能损失结果各自的权重 , 对第一性能损失结 果和第二性 能损失结果进行加权求和 , 以及归一化处理, 其中, 归一化处理可以理解 为将第一性 能损失结果和第二性能损失结 果进行加权求和所得到 的求和结果归一为(0, 1) 之间的值, 以获得多个虚拟机中的各个虚拟机的性能损失结果。 需要说明的是, 上述第一损失结果的权重以及第二 损失结果的权重可以根据 实际 需求进行设 置, 本说明书实施例对第一损失结果的权重以及第二损 失结果的权重的数 值不做限定 。 本说明书实施例提供 的一种内存超分处理方法, 通过具体利用缺页状态数据所 包 含的缺页次数 、缺页代价进行性能损失结果的确定,使得对缺页信息的分析更加全面 , 提高了性能 损失结果的准确性, 并且, 通过对第一损失结果以及第二损失结果的加权 求和以及归 一化处理, 使得确定的多个虚拟机的性能损失数据更具 规范性, 提高了后 续确定的多个虚 拟机中各个虚拟机的 内存超分指标的准确性。 实际应用中, 在上述第一历史时间段为三个的情况 下, 还可以根据多个虚拟机在 三个第一历 史时间段的缺页状态数据 , 确定多个虚拟机的性能损失数据, 具体实现方 式如下所述 。 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述多个虚拟机在所 述各第一历史时间段的缺 页状态数据, 确定所述多个虚 拟机在所述 各第一历史时间段的性能损失 结果; 利用所述多个虚拟机在所 述各第一历史时间段对应 的权重, 对所述多个虚拟机在 所述各第一 历史时间段的性能损失结 果进行加权求和处理以及归 一化处理, 确定所述 多个虚拟机 的性能损失结果。 具体的, 在上述根据当前调度时刻、 第一预设时长、 第二预设时长、 第三预设时 长确定三个第 一历史时间段的情况下 , 根据多个虚拟机在各个第一历史时间段的缺页 状态数据 , 可以确定多个虚拟机在各个第一历史时间段的性能损失结 果。 在所述各第一历史时 间段对应的权重可以理解为各 个第一历史时间段对应的权 重, 例如三个第 一历史时间段的权重可 以理解为 0. 2、 0. 3、 0. 5, 或者三个第一历史时间 段的权重可 以理解为 0. 4、 0. 3、 0. 3等。 基于此, 多个虚拟机在各第一历史时间段对应 的权重可以理解为多个虚拟机 中各 个虚拟机 的各个第一历史时间段对应 的权重, 例如, 各个虚拟机在各第一历史时间段 对应的权重 可以理解为 0. 2、 0. 3、 0. 5或者 0. 4、 0. 3、 0. 3, 多个虚拟机针对同一个 第一历史时 间段的权重相同。 进一步的, 在确定了多个虚拟机在各第一历史时 间段的权重, 以及多个虚拟机在 各第一历史 时间段的性能损失结果之后 , 利用各第一历史时间段的权重, 对多个虚拟 机在各第一 历史时间段的性能损失结果 进行加权求和以及归一化 处理, 从而确定出多 个虚拟机各 自的性能损失结果。 需要说明的是, 各第一历史时间段对应的权重也 可以根据实际需求进行设置 , 可 以用于针对 性的提高某一个第一历史时 间段的侧重。 本说明书实施例提供 的一种内存超分处理方法, 通过对三个第一历史时间段 的性 能损失结果 进行加权求和以及归一化处 理, 使得对三个第一历史时间段的性能损失分 析可以从多 个时间维度综合分析, 并可以考虑重点侧重的时间维度 , 提高对多个虚拟 机的性能损 失分析的准确性, 进一步的, 通过归一化后的结果对比, 提高性能损失结 果的规范化程 度, 以及提高了后续获得的内存超分指标的准确性 。 实际应用中, 在第一历史时间段为三个的情况下 , 缺页状态数据还可以包括缺页 次数以及缺 页代价, 从而可以综合三个历史时间段的考虑以及两种 缺页状态数据的考 虑, 使得对性能损失结果的分析更加全面 以及更加准确, 具体实现方式如下所述: 所述缺页状态数据包括缺 页次数以及缺页代价; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 确定所述多个虚拟机在所述第一历史时间段的缺页次 数 以及缺页代价 ; 确定所述多个虚拟机针对 所述第一历史时间段的缺 页次数的第一性能损失结果 、 以及所述多个 虚拟机针对所述第一历史 时间段的缺页代价的第二性 能损失结果; 利用所述第一性能损失 结果的权重、 以及所述第二性能损失结果的权重, 对所述 多个虚拟机 针对所述第一历史时间段 的缺页次数的第一性能损失 结果、 以及所述多个 虚拟机针对 所述第一历史时间段的缺页 代价的第二性能损失结果 , 进行加权求和处理 以及归一化 处理, 确定所述多个虚拟机的性能损失结果。 具体的, 为了便于区分, 将三个第一历史时间段标记为 burst (即突发缺页对应 的第一历史 时间段) 、 short (即短期缺页对应的第一历史时间段) 、 long(即长期缺 页对应的第 一历史时间段), 其中 , burst时长小于 short时长, short时长小于 long 述第二历史 时间段与所述未来时间段 的时长相同。 具体的, 冷页可以理解为虚拟机在一段时间内未被使用 过的内存页, 例如 7天内 未被使用过 的内存页, 8 天内未被使用过的内存页等, 冷页数据可以理解为冷页相关 的数据, 包括但不限于冷页量、 冷页类型、 冷页所占内存等, 第二历史时间段可以理 解为与调度 周期的时长相同的、 历史的一个或者多个时间段, 未来时间段可以理解为 当前的调度周 期 (即上述当前调度周期) 。 实际应用中,可以通过时序预测方法,利用历史的冷页数据预测未来 的冷页数据; 例如,可以通过时序预测模型实 现上述对多个虚拟机在未来 时间段的冷页数据的预测 , 以提高预测 效率和准确性, 具体实现方式如下所述: 所述根据所述多个虚拟机 在第二历史时间段的历 史冷页数据, 确定所述多个虚拟 机在未来时 间段的预测冷页数据, 包括: 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 利用时序预测模型, 确 定所述多个 虚拟机在未来时间段的预测 冷页数据, 其中, 所述时序预测模型为机器学 习模型。 其中, 时序预测模型可以理解为用来基于历史数据 , 预测未来一段时间的数据的 模型, 例如 Holt-Winters 模型、 自回归模型 (Autoregressive Model, AR)等用于进 行时序预测 的机器学习模型。 具体的,根据多个虚拟机在第二历史时间段的历 史冷页数据,利用时序预测模型, 确定多个虚拟 机在未来时间段的预测冷 页数据, 可以理解为, 将多个虚拟机在第二历 史时间段 的历史冷页数据, 分别输入至时序预测模型, 并分别获得时序预测模型输出 的多个虚拟机 在未来时间段的预测冷页数 据。 需要说明的是, 时序预测模型可以为第三方预先训练好的, 也可以为宿主机 /虚拟 机根据多个 虚拟机在多个历史时间段 的历史冷页数据进行训练获得 的, 本说明书实施 例对时序预测 模型训练过程不再赘述 。 例如, 在冷页数据理解为冷页量的情况下, 一个虚拟机在 2024年 1月 1 日 10点 00分 00秒至 2024年 1月 1日 10点 30分 00秒的冷页数据为 30个冷页, 根据该虚拟 机在第二历 史时间段的冷页数据, 可预测得到该虚拟机在 2024年 1月 1 日 10点 00 分 00秒至 2024年 1月 1日 10点 30分 00秒的冷页数据为 60个冷页。 本说明书实施例提供 的一种内存超分处理方法, 通过根据多个虚拟机在第二 历史 时间段的历 史冷页数据, 预测得到未来时间段的预测冷页数据 , 使得宿主机可以参考 多个虚拟机 在未来时间段可以承担 的内存超分量进行后续内存超 分处理 (即虚拟机可 以承担等于 或者低于其冷页数据的 内存超分量) , 避免了由于内存超分过大而导致多 个虚拟机 的缺页增加, 从而降低了宿主机性能降低的概率。 步骤 208: 根据所述性能损失结果以及所述预测冷页数据, 确定所述多个虚拟机 在所述未来 时间段的内存超分指标。 其中, 内存超分指标可以理解为内存超量分配的配 额指标, 例如, 内存超分指标 可以理解为 一个虚拟机可以承担的内存超 分量, 即上述 quota。 具体的, 性能损失结果表征多个虚拟机需要承担 的内存超分量, 预测冷页数据表 征多个虚拟 机可以承担的内存超分量 限额, 基于性能损失结果以及预测冷页数据, 可 以确定宿主机 分配给多个虚拟机的、 在未来时间段的内存超分指标 。 实际应用中, 上述根据性能损失结果以及预测冷页 数据, 确定多个虚拟机在未来 时间段的 内存超分指标的具体实现方式如 下所述。 所述根据所述性能损失 结果以及所述预测冷页数据 , 确定所述多个虚拟机在所述 未来时间段 的内存超分指标, 包括: 根据所述性能损失结果 , 确定所述多个虚拟机的内存超分比例; 根据所述内存超分 比例以及所述宿主机的内存超分 量, 确定所述多个虚拟机的初 始内存超分 指标; 根据所述多个虚拟机 的初始内存超分指标以及预测 冷页数据, 确定所述多个虚拟 机在所述未 来时间段的内存超分指标 。 其中, 内存超分比例可以理解为需要承担的内存超 分量的比例, 多个虚拟机的内 存超分 比例总和为 l o 根据性能损失结果, 确定多个虚拟机的内存超分 比例, 可以理解为, 根据多个虚 拟机的性能 损失结果之间的数值比例 , 确定出多个虚拟机的内存超分比例, 具体实现 方式如下所述 : 所述根据所述性能损失结 果, 确定所述多个虚拟机的内存超分比例, 包括: 将所述多个虚拟机的性能 损失结果相加, 获得性能损失结果总和; 根据各虚拟机的性能损 失结果相对于所述性能损失 结果总和的占比, 确定所述多 个虚拟机 中各虚拟机的内存超分比例 。 其中, 性能损失结果总和可以理解为多个虚拟机 的性能损失结果相加所得到 的总 和 O 例如, 多个虚拟机包括虚拟机 1、 虚拟机 2、 虚拟机 3, 虚拟机 1的性能损失结果 为 0. 1 , 虚拟机 2的性能损失结果为 0. 2, 虚拟机 3的性能损失结果为 0. 2, 虚拟机 1 的 内存超分 比例为 0. 1/ (0. 1+0. 2+0. 2) , 即 20% , 虚拟机 2 的内存超分比例为 0. 2/ (0. 1+0. 2+0. 2) ,即 40%,虚拟机 3的内存超分比例为 0. 2/ (0. 1+0. 2+0. 2) ,即 40%。 本说明书实施例提供 的一种内存超分处理方法, 通过根据各虚拟机的性能损 失结 果在各虚拟 机的性能损失结果总和 的占比, 确定各虚拟机的内存超分比例, 即受损越 多, 虚拟机需要承担的内存超分比例越 高, 使得内存超分比例可以考虑各虚拟机需要 的内存超分量 , 提高了内存超分比例的准确性。 进一步的, 初始内存指标可以理解为多个虚拟机 中各个虚拟机需要承担的 内存超 分量; 基于此, 根据多个虚拟机的内存超分比例以及宿主机的 内存超分量, 可以确定 多个虚拟机 的初始内存指标。 沿用上例, 例如宿主机的内存超分量为 lOOquota, 根据上述三个虚拟机各自的内 存超分 比例, 可以确定虚拟机 1 的初始内存指标为 100*20%, 即 20quota, 虚拟机 2 的初始 内存指标为 100*40%, 即 40quota, 虚拟机 3 的初始内存指标为 100*40%, 即 40quotao 在确定多个虚拟机的初始 内存超分指标以及预测冷 页数据的情况下, 根据多个虚 拟机的初始 内存指标以及预测冷页数据 , 即确定多个虚拟机需要承担的内存指标以及 可以承担 的内存指标, 据此可确定多个虚拟机的内存超分指标。 本说明书实施例提供 的内存超分处理方法, 宿主机通过对多个虚拟机的受损感 知 (即利用根据性能损 失结果确定的初始内存指标) , 以及负载预测 (即利用上述预测 得到的预测 冷页数据) , 确定多个虚拟机的内存超分指标, 综合考虑多个虚拟机需要 承担的 内存超分量以及可以承担的 内存超分量, 使得内存超分指标的确定更加合理以 及准确, 从而降低内存故障的概率 (即虚拟机发生缺页中断的概率) , 极大提高宿主 机的运行平稳 性。 实际应用中, 根据多个虚拟机的初始内存指标 以及预测冷页数据, 确定多个虚拟 机的内存超 分指标, 具体实现方式可以如下所述。 所述根据所述多个虚拟机 的初始内存超分指标 以及预测冷页数据, 确定所述多个 虚拟机在所述 未来时间段的内存超分指标 , 包括: 依次从所述多个虚拟机 中确定目标虚拟机; 在所述目标虚拟机的初 始内存超分指标, 大于等于所述目标虚拟机的预测冷 页数 据的情况下 , 将所述预测冷页数据中包含的内存指标, 确定为所述目标虚拟机在所述 未来时间段 的内存超分指标; 或者 在所述目标虚拟机的初 始内存超分指标, 小于所述目标虚拟机的预测冷页数据 的 情况下, 将所述初始内存超分指标 , 确定为所述目标虚拟机在所述未来时间段的内存 超分指标 ; 根据所述目标虚拟机在所 述未来时间段的内存超分 指标, 确定所述多个虚拟机在 所述未来时 间段的内存超分指标。 具体的, 在上述确定了在确定多个虚拟机的初始 内存超分指标以及预测冷页数据 的情况下 , 可以将每个虚拟机的初始内存指标以及预测冷页数据 中的较小值确定为每 个虚拟机 的内存超分指标。 沿用上例, 例如虚拟机 1的预测冷页数据为 100冷页量, 虚拟机 2的预测冷页数 据为 20冷页量, 虚拟机 3的预测冷页数据为 60冷页量, 结合上述虚拟机 1、 2、 3的 初始内存指标 , 可以确定虚拟机 1的内存超分指标为 min (100, 20) , 即 20, 虚拟机 2 的内存超分 指标为 min ( 20, 40) , 即 20,虚拟机 2的内存超分指标为 min ( 60, 40) , 即 40 o 本说明书实施例提供 的内存超分处理方法, 通过将多个虚拟机的初始内存指标 以 及预测冷页 数据中的较小值确定为多个虚 拟机的内存超分指标, 以保证内存超分量不 超出虚拟机 可以承担的内存超分量 , 由于对多个虚拟机的内存超分处理可以通过多个 虚拟机的冷 页数据实现, 而无需处理多个虚拟机使用频率较高 的内存页, 避免了虚拟 机承担较高 的内存超分量而导致的缺页 增加的情况, 从而进一步提高了多个虚拟机的 运行稳定性 , 以及降低缺页对宿主机性能的影响。 实际应用中, 还可以对上述分配过程中未分配的 内存超分量进行二次分配 , 具体 实现方式如 下所述。 所述确定所述多个虚拟机在 所述未来时间段的内存超分 指标之后, 包括: 根据所述多个虚拟机在所 述未来时间段的内存超分指标 , 确定总内存超分指标; 在确定所述总内存超分指 标小于所述宿主机的 内存超分量的情况下, 根据所述多 个虚拟机在 所述未来时间段的内存超分 指标与预测冷页数据, 从所述多个虚拟机中确 定待补充虚拟 机; 确定所述总内存超分指标与 所述宿主机的内存超分量 的超分差值; 根据所述待补充虚拟机 的性能损失结果, 确定所述待补充虚拟机的补充内存超 分 比例; 根据所述超分差值 以及所述补充内存超分比例, 确定所述待补充虚拟机的补充 内 存超分指标 。 其中,总内存超分指标可以理解为多个虚拟机 在未来时间段的内存超分指 标的和, 根据总 内存超分指标可以确定宿主机 的内存超分量中已分配的 内存超分量; 待补充虚 拟机可 以理解为待补充分配内存超分量 的虚拟机; 总内存超分指标与宿主机的内存超 分量的超分 差值可以理解为总内存超分 指标包含的页面数量、 与宿主机的内存超分量 包含的页面数 量之间的页面数量差值 ; 补充内存超分比例可 以理解为待补充虚拟机需要补 充分配内存超分量的页面数 量 占上述超分 差值的比例, 根据该比例以及超分差值, 即可确定待补充虚拟机需要补充 分配内存超 分量的页面数量, 即补充内存超分指标。 沿用上例, 宿主机的内存超分量为 100, 三个虚拟机在未来时间段的内存超分指 标分别为 20, 20, 40, 总内存超分指标为 20+20+40, 即 80, 总内存超分指标小于宿 主机的 内存超分量, 据此可以确定总内存超分指标与宿主机的 内存超分量的超分差值 为 20o 根据多个虚拟机在未来 时间段的内存超分指标与预 测冷页数据, 从多个虚拟机中 确定待补充虚 拟机, 可以理解为, 根据多个虚拟机在未来时间段的内存超分指标与预 测冷页数据 , 确定多个虚拟机中, 在未来时间段的内存超分指标小于预测冷页数据的 虚拟机, 并将其确定为待补充虚拟机。 可选的, 根据多个虚拟机在未来时间段的内存超分 指标与预测冷页数据, 从多个 虚拟机中确定 待补充虚拟机, 还可以理解为, 根据多个虚拟机在未来时间段的内存超 分指标与预 测冷页数据, 确定多个虚拟机中, 在未来时间段的内存超分指标小于预设 内存超分指标 参考值和/或预测冷页数据小于 预设预测冷页数据参考值 的虚拟机,并将 其确定为待补 充虚拟机。 以确定多个虚拟机中,在未来时间段的内存超 分指标小于预测冷页数据 的虚拟机, 并将其确定为待 补充虚拟机为例, 仍沿用上例, 虚拟机 1的内存超分指标为 20, 预测 冷页数据为 100冷页量, 虚拟机 1的内存超分指标小于虚拟机 1的预测冷页数据, 将 虚拟机 1确定为待补充虚拟机, 同理可将虚拟机 3确定为待补充虚拟机。 在确定了待补充虚拟机之 后, 按照各个待补充虚拟机的性能损失结果, 确定各个 待补充虚拟机 需要补充的内存超分量 的比例, 继续沿用上例, 虚拟机 1的性能损失数 据为 0. 1 , 虚拟机 3的性能损失数据为 0. 2, 因此, 虚拟机 1需要补充的内存超分量的 比例 (即补充内存超分比例) 为 0. 1/ ( 0. 1+0. 2 ) , 即 0. 33, 虚拟机 2需要补充的内 存超分量 的比例 (即补充内存超分比例) 为 0. 2 / ( 0. 1+0. 2) , 即 0. 67。 进一步的, 根据超分差值以及补充内存超分比例 , 确定所述待补充虚拟机的补充 内存超分指标 , 还沿用上例, 虚拟机 1补充超分比例为 0. 33, 根据超分差值与补充超 分比例的乘积 20*0. 33, 可以得到虚拟机 1 的补充内存超分指标, 即 6. 6; 虚拟机 2 补充超分 比例为 0. 67, 根据超分差值与补充超分比例的乘积 20*0. 67, 可以得到虚拟 机 1的补充内存超分指标, 即 13. 4。 本说明书实施例提供 的内存超分处理方法, 通过在确定多个虚拟机在未来时 间段 的内存超分 指标之后, 将宿主机的内存超分量中未分配的内存超 分量进行二次内存超 分, 使得宿主机的全部的内存超分量均 能够虚拟机所承担, 保证了宿主机的内存水位 的平稳, 提高了宿主机运行稳定性。 实际应用中, 宿主机的内存超分量确定的具体实现方式 可以如下所述。 所述根据所述内存超分 比例以及所述宿主机的 内存超分量, 确定所述多个虚拟机 的初始 内存超分指标之前, 还包括: 确定内存量控制参数, 根据所述内存量控制参数 , 确定所述宿主机在所述未来时 间段的预测 内存量; 确定所述多个虚拟机当前 已使用内存量以及当前空 闲内存量, 并根据所述预测内 存量、 所述当前已使用内存量、 以及所述当前空闲内存量, 确定所述宿主机的内存超 分量。 其中, 内存量控制参数可以理解为用户输入的配置 参数, 即用户需要配置的宿主 机在未来时 间段的总的虚拟内存水位 的配置参数, 根据该配置参数, 可以确定未来时 间段内,宿主机虚拟内存中内存页 的页面数量,即宿主机在未来时间段的预测内存量 。 多个虚拟机当前已使用 内存量可以理解为多个虚拟 机当前已使用的虚拟内存 的页 面数量, 当前空闲内存量可以理解为当前未被任何虚拟机所使用 的虚拟内存的页面数 量。 具体实施时, 在确定宿主机在未来时间段的预测 内存量、 多个虚拟机当前已使用 内存量 以及当前空闲内存量之后, 将宿主机在未来时间段的预测 内存量减去多个虚拟 机当前 已使用内存量以及当前空闲 内存量, 可得到宿主机需要进行超分的内存量, 即 宿主机的 内存超分量, 例如宿主机在未来时间段的预测内存量为 1000, 多个虚拟机当 前已使用 内存量 600, 当前空闲内存量 300, 根据 1000-600-300, 可以确定宿主机的 内存超分量 为 100o 本说明书实施例提供 的内存超分处理方法, 通过在确定多个虚拟机在未来时 间段 的内存超分 指标之后, 将宿主机的内存超分量中未分配的内存超 分量进行二次内存超 分, 使得宿主机的全部的内存超分量均 能够虚拟机所承担, 保证了宿主机的内存水位 的平稳, 提高了宿主机运行稳定性。 实际应用中, 在确定内存超分指标之后, 可以对多个虚拟机进行页面置换, 以实 现动态的 内存超分, 具体实现方式如下所述。 所述根据所述性能损失 结果以及所述预测冷页数据 , 确定所述多个虚拟机在所述 未来时间段 的内存超分指标之后, 还包括: 根据所述内存超分指标 , 确定所述多个虚拟机的目标内存页; 将所述目标内存页置换 至页面交换空间, 其中, 所述页面交换空间为不同于内存 的存储空 间。 其中, 目标内存页可以理解为多个虚拟机中的冷页 , 页面交换空间包括但不限于 磁盘 (HDD) 、 固态硬盘 (SSD) 、 存储卡等。 具体的, 根据上述各个虚拟机的内存超分指标 , 可以确定各个虚拟机需要进行页 面置换的冷 页, 即目标内存页, 并对各个虚拟机中需要进行页面置换的冷页进行页面 置换, 即将目标内存页置换至页面交换 空间, 页面交换空间可以根据实际需要选择, 本说明书对此 不做限定。 本说明书实施例提供 的内存超分处理方法, 根据上述确定的内存超分指标, 确定 多个虚拟机 中的目标内存页, 并将目标内存页置换到不同于 内存的存储空间中, 实现 宿主机的 内存超分, 即使各个虚拟机的虚拟内存得到扩大, 且由于目标内存页为各个 虚拟机的冷 页, 在实现内存超分的同时, 还降低了内存超分对虚拟机运行的影响。 实际应用中, 还可以配置算法池, 并预存多个性能损失算法以及多个冷页预测 算 法, 以实现内存超分处理的优化, 具体实现方式如下所述。 所述确定所述多个虚拟机在 第一历史时间段的缺页状态 数据之后, 还包括: 从算法池中确定目标性能 损失算法以及目标冷页预测 算法, 其中, 所述算法池中 包括至少两个 性能损失算法以及至少两个冷 页预测算法; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 利用所述目标性能损失算法, 确定所述多个虚拟机的性 能损失结果 ; 所述根据所述多个虚拟机 在第二历史时间段的历史 冷页数据, 确定所述多个虚拟 机在未来时 间段的预测冷页数据, 包括: 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 利用所述目标冷页预测 算法, 确定所述多个虚拟机在未来时间段 的预测冷页数据。 其中, 算法池中包含有多个可选择的性能损失算法 以及冷页预测算法, 算法池中 各算法可插拔 , 实现算法替换。 例如, 一个性能损失算法可以理解为上述根据缺页 状态数据确定多个虚拟机 的性 能损失结果 的具体实现, 或者还可以理解为根据当前调度时刻之前 的 5秒内虚拟机发 生的缺页次数 以及调度周期确定受损值 , 或者其他性能损失算法等。 一个冷页预测算法可 以理解为可以理解为上述确定 多个虚拟机的预测冷页数据 的 具体实现 , 或者还可以理解为利用多个虚拟机的当前调度周期之 前的五次调度周期的 冷页量的平 均值, 确定为当前调度周期的预测冷页数据, 即多个虚拟机在未来时间段 的预测冷页数 据。 或者其他冷页预测算法等。 本说明书实施例提供 的内存超分处理方法, 通过设计可插拔的算法池, 提高了内 存超分处理 的可扩展性, 并通过在每个调度周期, 动态从算法池中选择性能损失算法 和冷页预测 算法, 提高了内存超分处理的适应性、 灵活性以及算法故障的恢复能力, 并且, 后续可以通过向算法池中添加新 算法, 使得新算法的使用更便捷, 便于内存超 分处理的后 续优化。 实际应用中, 可以从算法池中选择一个性能损失算 法和一个冷页预测算法作 为算 法组合, 利用算法组合实现上述内存超分 处理方法, 具体实现方式如下所述。 所述从算法池中确定 目标性能损失算法以及目标冷页预 测算法, 包括: 从所述算法池中确定多个 算法组合, 其中, 所述多个算法组合中的任意一个算法 组合包括一个 性能损失算法以及一个冷页 预测算法; 将多个算法组合确定为初始 算法组合; 根据确定的多个仿真虚拟 机的仿真缺页状态数据 、 以及所述多个仿真虚拟机在第 二仿真历史 时间段的仿真历史冷页数据 , 利用所述初始算法组合进行数据处理, 获得 所述初始算 法组合对应的、 所述多个仿真虚拟机在仿真未来时 间段的初始内存超分指 标; 根据各初始内存超分指标 , 确定目标内存超分指标, 并根据所述目标内存超分指 标对应的 目标算法组合, 确定所述目标性能损失算法以及所述 目标冷页预测算法。 其中, 算法组合可以理解为有一个性能损失算法和 一个冷页预测算法组成 的算法 组合。 仿真虚拟机可以理解为 仿真的虚拟机, 仿真缺页状态数据可以理解为仿真 的虚拟 机的缺页状 态数据, 第二仿真历史时间段可以理解为仿真时设置 的第二历史时间段, 仿真历史冷 页数据可以理解为对仿真 的虚拟机进行历史冷页数据 仿真, 所得到的仿真 的历史冷页数 据。 具体的, 确定多个仿真虚拟机在仿真未来时间段 的初始内存超分指标的具体实 现 方式可参见 上述说明书实施例, 对此不再赘述。 进一步的, 在确定各个初始算法组合对应的初始 内存超分指标之后, 从初始内存 超分指标 中确定目标内存超分指标, 目标内存超分指标对应的综合受损量小于其他初 始内存超分 指标对应的综合受损量 , 综合受损量可以理解为多个仿真虚拟机的性能损 失结果 以及缺页状态数据的综合评分 ; 在确定目标内存超分指标之后, 根据目标内存 超分指标对 应的目标算法组合, 可以确定目标算法组合中包含的性 能损失算法以及冷 页预测算法 , 即目标性能损失算法以及目标冷页预测算法。 本说明书实施例提供 的内存超分处理方法, 通过对算法池中各个包含一个性 能损 失算法和一 个冷页预测算法的算法组合 进行仿真测试, 确定出目标算法组合, 以在每 个调度周期选 择较低综合受损量的算法组 合, 实现内存超分处理系统的快速迭代。 实际应用中, 目标性能损失算法以及所述 目标冷页预测算法的选择, 可以通过各 初始内存超 分指标对应的受损值作为参考 因素实现, 具体实现方式如下所述: 所述根据各初始内存超 分指标, 确定目标内存超分指标, 并根据所述目标内存超 分指标对应 的目标算法组合,确定所述目标性能损失算法 以及所述目标冷页预测算法, 包括: 根据所述各初始内存超分 指标, 确定所述各初始内存超分指标对应的受损值; 根据所述各初始内存超 分指标对应的受损值, 从所述各初始内存超分指标 中确定 目标内存超 分指标, 其中, 所述目标内存超分指标的受损值、 小于或等于所述各初始 内存超分指标 的受损值中的任意一个 ; 根据所述目标内存超分 指标, 将所述初始算法组合中、 与所述目标内存超分指标 对应的初始 算法组合, 确定为所述目标内存超分指标对应的 目标算法组合; 将所述目标算法组合 中包含的性能损失算法确定为所 述目标性能损失算法, 以及 将所述 目标算法组合中包含的冷页预测算 法, 确定为所述目标冷页预测算法。 其中, 受损值可以理解为仿真虚拟机的性能损失结 果, 在仿真虚拟机为多个的情 况下, 受损值可以理解为多个仿真虚拟 机的性能损失结果相加所得 到的性能损失结果 总和; 性能损失结果可以理解为上述性 能损失结果; 仿真虚拟机可以理解为用于进行 仿真测试 的模拟虚拟机。 实际应用中, 可以利用各初始内存指标进行仿真测 试, 以确定各初始内存指标对 应的受损值 , 具体实现方式如下所述: 所述根据所述各初始 内存超分指标,确定所述各初始内存超分指标对应 的受损值, 包括: 将所述各初始内存超分指 标确定为目标仿真内存超分指 标; 利用所述目标仿真 内存超分指标, 对多个仿真虚拟机进行内存超分仿真, 获得所 述多个仿真虚 拟机的初始受损值; 将各仿真虚拟机的初始 受损值之和, 确定为所述目标仿真内存超分指标对应 的受 损值; 根据所述目标仿真 内存超分指标对应的受损值, 确定所述各初始内存超分指标 对 应的受损值 。 其中, 多个仿真虚拟机的初始受损值可以理解为 多个仿真虚拟机中各虚拟机 的性 能损失结果 。 利用目标仿真内存超分指 标,对多个仿真虚拟机进行内存超分仿真,可以理解为, 利用 目标仿真内存超分指标, 通过上述说明书实施例提供的 内存超分方法, 确定各仿 真虚拟机 的内存超分量, 并根据各仿真虚拟机的内存超分量, 对各仿真虚拟机进行仿 真内存超分 。 之后,通过上述说明书实施例提供的对 目标虚拟机确定性能损失结果的具体 实现, 获得各仿真 虚拟机在完成仿真内存超分 的时刻所对应的性能损失 结果, 并将各仿真虚 拟机的性能损 失结果确定为各仿真虚拟机 的初始受损值。 进一步的,将各仿真虚拟机的初始受损值相加 ,各仿真虚拟机的初始受损值总和, 将初始受损 值总和确定为目标仿真 内存超分指标对应的受损值 , 从而可确定各初始内 存超分指标对 应的受损值。 本说明书实施例提供 的内存超分处理方法, 通过利用各初始内存超分指标 , 对多 个仿真虚拟 机进行内存超分仿真, 以确定仿真的内存超分结果, 即多个仿真虚拟机的 受损值, 从而可以分析出各初始内存超 分指标对应的内存超分 的效果, 减少了实际执 行内存超分测 试的资源消耗, 以及提高了内存超分处理系统的迭代更 新效率。 更进一步的, 在确定各初始仿真内存超分指标对应 的受损值之后, 可以根据各初 始仿真 内存超分指标对应的受损值 中的较小值, 确定目标内存超分指标, 即目标内存 超分指标 的受损值小于或等于各初始 内存超分指标的受损值的任意一 个。 基于此, 获得目标内存超分指标之后, 可以将目标内存超分指标对应的初始 算法 组合中包含 的性能损失算法, 确定为目标性能损失算法, 以及将目标内存超分指标对 应的初始算 法组合中包含的冷页预测算 法, 确定为目标冷页预测算法, 后续即可利用 目标性能损 失算法、 目标冷页预测算法, 实现对多个虚拟机的内存超分。 本说明书实施例提供 的一种内存超分处理方法, 本说明书实施例提供的 内存超分 处理方法 , 通过将受损值较小的初始内存超分指标对应的算法组 合确定为实际应用的 算法组合 , 实现在每个调度周期选择较低综合受损量的算法组合 , 优化了内存超分处 理系统的快速 迭代的迭代选择。 实际应用中, 根据确定的多个仿真虚拟机的仿真缺 页状态数据、 以及所述多个仿 真虚拟机在 第二仿真历史时间段的仿真 历史冷页数据, 确定初始内存超分指标的具体 实现方式如 下所述。 所述根据确定的多个仿真 虚拟机的仿真缺页状态数据 、 以及所述多个仿真虚拟机 在第二仿真 历史时间段的仿真历史冷页 数据, 利用所述初始算法组合进行数据处理, 获得所述初 始算法组合对应的、 所述多个仿真虚拟机在仿真未来 时间段的初始内存超 分指标, 包括: 根据确定的多个仿真虚拟 机的仿真缺页状态数据 , 利用所述初始算法组合中包含 的性能损失 算法, 确定所述多个仿真虚拟机的仿真初始性能损失结果 ; 根据所述多个仿真虚拟机 在第二仿真历史时间段 的仿真历史冷页数据, 利用所述 初始算法组 合中包含的仿真冷页预测算 法, 确定所述多个仿真虚拟机在所述仿真未来 时间段的仿 真初始预测冷页数据; 根据所述仿真初始性能损 失结果以及所述仿真初始 预测冷页数据, 确定所述初始 算法组合对应 的、 所述多个仿真虚拟机在所述仿真未来时间段的初始 内存超分指标。 具体的, 本说明书实施例的具体实现方式可参见上 述说明书实施例, 对此不在赘 述。 本说明书实施例提供 的内存超分处理方法, 通过对算法池中各个包含一个性 能损 失算法和一 个冷页预测算法的算法组合 进行仿真测试, 具体为利用性能损失算法以及 冷页预测算 法分别确定仿真初始性能损 失结果以及仿真初始预测冷 页数据, 提高了仿 真测试的准确 性, 使得后续确定的目标算法组合更准确。 本说明书一个实施例提供 的一种内存超分处理方法 , 通过确定多个虚拟机在第一 历史时间段 的缺页状态数据, 确定多个虚拟机的性能损失结果, 以确定多个虚拟机由 于缺页带来 的宿主机性能 (例如内存性能、 输入输出性能等) 损失, 进一步的, 可以 利用多个虚 拟机在第二历史时间段 的历史冷页数据, 确定多个虚拟机在未来时间段的 预测冷页数 据, 以得到多个虚拟机可承担的内存超分上限, 从而根据多个虚拟机的性 能损失结果 、 以及多个虚拟机在未来时间段的预测冷页数据, 确定出多个虚拟机在未 来时间段 的内存超分指标, 在考虑多个虚拟机的承担能力的情况 下, 增加可利用的虚 拟内存, 降低各个虚拟机运行过程中的页面置换压力、 地址转换压力, 从而达到减少 宿主机 内存性能、 输入输出性能的降低概率, 以及更进一步的, 提高宿主机的运行平 稳性的效果 。 上述为本实施例的一种 内存超分处理方法的示意性 方案。 需要说明的是, 该内存 超分处理方 法的技术方案与上述的 内存超分处理方法的技术方案属 于同一构思, 内存 超分处理方 法的技术方案未详细描述 的细节内容, 均可以参见上述内存超分处理方法 的技术方案 的描述。 下述结合附图 3, 对所述内存超分处理方法进行进一步说明。 其中, 图 3示出了 根据本说 明书一个实施例提供的一种 内存超分处理方法的处理过程 流程图, 应用于宿 主机, 该宿主机运行有多个虚拟机, 具体包括以下步骤。 步骤 302: 获取数据。 其中, 获取数据可以理解为获取各个虚拟机操作系统 ( guest ) 上的状态信息。 具体的,宿主机操作系统 ( host )中部署有宿主机内核组件 (例如内存控制组件、 i。控制组件等) , 宿主机内核组件通过与内存管理系统之间的交互接口, 实时提供虚 拟机状态信 息, 在每个调度周期, 内存管理系统 (即上述内存超分处理系统) 通过宿 主机内核组 件与内存管理系统之间 的交互接口, 从数据输入层中定时采集其中的虚拟 机的状态信 息。 步骤 304: 计算水位。 具体的, 内存管理系统通过水位控制参数, 确定宿主机需要达到的水位, 即需要 达到的总 的虚拟内存总量, 并根据宿主机当前使用虚拟内存的情况 , 预测得到当前调 度周 期内宿主 机需要增 加的内存 超分量, 例如, 宿主机需要增加内存超 分量为 lOOquotao 步骤 306: 受损感知。 其中, 在进行虚拟机受损感知之前, 可以从算法池中确定受损评估算法 (即上述 目标性能损 失算法) 以及负载预测算法 (即上述目标冷页预测算法) , 并利用该受损 评估算法进 行虚拟机受损感知, 以及利用负载预测算法进行负载 预测; 受损评估算法 和负载预测 算法可以通过配置参数确定 , 配置参数中包含有受损评估算法的选择参数 以及复杂预 测算法的选择参数; 配置参数可以由用户 (即宿主机的内存管理系统的开 发人员或者使 用人员) 输入确定, 也可以根据仿真测试系统的仿真结果确定。 进一步的, 可以通过仿真测试系统获得受损评估算 法的选择参数以及复杂预测 算 法的选择参 数, 具体为, 对受损评估算法以及负载预测算法进行随机组合, 得到多个 算法组合 , 并对多个算法组合进行仿真测试, 确定出综合受损量最低的算法组合确定 为目标算法 组合, 根据该目标算法组合中包含的受损评估算法 以及负载预测算法, 更 新获得上述配 置参数中的受损评估算法 的选择参数以及复杂预测算法 的选择参数。 一种受损评估算法的具体 实现为, 根据上述采集的虚拟机状态信息, 获取以当前 调度时间 (当前的调度周期的起始时间) 为时间终点, 采集突发时间段 (即突发缺页 对应的第一 历史时间段) /短期时间段 (即短期缺页对应的第一历史时间段) /长期时 间段 (即长期缺页对应的第一历史时间段) 三种时间维度 (即上述三个第一历史时间 段) 的缺页发生的次数 ( pf ) 以及缺页造成的 CPU时间开销 ( ps i ) , 以衡量虚拟机 的性能受损情 况 (包括但不限于内存性能、 I/O性能等) , 得到如下数据:
( 1 ) 突发缺页 ( burst pf 、 burst psi ) ;
( 2 ) 短期缺页 ( short term pf 、 short term psi ) ;
( 3 ) 长期缺页 ( long term pf 、 long term psi ) ; 其中, burst_pf 可以理解为突发缺页发生的缺页次数; burst_psi可以理解为突 发缺页造成 的 CPU时间开销; short_term_pf 可以理解为短期缺页发生的缺页次数; short term psi可以理解为短期缺页造成的 CPU时间开销; long term pf 可以理解为 长期缺页发 生的缺页次数;long_term_ps i可以理解为长期缺页造成的 CPU时间开销。 根据 burst pf > burst psi > short term pf > short_term_ps i、 long term pf > long term psi , 利用下述虚拟机受损状态评估公式, 计算受损评分。 其中, t可以理解为当前调度时刻, Impair ( t ) 可以理解为目标虚拟机针对当前 调度时刻确定 的受损评分: Pfbm-sdt')可以理解为目标虚拟机针对当前调度时刻, 突发 用 Holt-Winters 模型, 预测未来时间段内各个虚拟机的冷页量, 其中, 历史时间段 内的各个虚 拟机的冷页量, 可以通过确定历史时间段内存在的、 已超过预设冷页时间 未被访 问的内存页的数量确定, 未来时间段的时长可以与调度周期 的时长一致。 步骤 310: quota分配。 其中, quota分配可以理解为根据步骤 306获得的各个虚拟机的受损评分以及步 骤 308获得的各个虚拟机的预测冷页量, 计算获得各个虚拟机需要承担 的 quota, 具 体计算步骤 如下:
( 1 )根据各个虚拟机受损评分, 计算各个虚拟机需要承担的 quota比例, 并根据 quota比例以及上 述宿主机维持水位需要增加 的 quota量, 确定各个虚拟机需要承担 的 quota量;
( 2 )依次判断计算得到的各个虚拟机需要承担的 quota量是否超过其预测的冷页 量, 在虚拟机需要承担的 quota量未超过其预测的冷页量的情况下, 将根据虚拟机受 损评分确定 的虚拟机需要承担的 quota量, 确定为该虚拟机需要承担的 quota量, 在 虚拟机需要承 担的 quota量超过其预测的冷页量的情况下 , 将预测的冷页量的数量确 定为该虚拟机 需要承担的 quota量;
( 3 )根据上述多个虚拟机需要承担的 quota,确定剩余 quota量,即未分配的 quota 量, 并将剩余 quota量按照虚拟机受损评分, 再次计算补充分配比例, 并按照补充分 配比例, 将剩余 quota量分配给存在冷页富余量的虚拟机。 步骤 312: 组装指令。 其中, 组装指令可以理解为按照各个虚拟机需要承担 的 quota生成控制指令, 并 利用控制指令 实现内存超分控制。 具体的, 根据步骤 310计算获得的各个虚拟机需要承担的 quota, 生成 quota内 存超分控制 指令, 并将该 quota内存超分控制指令发送至指令输出层, 以用于内存管 理系统为每个 虚拟机设置换页目标, 具体为将 quota量对应的数量的冷页, 换页至磁 盘中。 本说明书实施例提供 的一种内存超分处理方法, 在每个调度周期内, 通过确定多 个虚拟机在 多个时间段 (突发、 短期、 长期等) 的缺页次数以及缺页造成的 CPU时间 开销, 以确定多个虚拟机由于缺页带来的宿主机性能损失, 进一步的, 可以通过对多 个虚拟机在 未来时间段的冷页量的预测 ,可以确定多个虚拟机可承担的内存超分上限, 从而根据多个 虚拟机的缺页次数以及缺页 造成的 CPU时间开销、 以及多个虚拟机在未 来时间段 的预测的冷页量, 确定出多个虚拟机在未来时间段的 quota, 在考虑多个虚 拟机的 内存超分量承担能力的情况下 , 增加可利用的虚拟内存, 动态的降低各个虚拟 机运行过程 中的页面置换、 地址转换等压力, 减少宿主机的性能降低概率, 从而提高 宿主机整个 内存的水位平稳, 并使得宿主机的运行更加平稳。 上述为本实施例的一种 内存超分处理方法的示意性 方案。 需要说明的是, 该内存 超分处理方 法的技术方案与上述的 内存超分处理方法的技术方案属 于同一构思, 内存 超分处理方 法的技术方案未详细描述 的细节内容, 均可以参见上述内存超分处理方法 的技术方案 的描述。 与上述方法实施例相对应 , 本说明书还提供了内存超分处理系统实施例, 图 4示 出了本说 明书一个实施例提供的一种 内存超分处理系统的结构示意 图。 如图 4所示, 该系统应用 于宿主机, 该宿主机运行有多个虚拟机, 该系统包括: 状态数据确定单元 402, 被配置为确定所述多个虚拟机在第一历史时间段 的缺页 状态数据 ; 性能损失结果确定单元 404, 被配置为根据所述缺页状态数据, 确定所述多个虚 拟机的性能损 失结果; 冷页数据确定单元 406, 被配置为根据所述多个虚拟机在第二历史时间段 的历史 冷页数据 , 确定所述多个虚拟机在未来时间段的预测冷页数据, 其中, 所述第二历史 时间段的时 长小于或等于所述第一历史 时间段的时长, 且所述第二历史时间段与所述 未来时间段 的时长相同; 内存超分指标确定单元 408, 被配置为根据所述性能损失结果以及所述预测 冷页 数据, 确定所述多个虚拟机在所述未来时 间段的内存超分指标。 可选的, 所述内存超分指标确定单元 408, 还被配置为: 根据所述性能损失结果 , 确定所述多个虚拟机的内存超分比例; 根据所述内存超分 比例以及所述宿主机的内存超分 量, 确定所述多个虚拟机的初 始内存超分 指标; 根据所述多个虚拟机 的初始内存超分指标以及预测 冷页数据, 确定所述多个虚拟 机在所述未 来时间段的内存超分指标 。 可选的, 所述内存超分指标确定单元 408, 还被配置为: 依次从所述多个虚拟机 中确定目标虚拟机; 在所述目标虚拟机的初 始内存超分指标, 大于等于所述目标虚拟机的预测冷 页数 据的情况下 , 将所述预测冷页数据中包含的内存指标, 确定为所述目标虚拟机在所述 未来时间段 的内存超分指标; 或者 在所述目标虚拟机的初 始内存超分指标, 小于所述目标虚拟机的预测冷页数据 的 情况下, 将所述初始内存超分指标 , 确定为所述目标虚拟机在所述未来时间段的内存 超分指标 ; 根据所述目标虚拟机在所 述未来时间段的内存超分 指标, 确定所述多个虚拟机在 所述未来时 间段的内存超分指标。 可选地, 所述装置, 还包括补充超分单元, 被配置为: 根据所述多个虚拟机在所 述未来时间段的内存超分指标 , 确定总内存超分指标; 在确定所述总内存超分指 标小于所述宿主机的 内存超分量的情况下, 根据所述多 个虚拟机在 所述未来时间段的内存超分 指标与预测冷页数据, 从所述多个虚拟机中确 定待补充虚拟 机; 确定所述总内存超分指标与 所述宿主机的内存超分量 的超分差值; 根据所述待补充虚拟机 的性能损失结果, 确定所述待补充虚拟机的补充内存超 分 比例; 根据所述超分差值 以及所述补充内存超分比例, 确定所述待补充虚拟机的补充 内 存超分指标 。 可选的, 所述装置, 还包括宿主机内存超分量确定单元, 被配置为: 确定内存量控制参数, 根据所述内存量控制参数 , 确定所述宿主机在所述未来时 间段的预测 内存量; 确定所述多个虚拟机当前 已使用内存量以及当前空 闲内存量, 并根据所述预测内 存量、 所述当前已使用内存量、 以及所述当前空闲内存量, 确定所述宿主机的内存超 分量。 可选的, 所述装置, 还包括时间段确定单元, 被配置为: 确定当前调度时刻以及预 设时长, 并根据所述当前调度时刻以及所述预设时长 , 确定第一历史 时间段, 其中, 所述当前调度时刻为所述未来时间段的时间起点。 可选的, 所述预设时长包括第一预设时长、 第二预设时长、 第三预设时长; 所述时间段确定单元, 还被配置为: 根据所述当前调度时刻 、 所述第一预设时长、 所述第二预设时长、 所述第三预设 时长, 确定三个第一历史时间段。 可选的, 所述状态数据确定单元 402, 还被配置为: 确定所述多个虚拟机在所 述三个第一历史时间段 中各第一历史时间段的缺页状 态 数据。 可选的, 所述性能损失结果确定单元 404, 还被配置为: 根据所述多个虚拟机在所 述各第一历史时间段的缺 页状态数据, 确定所述多个虚 拟机在所述 各第一历史时间段的性能损失 结果; 利用所述多个虚拟机在所 述各第一历史时间段对应 的权重, 对所述多个虚拟机在 所述各第一 历史时间段的性能损失结果 进行加权求和处理以及归 一化处理, 确定所述 多个虚拟机 的性能损失结果。 可选的, 所述缺页状态数据包括缺页次数以及缺页代价 ; 所述性能损失结果确定单元 404, 还被配置为: 根据所述缺页状态数据 , 确定所述多个虚拟机在所述第一历史时间段的缺页次 数 以及缺页代价; 确定所述多个虚拟机针对 所述第一历史时间段的缺 页次数的第一性能损失结果 、 以及所述多个 虚拟机针对所述第一历史 时间段的缺页代价的第二性 能损失结果; 利用所述第一性能损失 结果的权重、 以及所述第二性能损失结果的权重, 对所述 多个虚拟机 针对所述第一历史时间段 的缺页次数的第一性能损失 结果、 以及所述多个 虚拟机针对 所述第一历史时间段的缺页 代价的第二性能损失结果 , 进行加权求和处理 以及归一化 处理, 确定所述多个虚拟机的性能损失结果。 可选的, 所述冷页数据确定单元 406, 还被配置为: 根据所述多个虚拟机在第 二历史时间段的历史冷 页数据, 利用时序预测模型, 确 定所述多个 虚拟机在未来时间段的预测 冷页数据, 其中, 所述时序预测模型为机器学 习模型。 可选的, 所述装置, 还包括算法选择单元, 被配置为: 从算法池中确定目标性能 损失算法以及目标冷页预测 算法, 其中, 所述算法池中 包括至少两个 性能损失算法以及至少两个冷 页预测算法; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 利用所述目标性能损失算法, 确定所述多个虚拟机的性 能损失结果 ; 所述根据所述多个虚拟机 在第二历史时间段的历史 冷页数据, 确定所述多个虚拟 机在未来时 间段的预测冷页数据, 包括: 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 利用所述目标冷页预测 算法, 确定所述多个虚拟机在未来时间段 的预测冷页数据。 可选的, 所述算法选择单元, 还被配置为: 从所述算法池中确定多个 算法组合, 其中, 所述多个算法组合中的任意一个算法 组合包括一个 性能损失算法以及一个冷页 预测算法; 将多个算法组合确定为初始 算法组合; 根据确定的多个仿真虚拟 机的仿真缺页状态数据 、 以及所述多个仿真虚拟机在第 二仿真历史 时间段的仿真历史冷页数据 , 利用所述初始算法组合进行数据处理, 获得 所述初始算 法组合对应的、 所述多个仿真虚拟机在仿真未来时 间段的初始内存超分指 标; 根据各初始内存超分指标 , 确定目标内存超分指标, 并根据所述目标内存超分指 标对应的 目标算法组合, 确定所述目标性能损失算法以及所述 目标冷页预测算法。 可选的, 所述算法选择单元, 还被配置为: 根据确定的多个仿真虚拟 机的仿真缺页状态数据 , 利用所述初始算法组合中包含 的性能损失 算法, 确定所述多个仿真虚拟机的仿真初始性能损失结果 ; 根据所述多个仿真虚拟机 在第二仿真历史时间段 的仿真历史冷页数据, 利用所述 初始算法组 合中包含的仿真冷页预测算 法, 确定所述多个仿真虚拟机在所述仿真未来 时间段的仿 真初始预测冷页数据; 根据所述仿真初始性能损 失结果以及所述仿真初始 预测冷页数据, 确定所述初始 算法组合对应 的、 所述多个仿真虚拟机在所述仿真未来时间段的初始 内存超分指标。 可选的, 所述装置, 还包括换页单元, 被配置为: 根据所述内存超分指标 , 确定所述多个虚拟机的目标内存页; 将所述目标内存页置换 至页面交换空间, 其中, 所述页面交换空间为不同于内存 的存储空 间。 可选的, 所述内存超分指标确定单元 408, 还被配置为: 将所述多个虚拟机的性能 损失结果相加, 获得性能损失结果总和; 根据各虚拟机的性能损 失结果相对于所述性能损失 结果总和的占比, 确定所述多 个虚拟机 中各虚拟机的内存超分比例 。 可选的, 所述算法选择单元, 还被配置为: 根据所述各初始内存超分 指标, 确定所述各初始内存超分指标对应的受损值; 根据所述各初始内存超 分指标对应的受损值, 从所述各初始内存超分指标 中确定 目标内存超 分指标, 其中, 所述目标内存超分指标的受损值、 小于或等于所述各初始 内存超分指标 的受损值中的任意一个 ; 根据所述目标内存超分 指标, 将所述初始算法组合中、 与所述目标内存超分指标 对应的初始 算法组合, 确定为所述目标内存超分指标对应的 目标算法组合; 将所述目标算法组合 中包含的性能损失算法确定为所 述目标性能损失算法, 以及 将所述 目标算法组合中包含的冷页预测算 法, 确定为所述目标冷页预测算法。 可选的, 所述算法选择单元, 还被配置为: 将所述各初始内存超分指 标确定为目标仿真内存超分指 标; 利用所述目标仿真 内存超分指标, 对多个仿真虚拟机进行内存超分仿真, 获得所 述多个仿真虚 拟机的初始受损值; 将各仿真虚拟机的初始 受损值之和, 确定为所述目标仿真内存超分指标对应 的受 损值; 根据所述目标仿真 内存超分指标对应的受损值, 确定所述各初始内存超分指标 对 应的受损值 。 本说明书一个实施例提供 的一种内存超分处理系统 ,通过利用状态数据确定单元, 确定多个虚拟机 在第一历史时间段的缺页状 态数据,确定多个虚拟机的性能损失结果, 以利用性能 损失结果确定单元, 确定多个虚拟机由于缺页带来的宿 主机性能 (例如内 存性能、 输入输出性能等) 损失, 进一步的, 利用冷页数据确定单元, 实现利用多个 虚拟机在第 二历史时间段的历史冷页数 据, 确定多个虚拟机在未来时间段的预测冷页 数据, 以得到多个虚拟机可承担的内存超分上限, 从而利用内存超分指标确定单元, 根据多个虚 拟机的性能损失结果、 以及多个虚拟机在未来时间段的预测冷页数据, 确 定出多个虚 拟机在未来时间段的内存超 分指标, 在考虑多个虚拟机的承担能力的情况 下, 对虚拟内存进行增加, 使得各个虚拟机运行过程中的页面置换压 力、 地址转换压 力降低, 从而达到应用了该内存超分系 统的宿主机内存性能、 输入输出性能的降低概 率的减少 的效果, 使得宿主机的运行平稳性的效果得到提高。 上述为本实施例的一种 内存超分处理系统的示意性 方案。 需要说明的是, 该内存 超分处理系 统的技术方案与上述的 内存超分处理方法的技术方案 属于同一构思, 内存 超分处理系 统的技术方案未详细描述 的细节内容, 均可以参见上述内存超分处理方法 的技术方案 的描述。 图 5示出了根据本说明书一个 实施例提供的一种计算设备 500的结构框图。 该计 算设备 500的部件包括但不限于存储器 510和处理器 520o 处理器 520与存储器 510 通过总线 530相连接, 数据库 550用于保存数据。 计算设备 500还包括接入设备 540, 接入设备 540使得计算设备 500能够经由一 个或多个 网络 560通信。这些网络的示例包括公用交换电话网 ( PSTN, Public Switched Telephone Network )、 局域网 ( LAN, Local Area Network) 、 广域网 (WAN, Wide Area Network)、个域网 ( PAN, Personal Area Network)或诸如因特网的通信网络的组合。 接入设备 540可以包括有线或无线的任何类型的 网络接口 (例如, 网络接口卡 ( NIC, network interface controller) )中的一个或多个,诸如 IEEE802. 11无线局域网 (WLAN, Wireless Local Area Network ) 无线接口、 全球微波互联接入 ( Wi-MAX, Worldwide Interoperability for Microwave Access ) 接口、 以太网接口、 通用串行总线 ( USB, Universal Serial Bus )接口、 蜂窝网络接口、 蓝牙接口、 近场通信 ( NFC, Near Field Communication) 。 在本说明书的一个实施例 中, 计算设备 500的上述部件以及图 5中未示出的其他 部件也可 以彼此相连接, 例如通过总线。 应当理解, 图 5所示的计算设备结构框图仅 仅是出于示 例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据 需要, 增添或替换 其他部件。 计算设备 500可以是任何类型的静止或移动计算设备, 包括移动计算机或移动计 算设备 (例如, 平板计算机、 个人数字助理、 膝上型计算机、 笔记本计算机、 上网本 等) 、 移动电话 (例如, 智能手机) 、 可佩戴的计算设备 (例如, 智能手表、 智能眼 镜等) 或其他类型的移动设 备, 或者诸如台式计算机或个人 计算机 ( PC, Personal Computer) 的静止计算设备。 计算设备 500还可以是移动式或静止式的服务器。 其中, 处理器 520用于执行如下计算机程序/指令, 该计算机程序/指令被处理器 执行时实现 上述内存超分处理方法的步 骤。 本说明书中的各个实施 例均采用递进的方式描述 , 各个实施例之间相同相似的部 分互相参 见即可, 每个实施例重点说明的都是与其他实施例 的不同之处。 尤其, 对于 计算设备 实施例而言, 由于其基本相似于内存超分处理方法实施 例, 所以描述的比较 简单, 相关之处参见内存超分处理方法 实施例的部分说明即可 。 本说明书一实施例还提 供一种计算机可读存储介质 , 其存储有计算机程序/指令, 该计算机程 序/指令被处理器执行时实现上述 内存超分处理方法的步骤 。 本说明书中的各个实施 例均采用递进的方式描述 , 各个实施例之间相同相似的部 分互相参 见即可, 每个实施例重点说明的都是与其他实施例 的不同之处。 尤其, 对于 计算机可读 存储介质实施例而言, 由于其基本相似于内存超分处理方法实施例, 所以 描述的 比较简单, 相关之处参见内存超分处理方法实施例的部分说 明即可。 本说明书一实施例还提供 一种计算机程序产品,包括计算机程 序 /指令, 该计算机 程序/指令被处 理器执行时实现上述内存超 分处理方法的步骤。 上述为本实施例的一种 计算机程序产品的示意性 方案。 需要说明的是, 该计算机 程序产 品的技术方案与上述的内存超 分处理方法的技术方案属于 同一构思, 计算机程 序产品 的技术方案未详细描述的细节 内容, 均可以参见上述内存超分处理方法的技术 方案的描述 。 上述对本说明书特定实施 例进行了描述。其它实施例在所附权利要求书 的范围内。 在一些情况 下, 在权利要求书中记载的动作或步骤可以按照不 同于实施例中的顺序来 执行并且仍 然可以实现期望的结果 。 另外, 在附图中描绘的过程不一定要求示出的特 定顺序或者 连续顺序才能实现期望 的结果。 在某些实施方式中, 多任务处理和并行处 理也是可 以的或者可能是有利的。 所述计算机指令包括计 算机程序代码, 所述计算机程序代码可以为源代码形 式、 对象代码形 式、 可执行文件或某些中间形式等。 所述计算机可读介质可以包括: 能够 携带所述计 算机程序代码的任何实体或 装置、 记录介质、 U盘、 移动硬盘、 磁碟、 光 盘、 计算机存储器、 只读存储器 ( ROM, Read-Only Memory ) 、 随机存取存储器 ( RAM, Random Access Memory ) 、 电载波信号、 电信信号以及软件分发介质等。 需要说明的 是, 所述计算机可读介质包含的内容可 以根据专利实践的要求进 行适当的增减, 例如 在某些地 区, 根据专利实践, 计算机可读介质不包括电载波信号和电信信号。 需要说明的是, 对于前述的各方法实施例, 为了简便描述, 故将其都表述为一系 列的动作组 合, 但是本领域技术人员应该知悉, 本说明书实施例并不受所描述的动作 顺序的限制 , 因为依据本说明书实施例, 某些步骤可以采用其它顺序或者同时进行。 其次, 本领域技术人员也应该知悉 , 说明书中所描述的实施例均属于优选实施例, 所 涉及的动作和 模块并不一定都是本说 明书实施例所必须的。 在上述实施例中, 对各个实施例的描述都各有侧重 , 某个实施例中没有详述的部 分, 可以参见其它实施例的相关描述 。 以上公开的本说明书优选 实施例只是用于帮助阐述本 说明书。 可选实施例并没有 详尽叙述所 有的细节, 也不限制该发明仅为所述的具体实施方式 。 显然, 根据本说明 书实施例 的内容, 可作很多的修改和变化。 本说明书选取并具体描述这些实施例, 是 为了更好地 解释本说明书实施例的原理 和实际应用, 从而使所属技术领域技术人员能 很好地理解和 利用本说明书。本说明书仅受权利要求书及其 全部范围和等效物的限制 。

Claims

权 利 要 求 书
1.一种内存超分处理方法, 应用于宿主机, 所述宿主机运行有多个虚拟机, 所述 方法包括 : 确定所述多个虚拟机在第一 历史时间段的缺页状态数据 ; 根据所述缺页状态数据 , 确定所述多个虚拟机的性能损失结果; 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 确定所述多个虚拟机在 未来时间段 的预测冷页数据, 其中, 所述第二历史时间段的时长小于或等于所述第一 历史时间段 的时长, 且所述第二历史时间段与所述未来时间段的时长 相同; 根据所述性能损失结果 以及所述预测冷页数据, 确定所述多个虚拟机在所述未 来 时间段的 内存超分指标。
2.根据权利要求 1所述的内存超分处理方法, 所述根据所述性能损失结果以及所 述预测冷页数 据, 确定所述多个虚拟机在所述未来时间段的内存超分 指标, 包括: 根据所述性能损失结果 , 确定所述多个虚拟机的内存超分比例; 根据所述内存超分 比例以及所述宿主机的内存超分 量, 确定所述多个虚拟机的初 始内存超分 指标; 根据所述多个虚拟机 的初始内存超分指标以及预测 冷页数据, 确定所述多个虚拟 机在所述未 来时间段的内存超分指标 。
3.根据权利要求 2所述的内存超分处 理方法, 所述根据所述多个虚拟机的初始内 存超分指标 以及预测冷页数据, 确定所述多个虚拟机在所述未来 时间段的内存超分指 标, 包括: 依次从所述多个虚拟机 中确定目标虚拟机; 在所述目标虚拟机的初 始内存超分指标, 大于或等于所述目标虚拟机的预测冷 页 数据的情况 下, 将所述预测冷页数据中包含的内存指标, 确定为所述目标虚拟机在所 述未来时 间段的内存超分指标; 或者 在所述目标虚拟机的初 始内存超分指标, 小于所述目标虚拟机的预测冷页数据 的 情况下, 将所述初始内存超分指标 , 确定为所述目标虚拟机在所述未来时间段的内存 超分指标 ; 根据所述目标虚拟机在所 述未来时间段的内存超分 指标, 确定所述多个虚拟机在 所述未来时 间段的内存超分指标。
4.根据权利要求 1-3中任一项所述的内存超分处理方法, 所述确定所述多个虚拟 机在所述未 来时间段的内存超分指标之后 , 包括: 根据所述多个虚拟机在所 述未来时间段的内存超分指标 , 确定总内存超分指标; 在确定所述总内存超分指 标小于所述宿主机的 内存超分量的情况下, 根据所述多 个虚拟机在 所述未来时间段的内存超分 指标与预测冷页数据, 从所述多个虚拟机中确 定待补充虚拟 机; 确定所述总内存超分指标与 所述宿主机的内存超分量 的超分差值; 根据所述待补充虚拟机 的性能损失结果, 确定所述待补充虚拟机的补充内存超 分 比例;
28 根据所述超分差值 以及所述补充内存超分比例, 确定所述待补充虚拟机的补充 内 存超分指标 。
5.根据权利要求 2或 3所述的内存超分处理方 法, 所述根据所述内存超分比例以 及所述宿主机 的内存超分量,确定所述多个虚拟机的初始内存超 分指标之前,还包括: 确定内存量控制参数, 根据所述内存量控制参数 , 确定所述宿主机在所述未来时 间段的预测 内存量; 确定所述多个虚拟机当前 已使用内存量以及当前空 闲内存量, 并根据所述预测内 存量、 所述当前已使用内存量、 以及所述当前空闲内存量, 确定所述宿主机的内存超 分量。
6.根据权利要求 1-5中任一项所述的内存超分处理方法, 所述确定所述多个虚拟 机在第一历 史时间段的缺页状态数据之前 , 还包括: 确定当前调度时刻以及预 设时长, 并根据所述当前调度时刻以及所述预设时长 , 确定第一历史 时间段, 其中, 所述当前调度时刻为所述未来时间段的时间起点。
7.根据权利要求 6所述的内存超分处 理方法, 所述预设时长包括第一预设时长、 第二预设时 长、 第三预设时长; 所述根据所述当前调度时 刻以及所述预设时长, 确定第一历史时间段, 包括: 根据所述当前调度时刻 、 所述第一预设时长、 所述第二预设时长、 所述第三预设 时长, 确定三个第一历史时间段。
8.根据权利要求 7所述的内存超分处 理方法, 所述确定所述多个虚拟机在第一历 史时间段 的缺页状态数据, 包括: 确定所述多个虚拟机在所 述三个第一历史时间段 中各第一历史时间段的缺页状 态 数据。
9.根据权利要求 8所述的内存超分处 理方法, 所述根据所述缺页状态数据, 确定 所述多个虚拟 机的性能损失结果, 包括: 根据所述多个虚拟机在所 述各第一历史时间段的缺 页状态数据, 确定所述多个虚 拟机在所述 各第一历史时间段的性能损失 结果; 利用所述多个虚拟机在所 述各第一历史时间段对应 的权重, 对所述多个虚拟机在 所述各第一 历史时间段的性能损失结果 进行加权求和处理以及归 一化处理, 确定所述 多个虚拟机 的性能损失结果。
10.根据权利要求 1-9中任一项所述的内存超分处理方法 ,所述缺页状态数据包括 缺页次数 以及缺页代价; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 确定所述多个虚拟机在所述第一历史时间段的缺页次 数 以及缺页代价 ; 确定所述多个虚拟机针对 所述第一历史时间段的缺 页次数的第一性能损失结果 、 以及所述多个 虚拟机针对所述第一历史 时间段的缺页代价的第二性 能损失结果; 利用所述第一性能损失 结果的权重、 以及所述第二性能损失结果的权重, 对所述 多个虚拟机 针对所述第一历史时间段 的缺页次数的第一性能损失 结果、 以及所述多个 虚拟机针对 所述第一历史时间段的缺页 代价的第二性能损失结果 , 进行加权求和处理 以及归一化 处理, 确定所述多个虚拟机的性能损失结果。
11.根据权利要求 1-10中任一项所述的内存超分处理方 法, 所述根据所述多个虚 拟机在第二 历史时间段的历史冷页数据 , 确定所述多个虚拟机在未来时间段的预测冷 页数据, 包括: 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 利用时序预测模型, 确 定所述多个 虚拟机在未来时间段的预测 冷页数据, 其中, 所述时序预测模型为机器学 习模型。
12.根据权利要求 1-11中任一项所述的内存超分处理方 法, 所述确定所述多个虚 拟机在第一 历史时间段的缺页状态数据之 后, 还包括: 从算法池中确定目标性能 损失算法以及目标冷页预测 算法, 其中, 所述算法池中 包括至少两个 性能损失算法以及至少两个冷 页预测算法; 所述根据所述缺页状态数 据, 确定所述多个虚拟机的性能损失结果, 包括: 根据所述缺页状态数据 , 利用所述目标性能损失算法, 确定所述多个虚拟机的性 能损失结果 ; 所述根据所述多个虚拟机 在第二历史时间段的历史 冷页数据, 确定所述多个虚拟 机在未来时 间段的预测冷页数据, 包括: 根据所述多个虚拟机在第 二历史时间段的历史冷页 数据, 利用所述目标冷页预测 算法, 确定所述多个虚拟机在未来时间段 的预测冷页数据。
13.根据权利要求 12所述的内存超分处理方法 , 所述从算法池中确定目标性能损 失算法 以及目标冷页预测算法, 包括: 从所述算法池中确定多个 算法组合, 其中, 所述多个算法组合中的任意一个算法 组合包括一个 性能损失算法以及一个冷页 预测算法; 将多个算法组合确定为初始 算法组合; 根据确定的多个仿真虚拟 机的仿真缺页状态数据 、 以及所述多个仿真虚拟机在第 二仿真历史 时间段的仿真历史冷页数据 , 利用所述初始算法组合进行数据处理, 获得 所述初始算 法组合对应的、 所述多个仿真虚拟机在仿真未来时 间段的初始内存超分指 标; 根据各初始内存超分指标 , 确定目标内存超分指标, 并根据所述目标内存超分指 标对应的 目标算法组合, 确定所述目标性能损失算法以及所述 目标冷页预测算法。
14.根据权利要求 13所述的内存超分处理方法 , 所述根据确定的多个仿真虚拟机 的仿真缺页 状态数据、 以及所述多个仿真虚拟机在第二仿真历史 时间段的仿真历史冷 页数据, 利用所述初始算法组合进行数 据处理, 获得所述初始算法组合对应的、 所述 多个仿真虚拟 机在仿真未来时间段的初始 内存超分指标, 包括: 根据确定的多个仿真虚拟 机的仿真缺页状态数据 , 利用所述初始算法组合中包含 的性能损失 算法, 确定所述多个仿真虚拟机的仿真初始性能损失结果 ; 根据所述多个仿真虚拟机 在第二仿真历史时间段 的仿真历史冷页数据, 利用所述 初始算法组 合中包含的仿真冷页预测算 法, 确定所述多个仿真虚拟机在所述仿真未来 时间段的仿 真初始预测冷页数据; 根据所述仿真初始性能损 失结果以及所述仿真初始 预测冷页数据, 确定所述初始 算法组合对应 的、 所述多个仿真虚拟机在所述仿真未来时间段的初始 内存超分指标。
15.根据权利要求 1-14中任一项所述的内存超分处理方 法, 所述根据所述性能损 失结果 以及所述预测冷页数据, 确定所述多个虚拟机在所述未来 时间段的内存超分指 标之后, 还包括: 根据所述内存超分指标 , 确定所述多个虚拟机的目标内存页; 将所述目标内存页置换 至页面交换空间, 其中, 所述页面交换空间为不同于内存 的存储空 间。
16.根据权利要求 2-3、 5中任一项所述的内存超分处理方法, 所述根据所述性能 损失结果 , 确定所述多个虚拟机的内存超分比例, 包括: 将所述多个虚拟机的性能 损失结果相加, 获得性能损失结果总和; 根据各虚拟机的性能损 失结果相对于所述性能损失 结果总和的占比, 确定所述多 个虚拟机 中各虚拟机的内存超分比例 。
17.根据权利要求 13或 14所述的内存超分处理方法,所述根据各初始内存超分指 标, 确定目标内存超分指标, 并根据所述目标内存超分指标对应 的目标算法组合, 确 定所述 目标性能损失算法以及所述 目标冷页预测算法, 包括: 根据所述各初始内存超分 指标, 确定所述各初始内存超分指标对应的受损值; 根据所述各初始内存超 分指标对应的受损值, 从所述各初始内存超分指标 中确定 目标内存超 分指标, 其中, 所述目标内存超分指标的受损值、 小于或等于所述各初始 内存超分指标 的受损值中的任意一个 ; 根据所述目标内存超分 指标, 将所述初始算法组合中、 与所述目标内存超分指标 对应的初始 算法组合, 确定为所述目标内存超分指标对应的 目标算法组合; 将所述目标算法组合 中包含的性能损失算法确定为所 述目标性能损失算法, 以及 将所述 目标算法组合中包含的冷页预测算 法, 确定为所述目标冷页预测算法。
18.根据权利要求 17所述的内存超分处理方法 , 所述根据所述各初始内存超分指 标, 确定所述各初始内存超分指标对应 的受损值, 包括: 将所述各初始内存超分指 标确定为目标仿真内存超分指 标; 利用所述目标仿真 内存超分指标, 对多个仿真虚拟机进行内存超分仿真, 获得所 述多个仿真虚 拟机的初始受损值; 将各仿真虚拟机的初始 受损值之和, 确定为所述目标仿真内存超分指标对应 的受 损值; 根据所述目标仿真 内存超分指标对应的受损值, 确定所述各初始内存超分指标 对 应的受损值 。
19.一种内存超分处理系统, 应用于宿主机, 所述宿主机运行有多个虚拟机, 所述 系统包括 : 状态数据确定单元, 被配置为确定所述多个虚拟机在 第一历史时间段的缺页状态 数据; 性能损失结果确定单元 , 被配置为根据所述缺页状态数据, 确定所述多个虚拟机 的性能损失 结果; 冷页数据确定单元, 被配置为根据所述多个虚拟机在 第二历史时间段的历史冷 页 数据, 确定所述多个虚拟机在未来时 间段的预测冷页数据, 其中, 所述第二历史时间 段的时长小 于或等于所述第一历史时 间段的时长, 且所述第二历史时间段与所述未来 时间段的时 长相同; 内存超分指标确定单元,被配置为根据所述性 能损失结果以及所述预测冷 页数据, 确定所述多个虚 拟机在所述未来时间段 的内存超分指标。
20.一种计算设备, 包括: 存储器和处理器; 所述存储器用于存储计 算机程序/指令, 所述处理器用于执行所述计算机程序/指 令, 该计算机程序/指令被处理器执行时实现 权利要求 1至 18任意一项所述内存超分 处理方法 的步骤。
21.一种计算机可读存储介质, 其存储有计算机程序/指令, 该计算机程序/指令被 处理器执行 时实现权利要求 1至 18任意一项所述内存超分处理方法的步骤。
22.一种计算机程序产品,包括计算机程序/指令 , 该计算机程序/指令被处理器执 行时实现权利 要求 1至 18任意一项所述内存超分处理方法 的步骤。
32
PCT/IB2025/053505 2024-05-20 2025-04-03 内存超分处理方法以及系统 Pending WO2025243103A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410627061.4A CN120994352A (zh) 2024-05-20 2024-05-20 内存超分处理方法以及系统
CN202410627061.4 2024-05-20

Publications (1)

Publication Number Publication Date
WO2025243103A1 true WO2025243103A1 (zh) 2025-11-27

Family

ID=97690176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2025/053505 Pending WO2025243103A1 (zh) 2024-05-20 2025-04-03 内存超分处理方法以及系统

Country Status (2)

Country Link
CN (1) CN120994352A (zh)
WO (1) WO2025243103A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729305A (zh) * 2012-10-11 2014-04-16 财团法人工业技术研究院 虚拟机的存储器管理的方法和计算机系统
CN113722100A (zh) * 2021-09-02 2021-11-30 上海仪电(集团)有限公司中央研究院 基于趋势预测的云平台内存资源动态超分配方法及设备
US20220083398A1 (en) * 2021-11-22 2022-03-17 Intel Corporation Application configurable selective memory compression (acsmc)
CN114253458A (zh) * 2020-09-21 2022-03-29 华为技术有限公司 内存缺页异常的处理方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729305A (zh) * 2012-10-11 2014-04-16 财团法人工业技术研究院 虚拟机的存储器管理的方法和计算机系统
CN114253458A (zh) * 2020-09-21 2022-03-29 华为技术有限公司 内存缺页异常的处理方法、装置、设备及存储介质
CN113722100A (zh) * 2021-09-02 2021-11-30 上海仪电(集团)有限公司中央研究院 基于趋势预测的云平台内存资源动态超分配方法及设备
US20220083398A1 (en) * 2021-11-22 2022-03-17 Intel Corporation Application configurable selective memory compression (acsmc)

Also Published As

Publication number Publication date
CN120994352A (zh) 2025-11-21

Similar Documents

Publication Publication Date Title
JP5756478B2 (ja) データ・センタにおける電力消費の最適化
US10789102B2 (en) Resource provisioning in computing systems
US10353745B1 (en) Assessing performance of disparate computing environments
Zhu et al. A performance interference model for managing consolidated workloads in QoS-aware clouds
CN112162891B (zh) 服务器集群中的性能测试方法及相关设备
WO2021159638A1 (zh) 集群队列资源的调度方法、装置、设备及存储介质
US10601690B2 (en) Assessing performance of networked computing environments
CN115079958B (zh) 多节点负载均衡冷热数据迁移装置、方法、终端及介质
US10419305B2 (en) Visualization of workload distribution on server resources
EP2288983A1 (en) Load balanced storage provisioning
US8024542B1 (en) Allocating background workflows in a data storage system using historical data
CN107911399B (zh) 一种基于负载预测的弹性伸缩方法及系统
US20230418688A1 (en) Energy efficient computing workload placement
WO2012105969A1 (en) Estimating a performance characteristic of a job using a performance model
CN118302748A (zh) 云计算环境内的滞留资源的自动恢复
EP2245539A1 (en) System and method for estimating combined workloads of systems with uncorrelated and non-deterministic workload patterns
Liu et al. On a dynamic data placement strategy for heterogeneous hadoop clusters
CN102929693B (zh) 整机柜服务器的性能评测方法及装置
CN118394534A (zh) 集群应用服务的扩缩容方法、系统、产品、装置及介质
EP4258096A1 (en) Predictive block storage size provisioning for cloud storage volumes
Iglesias et al. A methodology for online consolidation of tasks through more accurate resource estimations
CN112000460A (zh) 一种基于改进贝叶斯算法的服务扩缩容的方法及相关设备
CN114625620B (zh) Cpu使用率的计算方法、装置、电子设备及存储介质
CN114466014A (zh) 一种服务调度方法、装置、电子设备及存储介质
CN119668853A (zh) 一种算力资源池资源管理方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25807277

Country of ref document: EP

Kind code of ref document: A1