An Energy-Aware Virtual Machine Deployment and Scheduling Optimization Method

By constructing energy consumption curves and optimizing virtual machine deployment based on energy efficiency ratios, and combining electricity consumption periods and carbon emission data for dynamic scheduling, the energy consumption and carbon emission issues in data center virtual machine deployment and scheduling have been resolved, thereby improving energy efficiency and environmental benefits.

CN123114629APending Publication Date: 2026-11-17JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611432260.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing data centers neglect the differences in physical machine energy consumption and carbon emissions when deploying and scheduling virtual machines, resulting in excessive energy consumption and failing to meet the concept of green and low-carbon development.

Method used

By collecting real-time data on physical machine operating status, virtual machine performance requirements, electricity consumption periods, and regional power grid carbon emissions, energy consumption curves are constructed, energy efficiency ratios are calculated, virtual machines are optimized for deployment on physical machines with lower energy consumption, and dynamic scheduling is performed based on electricity consumption periods and carbon emission data.

Benefits of technology

It reduces the overall energy consumption and carbon emissions of data centers, improves energy utilization efficiency, conforms to the trend of green and low-carbon development, and realizes intelligent and refined management of virtual machine deployment and scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114629A_ABST
    Figure CN123114629A_ABST
Patent Text Reader

Abstract

This invention discloses an energy-aware virtual machine deployment and scheduling optimization method. The method includes: real-time collection of physical machine operating status data, virtual machine performance requirement data, electricity consumption time information, and regional power grid carbon emission data; constructing an energy consumption curve reflecting the relationship between load and power consumption based on the physical machine operating status data, and calculating the energy consumption performance ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data; determining the target physical machine from the candidate physical machines based on the energy consumption performance ratio, and deploying the virtual machine to be deployed to the target physical machine; during virtual machine operation, performing centralized migration of low-load virtual machines or time period adjustment of high-load non-real-time virtual machines based on the electricity consumption time information, the regional power grid carbon emission data, and the real-time load of the virtual machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing and data center energy management technology, and in particular to a method for optimizing virtual machine deployment and scheduling based on energy consumption awareness. Background Technology

[0002] With the rapid development of cloud computing technology and the continuous expansion of data center scale, virtual machines, as the core carrier of cloud computing, have their deployment and scheduling strategies directly affecting the operational efficiency and energy consumption of data centers. Currently, most data centers prioritize ensuring business performance when deploying and scheduling virtual machines, neglecting the energy consumption differences between different physical machines.

[0003] For example, some older servers consume significantly more energy than newer energy-efficient servers under the same load. However, when deploying virtual machines, older servers may temporarily have idle resources, leading to excessive overall energy consumption in the data center. Furthermore, traditional scheduling strategies lack consideration for electricity usage periods and regional power grid carbon emissions, further exacerbating energy waste and carbon emissions. This keeps the data center's PUE (Power Usage Effectiveness) consistently high, which is inconsistent with current green and low-carbon development principles. Summary of the Invention

[0004] The main objective of this invention is to provide an energy-aware virtual machine deployment and scheduling optimization method to reduce energy consumption in data centers, improve energy efficiency, and contribute to the achievement of carbon neutrality goals.

[0005] Another objective of this invention is to propose an energy-aware virtual machine deployment and scheduling optimization device.

[0006] The third objective of this invention is to provide an electronic device.

[0007] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.

[0008] To achieve the above objectives, a first aspect of the present invention proposes an energy-aware virtual machine deployment and scheduling optimization method, comprising:

[0009] Real-time collection of physical machine operating status data, virtual machine performance requirements data, electricity consumption time information, and regional power grid carbon emission data; An energy consumption curve reflecting the relationship between load and power consumption is constructed based on the operating status data of the physical machines, and the energy consumption performance ratio of each physical machine for the virtual machine to be deployed is calculated based on the energy consumption curve and the performance requirement data. Based on the energy efficiency ratio, a target physical machine is determined from the candidate physical machines, and the virtual machine to be deployed is deployed to the target physical machine; During the operation of the virtual machine, based on the electricity consumption time information, the regional power grid carbon emission data, and the real-time load of the virtual machine, low-load virtual machines are centrally migrated or high-load non-real-time virtual machines are adjusted according to their time periods.

[0010] Optionally, the real-time acquisition of physical machine operating status data, virtual machine performance requirement data, electricity consumption time information, and regional power grid carbon emission data includes: The CPU utilization, memory usage, hard disk I / O speed, and real-time power consumption of the physical machine are collected at a frequency of once per minute using sensors and data acquisition interfaces installed on the physical machine. Obtain the CPU processing power, memory capacity, network bandwidth, and CPU utilization threshold required by the virtual machine from the virtual machine management platform as performance requirement data; Electricity prices and peak / off-peak periods are obtained from the power supply department's information system as electricity consumption time information; The proportion of thermal power generation to renewable energy generation in the regional power grid and the carbon emission intensity at different times are obtained from the database of the regional energy management department as regional power grid carbon emission data.

[0011] Optionally, the step of constructing an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machines, and calculating the energy efficiency ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data, includes: Record the real-time power consumption data of the physical machine under different CPU utilization rates, and obtain the energy consumption curve that reflects the energy consumption change by performing polynomial fitting on the collected power consumption data under different CPU utilization rates. Based on the CPU utilization threshold of the virtual machine to be deployed, the power consumption under the corresponding busy level is found on the energy consumption curve, and it is determined whether the physical machine can fully meet the performance requirements of the virtual machine to determine the performance satisfaction. The energy consumption ratio is obtained by dividing the power consumption by the performance satisfaction. When the physical function fully meets the performance requirements, the performance satisfaction is 1. When only a part of the performance requirements can be met, the performance satisfaction is between 0 and 1.

[0012] Optionally, determining the target physical machine from the candidate physical machines based on the energy efficiency ratio and deploying the virtual machine to be deployed to the target physical machine includes: Select physical machines with current CPU utilization below 70% as candidate physical machines; Calculate the energy efficiency ratio of the virtual machine to be deployed on each candidate physical machine; The candidate physical machine with the lowest energy efficiency ratio is selected as the target physical machine. If there are multiple candidate physical machines with the same and lowest energy efficiency ratio, the next-generation energy-saving server is selected as the target physical machine and the virtual machine to be deployed is deployed on it.

[0013] Optionally, during the virtual machine's operation, based on the electricity consumption time information, the regional power grid carbon emission data, and the virtual machine's real-time load, the process of centrally migrating low-load virtual machines or adjusting the time periods of high-load non-real-time virtual machines includes: Perform load testing on running virtual machines every hour to filter out low-load virtual machines with CPU utilization consistently below 30%. While ensuring business performance, the low-load virtual machines are centrally deployed on physical machines with high energy efficiency, and some high-energy-consuming physical machines that were originally running the low-load virtual machines and were in an idle state are shut down to reduce overall energy consumption.

[0014] Optionally, the step of centrally migrating low-load virtual machines or adjusting the time periods of high-load non-real-time virtual machines based on the electricity consumption period information, the regional power grid carbon emission data, and the real-time load status of the virtual machines during virtual machine operation further includes: Identify high-load, non-real-time virtual machines whose CPU utilization consistently exceeds 70% and which are offline data analysis virtual machines; Based on the electricity consumption off-peak period division in the electricity consumption time information, the high-load non-real-time virtual machine is scheduled to run during the nighttime electricity off-peak period, and during the scheduling process, it is ensured that the task completion time of the virtual machine does not exceed the preset period in order to reduce electricity costs by utilizing peak and off-peak electricity prices.

[0015] Optionally, the method further includes a carbon emission adaptation step, specifically: When it is detected that the regional power grid is in a period of high carbon emission intensity, virtual machines to be deployed or virtual machines that need to be scheduled will be prioritized to be scheduled to data center nodes powered by clean energy such as wind power or solar power. When the regional power grid is detected to be in a period of low carbon emissions and the proportion of renewable energy generation is high, scheduling restrictions are relaxed, but virtual machine deployment or scheduling decisions are still made based on the energy consumption of physical machines in order to reduce the carbon emissions of data centers.

[0016] To achieve the above objectives, a second aspect of the present invention provides an energy-aware virtual machine deployment and scheduling optimization device, comprising: The first module is used to collect real-time data on the operating status of physical machines, the performance requirements of virtual machines, electricity consumption time information, and carbon emission data of the regional power grid. The second module is used to construct an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machine, and to calculate the energy consumption performance ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data. The third module is used to determine the target physical machine from the candidate physical machines based on the energy efficiency ratio, and to deploy the virtual machine to be deployed to the target physical machine; The fourth module is used to perform centralized migration of low-load virtual machines or time period adjustment of high-load non-real-time virtual machines based on the electricity consumption period information, the regional power grid carbon emission data, and the real-time load of the virtual machines during virtual machine operation.

[0017] To achieve the above objectives, a third aspect of this application provides an electronic device, including a processor and a memory; wherein the processor runs a program corresponding to the executable program code stored in the memory to implement the method described in the first aspect.

[0018] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.

[0019] The embodiments of this invention have the following beneficial effects: By establishing energy consumption curves for each physical machine and calculating the energy consumption-performance ratio of virtual machines on different physical machines, virtual machines can be deployed on physical machines with lower energy consumption while ensuring virtual machine performance, thus reducing the overall energy consumption of the data center; by centrally deploying low-load virtual machines and scheduling high-load non-real-time virtual machines by time period, energy utilization efficiency is further improved, while peak-valley electricity pricing reduces electricity costs; by considering the carbon emissions of the regional power grid and optimizing the deployment and scheduling of virtual machines, carbon emissions from the data center are reduced, contributing to the achievement of carbon neutrality goals. The entire process realizes intelligent and refined management of virtual machine deployment and scheduling, effectively reducing the PUE of the data center and conforming to the green and low-carbon development trend. Attached Figure Description

[0020] The above-described and additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 The flowchart illustrates a method for optimizing virtual machine deployment and scheduling based on energy consumption awareness, as provided in an embodiment of the present invention. Detailed Implementation

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] The following describes, with reference to the accompanying drawings, an energy-aware virtual machine deployment and scheduling optimization method and apparatus according to embodiments of the present invention.

[0024] Example 1 This embodiment provides a method for optimizing virtual machine deployment and scheduling based on energy consumption awareness. For example... Figure 1 As shown, the method includes the following steps: S1 collects real-time data on the operating status of physical machines, the performance requirements of virtual machines, electricity consumption periods, and carbon emission data of the regional power grid.

[0025] It's important to note that real-time acquisition of physical machine operational status data, virtual machine performance requirements data, electricity consumption time information, and regional power grid carbon emission data is a fundamental prerequisite for building an energy-aware virtual machine deployment and scheduling mechanism. Its core lies in obtaining the dynamic parameter set needed to support subsequent decision-making models through multi-dimensional sensing interfaces. This step establishes communication links with physical hardware, the virtualization management platform, the power supply system, and the regional energy management database through monitoring units deployed at the data center infrastructure layer. It continuously captures key indicators reflecting system operational characteristics at a preset time granularity. Specifically, physical machine operational status data includes parameters reflecting computing load and resource consumption; virtual machine performance requirements data characterizes the specific constraints of the tasks to be deployed on computing resources; electricity consumption time information reflects energy cost differences across different time dimensions; and regional power grid carbon emission data quantifies the environmental impact of the current electricity source. These data collectively constitute a dynamically updated sensing view, providing raw data support for subsequently quantifying physical machine energy efficiency differences and assessing carbon emission intensity.

[0026] Specifically, this step is achieved through the following process: First, for the collection of physical machine operating status data, the input sources are sensors deployed at the hardware level of each physical machine and the data acquisition interface provided by the operating system kernel. The processing action is to control the data acquisition steps to poll and read the CPU utilization, memory utilization, hard disk I / O rate and real-time power consumption of each physical machine at a fixed frequency of 1 minute / time. For example, when the CPU utilization of a new generation energy-saving server is 30% at a specific time, its corresponding real-time power consumption is 200W, while the real-time power consumption of an old server under the same load is 280W. The output result is a physical machine operating status data stream containing timestamps and values ​​of various performance indicators. This data stream serves as the direct input for the subsequent construction of energy consumption curves.

[0027] Secondly, regarding the acquisition of virtual machine performance requirement data, the input source is the resource configuration database maintained by the virtual machine management platform. The processing action is to parse the configuration request of the virtual machine to be deployed, and extract its required CPU processing power, memory capacity, network bandwidth, and CPU utilization threshold. For example, the CPU utilization threshold, memory capacity of 8GB, and network bandwidth of 100Mbps required for virtual machine V1 are extracted. The output result is a structured virtual machine performance requirement data object.

[0028] Secondly, regarding the acquisition of electricity consumption time period information, the input source is the information system interface released by the power supply department. The processing action is to periodically synchronize and parse the electricity price standards and peak and off-peak time period division rules for different time periods in the region. For example, if the peak electricity consumption period is from 8:00 to 22:00 with an electricity price of 0.8 yuan / kWh, and the off-peak electricity consumption period is from 22:00 to 8:00 the next day with an electricity price of 0.4 yuan / kWh, the output result is an electricity consumption time period information table containing time period identifiers and corresponding electricity price parameters.

[0029] Finally, regarding the acquisition of regional power grid carbon emission data, the input source is the statistical database of the regional energy management department. The processing involves querying and recording the real-time ratio of thermal power generation to renewable energy generation in the regional power grid, as well as the carbon emission intensity at different times. For example, during peak hours, the thermal power generation ratio is 70% with a carbon emission intensity of 0.8 kg CO / kWh, while during off-peak hours, the renewable energy generation ratio is 60% with a carbon emission intensity of 0.3 kg CO / kWh. The output is a regional power grid carbon emission dataset reflecting the cleanliness of the power grid. These four types of data, after collection and processing, are uniformly stored in a storage database, providing complete data support for subsequent energy efficiency ratio calculations and scheduling decisions.

[0030] This step, through comprehensive and real-time multi-source data fusion, breaks down the information barrier of traditional scheduling strategies that focus only on business performance while ignoring energy consumption and environmental costs. It lays a solid data foundation for building accurate energy consumption curve models, calculating energy efficiency ratios, and executing green and low-carbon scheduling decisions, thereby ensuring that data centers can maximize energy efficiency and minimize carbon emissions while meeting business needs.

[0031] S2, construct an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machine, and calculate the energy consumption performance ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data.

[0032] It's important to note that the process of constructing an energy consumption curve reflecting the relationship between load and power consumption and calculating the energy efficiency ratio aims to establish a quantitative mapping relationship between the resource supply characteristics of physical machines and the demands of virtual machines. This addresses the problem of blind selection caused by significant differences in energy consumption among heterogeneous physical machines under the same load. The core of this step lies in using historical or real-time collected operational status data to establish the power consumption variation patterns of physical machines under different load levels through fitting analysis, thereby forming an energy consumption curve characterizing its energy efficiency. Based on this, combined with the performance requirement data of the virtual machines to be deployed, the specific load point required for the virtual machine's operation is determined, and the expected power consumption value corresponding to that load point is obtained from the energy consumption curve. Subsequently, the concept of performance satisfaction is introduced to evaluate the degree of matching between the physical machine and the virtual machine's performance requirements. The expected power consumption value and the performance satisfaction are then processed to obtain the energy efficiency ratio, which characterizes the energy cost per unit of performance satisfaction. This ratio serves as a key indicator for measuring the suitability of physical machine deployment, comprehensively reflecting the energy-saving potential and performance guarantee capabilities of the physical machine.

[0033] Specifically, this step is achieved through the following process: First, the system continuously collects operational status data from each physical machine at a frequency of 1 minute. The specific input consists of the CPU utilization rate and its corresponding real-time power consumption at different times. For example, it records that a new generation energy-saving server consumes 200W of power when the CPU utilization rate is 30% and 350W when it is 70%. The processing involves using these discrete sampling points as the data foundation and employing a polynomial fitting algorithm to mathematically model the mapping relationship between CPU utilization and power consumption. This generates a continuous and smooth energy consumption curve, whose output is a function expression that reflects the predicted power consumption under any load.

[0034] Next, for the virtual machine to be deployed, input the CPU utilization threshold from its performance requirements data. For example, a virtual machine requires a CPU utilization threshold of 60%. The processing action is to substitute this threshold into the previously generated energy consumption curve, find or calculate the expected power consumption of the physical machine under the corresponding busy level, and compare the maximum processing capacity of the physical machine with the virtual machine's requirements. If the physical machine can fully meet the requirements, the performance satisfaction level is set to 1; if it can only partially meet the requirements, the performance satisfaction level is set to a value between 0 and 1 according to the resource gap ratio.

[0035] Finally, a division operation is performed to divide the obtained power consumption by the determined performance satisfaction level, resulting in the energy efficiency ratio of the physical machine for the virtual machine. The output is a quantitative value. The smaller the value, the more obvious the energy efficiency advantage of deploying the virtual machine on the physical machine. For example, when the power consumption is 316W and the performance satisfaction level is 1, the energy efficiency ratio is 316, while when the power consumption is 462W and the performance satisfaction level is 1, the energy efficiency ratio is 462. This serves as the direct basis for subsequent deployment decisions.

[0036] This step achieves digital modeling of the physical machine's energy efficiency characteristics by constructing energy consumption curves. This allows deployment decisions to move beyond relying solely on resource idle status and instead prioritize optimal performance based on precise energy consumption ratios. This not only identifies and prioritizes next-generation energy-efficient servers, avoiding the incorrect deployment of virtual machines to high-energy-consuming older equipment, but also significantly reduces the overall energy consumption of the data center while ensuring business performance, providing reliable data support for subsequent green and low-carbon scheduling strategies.

[0037] S3, determine the target physical machine from the candidate physical machines based on the energy efficiency ratio, and deploy the virtual machine to be deployed to the target physical machine.

[0038] It's important to note that the process of determining the target physical machine from candidate physical machines and executing deployment based on the energy efficiency ratio (EER) is essentially a technical means of decision mapping within the set of available computing resources based on the principle of optimal energy efficiency. This step aims to solve the problem of how to select the most energy-efficient load-bearing node from multiple physical machines that meet deployment conditions, while satisfying virtual machine performance constraints. Its core logic lies in using the quantitative indicator constructed in the aforementioned steps, namely the EER, as a unified scale to evaluate the suitability of each candidate physical machine. By comparing the numerical value of this ratio, the relative energy consumption cost of different physical machines when bearing a specific load is characterized. Specifically, the system first defines a set of candidate physical machines that meet the current load threshold requirements. Then, for the virtual machine to be deployed, it extracts the corresponding EER values ​​on each candidate physical machine. Based on a preset optimization strategy, the candidate physical machine with the optimal EER is locked as the target physical machine, thereby triggering resource allocation instructions to instantiate or migrate the virtual machine to be deployed to run on the target physical machine.

[0039] Specifically, this step is achieved through the following process: First, the system receives real-time operational status data from each physical machine, uploaded during the data acquisition phase. The input source is the CPU utilization value of each physical machine, collected every minute. The processing involves comparing the real-time CPU utilization of each physical machine with a preset load threshold of 70%, filtering out physical machines with a real-time CPU utilization strictly below 70%. The output is a candidate physical machine list, which excludes high-load physical machines to ensure that subsequent deployment operations do not overload the physical machines.

[0040] Next, for the virtual machine to be deployed, the deployment decision step obtains the CPU utilization threshold from its performance requirement data and iterates through each physical machine in the candidate physical machine list. The processing action involves calling the energy consumption curve generated in the energy consumption-performance model building step, querying the real-time power consumption value of each candidate physical machine at the CPU utilization threshold required by the virtual machine to be deployed. Since all candidate physical machines meet the resource requirements, the performance satisfaction level is set to 1, and the queried power consumption value is directly used as the energy efficiency ratio of that candidate physical machine for the virtual machine to be deployed. The output is a dataset containing the identifiers of each candidate physical machine and their corresponding energy efficiency ratio values.

[0041] Finally, the energy efficiency ratios in the dataset are sorted and compared, with the process of identifying the candidate physical machine with the lowest energy efficiency ratio. If multiple candidate physical machines have the same lowest energy efficiency ratio, the physical machine type identifier is further read, and the physical machine marked as a new generation energy-saving server (i.e., a Class A physical machine) is selected first. The output is a unique identifier for the target physical machine, and the system then generates deployment instructions to migrate or initialize the virtual machine to be deployed on the target physical machine.

[0042] This step, by introducing energy efficiency ratio as a core decision-making criterion, breaks away from the limitations of traditional deployment based solely on remaining resource capacity, enabling a shift in virtual machine deployment strategies from resource availability-oriented to energy efficiency-oriented. This not only ensures that virtual machines to be deployed are located on the most energy-efficient physical nodes from the outset, effectively reducing the overall basic energy consumption of the data center, but also promotes the differentiated utilization of older, high-energy-consuming equipment and new energy-saving equipment through a refined selection mechanism, significantly improving the overall energy efficiency of the data center.

[0043] S4. During the operation of the virtual machine, based on the electricity consumption time information, the regional power grid carbon emission data, and the real-time load of the virtual machine, the low-load virtual machine is centrally migrated or the high-load non-real-time virtual machine is adjusted according to the time period.

[0044] It should be noted that during virtual machine operation, the dynamic scheduling mechanism optimizes resource allocation based on multi-dimensional operating environment parameters and business characteristics. These operating environment parameters include electricity consumption time information and regional power grid carbon emission data, while the business characteristics are reflected in the real-time load of the virtual machines. The core of this step lies in establishing a mapping relationship between load status and scheduling strategies. By periodically monitoring and identifying virtual machine sets that are consistently under low load, these are migrated to physical nodes with better energy efficiency for centralized deployment, thereby releasing and shutting down some high-energy-consuming idle physical resources. Simultaneously, for non-real-time virtual machines with high load characteristics and low real-time requirements, their execution time is adjusted to a low-cost or low-carbon-emission time window by combining peak-valley division in electricity consumption time information or carbon emission intensity changes in regional power grid carbon emission data. This achieves coordinated optimization of operating costs and environmental load while meeting task completion deadlines.

[0045] In this embodiment, a centralized migration strategy for low-load virtual machines is specifically implemented for the dynamic scheduling phase during virtual machine operation. The input source for this process is the real-time load data of running virtual machines collected at preset time intervals by the dynamic scheduling step, specifically represented as a sequence of CPU utilization values ​​for each virtual machine within a continuous monitoring period.

[0046] The processing steps first include load detection and filtering. The system is set to monitor once per hour, traversing all active virtual machines in the data center and collecting historical data on their CPU utilization. If a virtual machine's CPU utilization is below the preset threshold of 30% for several consecutive monitoring periods, it is marked as a low-load virtual machine.

[0047] Following this, deployment optimization decisions are made. The system obtains the energy efficiency ratio (EER) data of each physical machine in the current data center. This data originates from the aforementioned energy efficiency ratio calculation results. Using a list of selected low-load virtual machines as input, a scheduling algorithm calculates resource matching schemes to migrate these virtual machines to high-efficiency physical machines (such as next-generation energy-saving servers). This ensures that the CPU utilization and memory usage of the target physical machines after migration do not exceed safety limits and meet the business performance requirements of the virtual machines. After determining the migration path, the system generates virtual machine migration instructions, migrating the low-load virtual machines scattered across different physical machines to a selected few high-efficiency physical machines for centralized operation in real time. The output results are the new deployment topology of the low-load virtual machines and a list of high-energy-consuming physical machines that originally hosted these virtual machines but are now idle due to the migration.

[0048] Next, the system performs a shutdown operation based on the output list of idle physical machines, sending shutdown commands to these high-energy-consuming physical machines in an idle state, temporarily removing them from the active resource pool, thereby reducing the overall basic power consumption of the data center. For example, 10 low-load virtual machines that were originally distributed among 5 old servers and 5 energy-efficient servers are migrated to 3 energy-efficient servers with the highest energy efficiency ratio, and the remaining 7 physical machines are shut down.

[0049] As a specific implementation method, low-load virtual machines with CPU utilization rates consistently below a preset threshold can be migrated to a new generation of energy-saving servers, while high-load non-real-time virtual machines for offline data analysis can be scheduled to run during off-peak hours at night or during periods with a higher proportion of renewable energy generation.

[0050] This step achieves fine-grained scheduling of virtual machine resources in time and space by dynamically adapting to the spatiotemporal changes in electricity costs and carbon emission intensity. This not only significantly reduces the overall energy consumption and operating electricity costs of the data center, but also effectively reduces carbon emissions caused by reliance on high-carbon power sources, thereby improving the green and low-carbon operation level of the system.

[0051] Furthermore, the method proposed in this application also includes a carbon emission adaptation step, used to further optimize deployment and scheduling strategies based on the carbon emission data of the regional power grid. Specifically, when it is detected that the regional power grid is in a peak carbon emission period and the carbon emission intensity is high, virtual machines to be deployed or virtual machines to be scheduled are preferentially scheduled to run on data center nodes powered by clean energy such as wind power or solar energy; when it is detected that the regional power grid is in a low carbon emission period and the proportion of renewable energy generation is high, scheduling restrictions are relaxed, but virtual machine deployment or scheduling decisions are still made based on the energy consumption of physical machines to reduce the carbon emissions of the data center.

[0052] In this embodiment of the invention, when it is detected that the current period is a peak carbon emission period from 8:00 to 22:00, and the carbon emission intensity of the regional power grid is high, the carbon emission adaptation step intervenes in the decision-making process. If a batch of new virtual machines needs to be deployed at this time, this step will prioritize scheduling these virtual machines to specific nodes within the data center that are powered by clean energy (such as wind or solar power). In this embodiment, the clean energy nodes are mainly composed of Class A physical machines. Statistical data shows that if these virtual machines are deployed on ordinary nodes that rely on thermal power during peak hours, running for 8 hours and consuming 100 kWh of electricity will generate 100 × 0.8 = 80 kg CO2 in carbon emissions; while after being deployed on solar-powered nodes, the direct carbon emissions generated by their operation are almost zero, and a single scheduling can reduce carbon emissions by 80 kg CO2. Conversely, when it is detected that the regional power grid is in a low carbon emission period, i.e., when the proportion of renewable energy generation is high, the carbon emission adaptation step can appropriately relax the restrictions on node types, but it still needs to make a comprehensive decision based on the energy consumption of the physical machines to balance energy efficiency under the premise of low carbon emissions.

[0053] To illustrate the practical application of this invention, an example is given below.

[0054] The energy-aware virtual machine deployment and scheduling optimization method described in this invention is deployed in a large data center. The data center contains 100 physical machines, of which 50 are new-generation energy-saving servers (labeled as Class A physical machines) and 50 are older servers (labeled as Class B physical machines).

[0055] (1) Collect the following data in real time: 1. The CPU utilization, memory usage, and real-time power consumption of each physical machine are collected every minute. For example, data shows that a Class A physical machine consumes 200W of real-time power when the CPU utilization is 30% and 350W of real-time power consumption when the CPU utilization is 70%. A Class B physical machine consumes 280W of real-time power when the CPU utilization is 30% and 450W of real-time power consumption when the CPU utilization is 70%.

[0056] 2. Virtual machine performance requirements data, such as a newly created virtual machine V1, which requires a CPU utilization threshold of 60%, a memory capacity of 8GB, and a network bandwidth of 100Mbps.

[0057] 3. Electricity consumption data shows that the peak electricity consumption period in this area is from 8:00 to 22:00, with an electricity price of 0.8 yuan / kWh; the off-peak electricity consumption period is from 22:00 to 8:00 the next day, with an electricity price of 0.4 yuan / kWh.

[0058] 4. According to regional power grid carbon emission data, during peak electricity consumption periods (8:00-22:00), thermal power generation accounts for 70%, with a carbon emission intensity of 0.8 kg CO2 / kWh; during off-peak electricity consumption periods (22:00-8:00 the next day), renewable energy generation accounts for 60%, with a carbon emission intensity of 0.3 kg CO2 / kWh.

[0059] (2) Processing the collected physical machine operation data: 5. Establish an energy consumption curve for each physical machine. Taking a physical machine in category A as an example, a curve reflecting its energy consumption changes is obtained by performing polynomial fitting on the power consumption data collected under different CPU utilization rates. The same method is used to obtain the energy consumption curve for a physical machine in category B.

[0060] 6. Calculate the energy consumption-performance ratio of virtual machine V1 on Class A and Class B physical machines. Given that the CPU utilization threshold of virtual machine V1 is 60%, and since the processing power of both Class A and Class B physical machines can meet the performance requirements of V1, the performance satisfaction level is 1. Using the energy consumption curve of the Class A physical machine, the power consumption at 60% CPU utilization is found to be 316W, therefore the energy consumption-performance ratio is 316. Using the energy consumption curve of the Class B physical machine, the power consumption at 60% CPU utilization is found to be 462W, therefore the energy consumption-performance ratio is 462.

[0061] (3) Select physical machines with a current CPU utilization rate of less than 70% as candidate physical machines, assuming that they include multiple Class A physical machines and Class B physical machines.

[0062] Since the energy efficiency ratio of virtual machine V1 on a Class A physical machine (316) is less than that on a Class B physical machine (462), the deployment decision module selects a Class A physical machine as the target physical machine and deploys virtual machine V1 on it.

[0063] (4) Dynamic scheduling: 7. Centralized Deployment of Low-Load Virtual Machines: Hourly load monitoring of running virtual machines revealed that 10 virtual machines consistently had CPU utilization below 30%, classifying them as low-load virtual machines. These virtual machines are currently distributed across 5 Class A physical machines and 5 Class B physical machines.

[0064] While ensuring the performance of these virtual machine services, they were centrally deployed on three energy-efficient Class A physical machines, while the five Class B physical machines and two idle Class A physical machines that were originally running these virtual machines were shut down. Calculations show that this measure can reduce energy consumption by approximately 50 kWh per day.

[0065] 8. High-load non-real-time virtual machine time-sharing: There is a virtual machine V2 used for offline data analysis whose CPU utilization has been consistently above 70%, classifying it as a high-load non-real-time virtual machine. The dynamic scheduling module schedules it to run during the off-peak electricity consumption period from 22:00 to 8:00 the next day, based on electricity consumption data.

[0066] The virtual machine originally consumed 0.5 kWh of electricity per hour during peak hours, costing 0.5 × 0.8 = 0.4 yuan. After being scheduled to run during off-peak hours, the electricity cost per hour was 0.5 × 0.4 = 0.2 yuan. Running for 8 hours a day, it can save (0.4 - 0.2) × 8 = 1.6 yuan in electricity costs.

[0067] (5) Carbon emission adaptation: During the peak carbon emission period from 8:00 to 22:00, a high carbon emission intensity was detected in the regional power grid. At this time, a batch of new virtual machines needed to be deployed. The carbon emission adaptation module prioritized scheduling them to run on solar-powered nodes within the data center, where all physical machines were Class A.

[0068] Statistics show that if these virtual machines run for 8 hours during peak hours and are deployed on ordinary nodes (relying on thermal power), they will consume 100 kWh of electricity and emit 100 × 0.8 = 80 kg CO2. However, when deployed on solar-powered nodes, the carbon emissions are almost zero, reducing carbon emissions by 80 kg CO2.

[0069] As can be seen from the above embodiments, the energy-aware virtual machine deployment and scheduling optimization method of the present invention can effectively reduce the energy consumption and carbon emissions of data centers, improve energy efficiency, and has significant economic and environmental benefits.

[0070] Example 2 This invention also provides an energy-aware virtual machine deployment and scheduling optimization device, comprising: The first module is used to collect real-time data on the operating status of physical machines, the performance requirements of virtual machines, electricity consumption time information, and carbon emission data of the regional power grid. The second module is used to construct an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machine, and to calculate the energy consumption performance ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data. The third module is used to determine the target physical machine from the candidate physical machines based on the energy efficiency ratio, and to deploy the virtual machine to be deployed to the target physical machine; The fourth module is used to perform centralized migration of low-load virtual machines or time period adjustment of high-load non-real-time virtual machines based on the electricity consumption period information, the regional power grid carbon emission data, and the real-time load of the virtual machines during virtual machine operation.

[0071] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0072] Example 3 To implement the methods of the above embodiments, the present invention also provides an electronic device, which includes a memory and a processor; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the various steps of the methods described above.

[0073] Example 4 To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing embodiments.

[0074] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0075] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0076] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A method for optimizing virtual machine deployment and scheduling based on energy consumption awareness, characterized in that, Includes the following steps: Real-time collection of physical machine operating status data, virtual machine performance requirements data, electricity consumption time information, and regional power grid carbon emission data; An energy consumption curve reflecting the relationship between load and power consumption is constructed based on the operating status data of the physical machines, and the energy consumption performance ratio of each physical machine for the virtual machine to be deployed is calculated based on the energy consumption curve and the performance requirement data. Based on the energy efficiency ratio, a target physical machine is determined from the candidate physical machines, and the virtual machine to be deployed is deployed to the target physical machine; During the operation of the virtual machine, based on the electricity consumption time information, the regional power grid carbon emission data, and the real-time load of the virtual machine, low-load virtual machines are centrally migrated or high-load non-real-time virtual machines are adjusted according to their time periods.

2. The method as described in claim 1, characterized in that, The real-time acquisition of physical machine operating status data, virtual machine performance requirement data, electricity consumption time information, and regional power grid carbon emission data includes: The CPU utilization, memory usage, hard disk I / O speed, and real-time power consumption of the physical machine are collected at a frequency of once per minute using sensors and data acquisition interfaces installed on the physical machine. Obtain the CPU processing power, memory capacity, network bandwidth, and CPU utilization threshold required by the virtual machine from the virtual machine management platform as performance requirement data; Electricity prices and peak / off-peak periods are obtained from the power supply department's information system as electricity consumption time information; The proportion of thermal power generation to renewable energy generation in the regional power grid and the carbon emission intensity at different times are obtained from the database of the regional energy management department as regional power grid carbon emission data.

3. The method as described in claim 1, characterized in that, The step of constructing an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machines, and calculating the energy efficiency ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data, includes: Record the real-time power consumption data of the physical machine under different CPU utilization rates, and obtain the energy consumption curve that reflects the energy consumption change by performing polynomial fitting on the collected power consumption data under different CPU utilization rates. Based on the CPU utilization threshold of the virtual machine to be deployed, the power consumption under the corresponding busy level is found on the energy consumption curve, and it is determined whether the physical machine can fully meet the performance requirements of the virtual machine to determine the performance satisfaction. The energy consumption ratio is obtained by dividing the power consumption by the performance satisfaction. When the physical function fully meets the performance requirements, the performance satisfaction is 1. When only a part of the performance requirements can be met, the performance satisfaction is between 0 and 1.

4. The method as described in claim 1, characterized in that, The step of determining the target physical machine from the candidate physical machines based on the energy efficiency ratio and deploying the virtual machine to be deployed to the target physical machine includes: Select physical machines with current CPU utilization below 70% as candidate physical machines; Calculate the energy efficiency ratio of the virtual machine to be deployed on each candidate physical machine; The candidate physical machine with the lowest energy efficiency ratio is selected as the target physical machine. If there are multiple candidate physical machines with the same and lowest energy efficiency ratio, the next-generation energy-saving server is selected as the target physical machine and the virtual machine to be deployed is deployed on it.

5. The method as described in claim 1, characterized in that, During the virtual machine's operation, based on the electricity consumption time period information, the regional power grid carbon emission data, and the virtual machine's real-time load status, the process of centrally migrating low-load virtual machines or adjusting the time periods of high-load non-real-time virtual machines includes: Perform load testing on running virtual machines every hour to filter out low-load virtual machines with CPU utilization consistently below 30%. While ensuring business performance, the low-load virtual machines are centrally deployed on physical machines with high energy efficiency, and some high-energy-consuming physical machines that were originally running the low-load virtual machines and were in an idle state are shut down to reduce overall energy consumption.

6. The method as described in claim 1, characterized in that, The method of centrally migrating low-load virtual machines or adjusting the time periods of high-load non-real-time virtual machines based on the electricity consumption period information, the regional power grid carbon emission data, and the real-time load status of the virtual machines during virtual machine operation further includes: Identify high-load, non-real-time virtual machines whose CPU utilization consistently exceeds 70% and which are offline data analysis virtual machines; Based on the electricity consumption off-peak period division in the electricity consumption time information, the high-load non-real-time virtual machine is scheduled to run during the nighttime electricity off-peak period, and during the scheduling process, it is ensured that the task completion time of the virtual machine does not exceed the preset period in order to reduce electricity costs by utilizing peak and off-peak electricity prices.

7. The method as described in claim 1, characterized in that, The method also includes a carbon emission adaptation step, specifically: When it is detected that the regional power grid is in a period of high carbon emission intensity, virtual machines to be deployed or virtual machines that need to be scheduled will be prioritized to be scheduled to data center nodes powered by clean energy such as wind power or solar power. When the regional power grid is detected to be in a period of low carbon emissions and the proportion of renewable energy generation is high, scheduling restrictions are relaxed, but virtual machine deployment or scheduling decisions are still made based on the energy consumption of physical machines in order to reduce the carbon emissions of data centers.

8. A virtual machine deployment and scheduling optimization device based on energy consumption awareness, characterized in that, include: The first module is used to collect real-time data on the operating status of physical machines, the performance requirements of virtual machines, electricity consumption time information, and carbon emission data of the regional power grid. The second module is used to construct an energy consumption curve reflecting the relationship between load and power consumption based on the operating status data of the physical machine, and to calculate the energy consumption performance ratio of each physical machine for the virtual machine to be deployed based on the energy consumption curve and the performance requirement data. The third module is used to determine the target physical machine from the candidate physical machines based on the energy efficiency ratio, and to deploy the virtual machine to be deployed to the target physical machine; The fourth module is used to perform centralized migration of low-load virtual machines or time period adjustment of high-load non-real-time virtual machines based on the electricity consumption period information, the regional power grid carbon emission data, and the real-time load of the virtual machines during virtual machine operation.

9. An electronic device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.