A virtual machine resource monitoring management method, device, storage medium and system
By acquiring performance data and task importance of the host machine and virtual machines, and dynamically adjusting virtual machine priority and resource allocation, the problem of excessive resource consumption in virtualization technology is solved, achieving more efficient resource management and task priority assurance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU JUNBO NETWORK TECH INC
- Filing Date
- 2025-09-17
- Publication Date
- 2026-04-17
AI Technical Summary
Existing virtualization technologies lack finesse in resource management, limiting the number of virtual machines that can run on each device, resulting in excessive resource consumption, performance waste, and inefficiency.
By acquiring total host performance and real-time virtual machine performance data, and combining task schedules and importance levels, the priority and resource allocation of virtual machines are dynamically adjusted. The performance buffer pool is used to prioritize high-importance tasks and compress resources for low-importance tasks.
This has enabled resource allocation to better align with business needs, improved service quality, reduced the risk of task interruption, increased overall resource utilization, and reduced waste of idle resources.
Smart Images

Figure CN121143949B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, and in particular relates to a virtual machine resource monitoring and management method, device, storage medium and system. Background Technology
[0002] A virtual machine (VM) is a complete computer system simulated using software such as VMware and VirtualBox. It possesses virtual hardware resources such as CPU, memory, hard disk, and network card, and runs on a physical machine. Virtual machine technology, through a software abstraction layer, enables flexible partitioning and efficient utilization of hardware resources, becoming the cornerstone of technologies such as cloud computing and cross-platform development.
[0003] Virtual machines all require virtualization technology to run. Virtualization is a commonly used resource management technique that abstracts physical hardware resources through a software layer, thereby creating one or more independent virtual environments. Each VM has its own operating system, memory, CPU resources, etc., but in reality, it shares the hardware resources of the physical host.
[0004] Therefore, virtualization technology often consumes a lot of performance when in use, and the existing virtualization technology does not manage resources very finely, with each virtual machine consuming too many resources, which limits the number of virtual machines that can run on a single device. Summary of the Invention
[0005] The purpose of this application is to provide a virtual machine resource monitoring and management method, which aims to solve the problem that current virtualization technology often consumes a lot of performance when in use, and the existing virtualization technology does not manage resources very finely, resulting in each virtual machine consuming too many resources, which limits the number of virtual machines that can run on a single device.
[0006] This application provides a virtual machine resource monitoring and management method, the method comprising:
[0007] Get the upper limit of the host machine's total performance, and get the real-time total performance usage of all virtual machines running on the host machine;
[0008] Obtain the task schedule for each virtual machine, get the currently running tasks for each virtual machine, and obtain the importance level of the currently running tasks;
[0009] When the ratio of the total occupied data to the upper limit data exceeds the warning threshold, the priority of each virtual machine is sorted according to the importance level to obtain a priority sequence, so that the ranking of virtual machines performing high-importance tasks is higher than that of virtual machines performing low-importance tasks.
[0010] The performance of virtual machines at the tail end of the priority sequence is dynamically compressed, and the released performance is allocated to the host machine's performance buffer pool to prioritize the calls of virtual machines performing high-importance tasks.
[0011] Another objective of this application embodiment is to provide a virtual machine resource monitoring and management device, the device comprising:
[0012] The data acquisition module is used to acquire the upper limit data of the total performance of the host machine and the real-time total performance usage data of all virtual machines running on the host machine.
[0013] The importance level acquisition module is used to obtain the task schedule of each virtual machine, get the current running tasks of each virtual machine, and obtain the importance level of the current running tasks;
[0014] The sorting module is used to sort the priority of each virtual machine based on the importance level when the ratio of the total occupied data to the upper limit data exceeds the warning threshold, so as to obtain a priority sequence, so that the sorting position of the virtual machine performing the high-importance task is higher than that of the virtual machine performing the low-importance task.
[0015] The cache control module is used to dynamically compress the performance of virtual machines at the end of the priority sequence, and allocate the released performance to the host machine's performance buffer pool so as to prioritize the virtual machines performing high-importance tasks.
[0016] Another objective of this application is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the virtual machine resource monitoring and management method described above.
[0017] Another objective of this application is to provide a virtual machine resource monitoring and management system, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the virtual machine resource monitoring and management method described above.
[0018] The virtual machine resource monitoring and management method provided in this application has the following key advantages: it dynamically obtains and parses task importance based on the task schedule table, rather than fixing virtual machine priorities, making resource allocation more aligned with business needs and improving service quality; the sorting mechanism ensures that high-importance tasks are always prioritized, reducing the risk of task interruption; virtual machines running non-critical tasks at the end compress and release "low-value" resources, and use a buffer pool as a shared pool to achieve resource reallocation, prioritizing high-importance tasks, improving overall utilization, and reducing the waste of idle resources. Attached Figure Description
[0019] Figure 1 This application provides an example of an virtual machine resource monitoring and management method.
[0020] Figure 2 A flowchart illustrating a virtual machine resource monitoring and management method provided in this application embodiment;
[0021] Figure 3 A structural block diagram of a virtual machine resource monitoring and management device provided in this application embodiment;
[0022] Figure 4 This is a block diagram of the internal structure of a computer device in one embodiment. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0024] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise stated, these elements are not limited by these terms. These terms are used only to distinguish the first unit or module from another unit or module. For example, without departing from the scope of this application, the first script may be referred to as the second script, and similarly, the second script may be referred to as the first script.
[0025] Figure 1 An application environment diagram for the virtual machine resource monitoring and management method provided in the embodiments of this application is shown below. Figure 1 As shown, this application environment includes a virtual machine 110 and a computer device 120.
[0026] Computer device 120 can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers. It can be a laptop, a desktop computer, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0027] Virtual machine 110 can be a virtual Android, virtual Windows, virtual private control system, etc., but is not limited to these. Virtual machine 110 can run on computer device 120.
[0028] like Figure 2 As shown, in one embodiment, a virtual machine resource monitoring and management method is proposed. This embodiment mainly applies this method to the above-mentioned... Figure 1 Taking computer device 120 as an example, a virtual machine resource monitoring and management method may specifically include the following steps:
[0029] Step S10: Obtain the upper limit data of the total performance of the host machine, and obtain the real-time total performance usage data of all virtual machines running on the host machine.
[0030] In this embodiment, the upper limit of the host machine's physical resources is quantified as a benchmark for resource allocation. The host machine's CPU core count, memory capacity, total bandwidth, disk data transfer rate performance limits, and real-time virtual machine usage data can be obtained through operating system interfaces or virtualization platform APIs. For example, the physical core count can be resolved using Linux's ` / proc / cpuinfo`, the CPU usage of each VM can be obtained through the virtualization platform monitoring interface, the actual allocated memory can be read from the hypervisor memory management unit, and the I / O operations of each VM can be counted using the block device monitoring tool `iostat`. All VMs on the host machine are traversed and collected in real time to obtain the total performance utilization at each level.
[0031] Step S20: Obtain the task schedule table for each virtual machine, obtain the currently running tasks for each virtual machine, and obtain the importance level of the currently running tasks.
[0032] In this embodiment, the importance level can be determined through the Kubernetes priority class of the task scheduling system or by reading user-defined policies.
[0033] For example, in a Linux-based cloud hosting platform, the cloud servers run a large number of virtual Android phones, each running an emulated game. Some of these phones are undergoing system updates, some are running automated scripts, some are being actively managed by clients, and some are updating games. Different priority levels are preset for these tasks.
[0034] Step S30: When the ratio of the total occupied data to the upper limit data exceeds the warning threshold, the priority of each virtual machine is sorted according to the importance level to obtain a priority sequence, so that the ranking of virtual machines performing high-importance tasks is higher than that of virtual machines performing low-importance tasks.
[0035] In this embodiment, a warning threshold is preset, and when resources are overloaded, a virtual machine priority sequence is generated based on importance. The sequence S is an ordered list of virtual machine indices, with high-importance tasks at the top. n represents the number of virtual machines currently running. Different thresholds can be set for different performance types to ensure that triggering occurs when any resource exceeds its limit.
[0036] Step S40: Dynamically compress the performance of the virtual machines at the end of the priority sequence, and allocate the released performance to the host machine's performance buffer pool so as to prioritize the virtual machines that are executing high-importance tasks.
[0037] The goal of this embodiment is to reallocate resources according to priority sequence to ensure that high-importance tasks receive sufficient resources. First, resources are reduced for low-priority virtual machines at the end of the sequence. For example, task execution may be reduced or paused based on different task importance, and the released resources are then returned to the performance buffer pool for later use. The last K virtual machines in sequence S are compressed, and the released resources ΔR are injected into buffer pool B, i.e., B = B + ΔR. High-priority virtual machines can request resources from B first.
[0038] The advantages of this application's embodiments are that it dynamically obtains and parses task importance based on the task schedule table, rather than fixing virtual machine priorities, making resource allocation more aligned with business needs and improving service quality; the sorting mechanism ensures that high-importance tasks are always prioritized, reducing the risk of task interruption; virtual machines running non-critical tasks at the end compress and release "low-value" resources, and use the buffer pool as a shared pool to achieve resource reallocation, prioritizing high-importance tasks, improving overall utilization, and reducing the waste of idle resources.
[0039] In a preferred embodiment, the method for dynamically compressing the performance of virtual machines at the tail of the priority sequence and allocating the released performance to the host machine's performance buffer pool is as follows:
[0040] After excluding the protected virtual machines from the priority sequence, the last M virtual machines in the sequence are selected as objects to be compressed. For each object to be compressed, a performance compression ratio α is obtained, which is negatively correlated with the importance level of the task running by the object to be compressed. The resource configuration of the object to be compressed is updated based on the performance compression ratio α, and the released resources are injected into the performance buffer pool.
[0041] In this embodiment, protected virtual machines do not participate in compression. Protected virtual machines are excluded from the priority sequence, and the last M virtual machines in the sequence are selected as objects to be compressed. For each object to be compressed, the performance compression ratio is calculated, and finally, the resource configuration of the object to be compressed is updated, and the released resources are injected into the performance buffer pool. The lower the importance, the higher the compression ratio, which causes the virtual machine system to slow down or pause the execution of its tasks to satisfy high-priority tasks.
[0042] The method for obtaining the number of M at the end of the sequence is as follows:
[0043]
[0044] Where γ is the compression ratio and N is the total number of virtual machines. The compression ratio γ can be selected based on actual conditions.
[0045] The key advantages of this application's embodiments lie in further enhancing system flexibility and security. It avoids compressing paid premium users, critical users, or tasks, ensuring service level agreement compliance. Furthermore, it only compresses low-priority virtual machines, minimizing the impact on the system and avoiding fluctuations caused by random compression.
[0046] Furthermore, it ensures that less important tasks are compressed more to free up more resources, while less important tasks are compressed to reduce their performance loss.
[0047] In a preferred embodiment, the method for obtaining the protected virtual machine is as follows:
[0048] Read the user group list, which includes a queue-free list;
[0049] Obtain all renter IDs under the queue-free list, and read all queue-free virtual machines under each renter ID.
[0050] Set all queue-free virtual machines as protected virtual machines.
[0051] In this embodiment, user permission models for VIP user groups, specific enterprises, or cloud platforms are directly mapped without additional configuration, improving operational efficiency. This ensures that virtual machines for high-value users, such as long-term contract tenants, are not affected by resource compression, enhancing user satisfaction and retention rates. Simultaneously, system maintenance requires no manual intervention; protected virtual machines are automatically derived using the tenant's ID, reducing error rates.
[0052] In a preferred embodiment, the method for obtaining the protected virtual machine further includes:
[0053] Based on the task schedules of each virtual machine, the estimated remaining completion time of the currently running tasks on each virtual machine is obtained; the median of the remaining completion times of all tasks is then calculated. The estimated remaining completion time is less than Set the task as a protected task, and set the virtual machine executing the protected task as a protected virtual machine.
[0054] In the embodiments of this application, This represents the threshold multiple, i.e., the median. For example, the median is 600s. A value of 0.1 protects tasks that can complete within 60 seconds. Prioritizing tasks nearing completion prevents delays due to compression, reduces task failure rates, and improves overall running speed. Furthermore, because the median task time is used, adjustments are dynamic, avoiding false protection caused by fixed thresholds. Short tasks release resources quickly upon completion, allowing the buffer pool to reclaim resources faster, which is more efficient than long-term protection and ensures more granular resource management.
[0055] In a preferred embodiment, the total host performance includes one or more of the following hardware performance characteristics:
[0056] CPU performance, memory capacity, maximum disk write and read speeds, and maximum network upload and download speeds;
[0057] Different hardware performance levels have different preset warning thresholds.
[0058] In this embodiment, the total host performance includes various hardware performance metrics such as CPU, memory, disk speed, and network speed. Different hardware performance metrics have preset warning thresholds, such as an 80% threshold for CPU and a 90% threshold for memory. When a new resource type needs to be monitored, only the vector needs to be extended without modifying the core logic, making it more suitable for heterogeneous hardware environments.
[0059] In a preferred embodiment, when prioritizing the virtual machines based on their importance levels, if several virtual machines have the same importance level for their running tasks, these virtual machines are set as virtual machines to be compared.
[0060] The real-time performance utilization rate of the virtual machines to be compared is obtained, and a secondary sort is performed based on the performance utilization rate, so that the virtual machines with high performance utilization rate are placed at the end of the secondary sort.
[0061] In this embodiment, the secondary sorting mechanism improves fairness and efficiency. A high occupancy rate indicates a more active virtual machine; placing it at the end and prioritizing its compression releases more resources and reduces inefficient compression operations.
[0062] like Figure 3 As shown, in one embodiment, a virtual machine resource monitoring and management device is provided. This device can be integrated into the aforementioned computer device 120, and specifically may include:
[0063] The data acquisition module 510 is used to acquire the upper limit data of the total performance of the host machine and the real-time total performance usage data of all virtual machines running on the host machine.
[0064] The importance level acquisition module 520 is used to obtain the task schedule of each virtual machine, obtain the current running tasks of each virtual machine, and obtain the importance level of the current running tasks.
[0065] The sorting module 530 is used to sort the priority levels of each virtual machine based on the importance level when the ratio of the total occupied data to the upper limit data exceeds the warning threshold, so as to obtain a priority sequence, so that the sorting position of the virtual machine performing the high-importance task is higher than that of the virtual machine performing the low-importance task.
[0066] The cache control module 540 is used to dynamically compress the performance of the virtual machines at the end of the priority sequence, and allocate the released performance to the host machine's performance buffer pool so as to prioritize the virtual machines that are performing high-importance tasks.
[0067] In the embodiments of this application, the explanation and description of the above-mentioned virtual machine resource monitoring and management device can be referred to the explanation and description of the corresponding method. For the description of the virtual machine resource monitoring and management method, please refer to the above text, which will not be repeated here.
[0068] In this embodiment, task importance is dynamically obtained and parsed based on the task schedule table, rather than using fixed virtual machine priorities. This makes resource allocation more aligned with business needs and improves service quality. The sorting mechanism ensures that high-importance tasks are always prioritized, reducing the risk of task interruption. Virtual machines running non-critical tasks at the end of the process compress and release "low-value" resources, and use a buffer pool as a shared pool to achieve resource reallocation, prioritizing high-importance tasks, improving overall utilization, and reducing the waste of idle resources.
[0069] In one embodiment, the cache control module 540 specifically includes:
[0070] The compression object acquisition module is used to acquire the last M virtual machines in the priority sequence as objects to be compressed after excluding the protected virtual machines from the priority sequence.
[0071] The compression ratio acquisition module is used to acquire the performance compression ratio α for each object to be compressed, wherein the performance ratio α is negatively correlated with the importance level of the task running by the object to be compressed;
[0072] The configuration update module is used to update the resource configuration of the object to be compressed based on the performance compression ratio α, and to inject the released resources into the performance buffer pool.
[0073] In the embodiments of this application, the explanation of the above modules can be referred to the explanation of the corresponding methods, and will not be repeated here.
[0074] Figure 4 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Computer equipment 120. (e.g.) Figure 4As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and may also store computer programs. When executed by the processor, these computer programs enable the processor to implement virtual machine resource monitoring and management methods. The internal memory may also store computer programs, which, when executed by the processor, enable the processor to perform virtual machine resource monitoring and management methods. The display screen may be an LCD screen, etc. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse, etc.
[0075] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0076] In one embodiment, the virtual machine resource monitoring and management device provided in this application can be implemented as a computer program, and the computer program can be implemented in the form of, for example, Figure 4 It runs on the device shown. The device's memory can store the various program modules that make up the virtual machine resource monitoring and management device, for example, Figure 3 The data acquisition module 510, importance level acquisition module 520, sorting module 530, and cache control module 540 are shown. The computer program comprised of these modules causes the processor to execute the steps of the virtual machine resource monitoring and management methods described in the various embodiments of this application.
[0077] For example, Figure 4 The computer equipment shown can be used as follows Figure 3 The data acquisition module 510 in the virtual machine resource monitoring and management device shown executes step S10. The computer device can execute step S20 through the importance level acquisition module 520. And so on.
[0078] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the steps of the virtual machine resource monitoring and management method described above.
[0079] In the embodiments of this application, please refer to the above description of the virtual machine resource monitoring and management method, which will not be repeated here.
[0080] In this embodiment, the program running based on the method stored in the storage medium of this embodiment has the advantage of dynamically obtaining and parsing task importance based on the task schedule table, rather than fixing virtual machine priorities. This makes resource allocation more aligned with business needs and improves service quality. The sorting mechanism ensures that high-importance tasks are always prioritized, reducing the risk of task interruption. Virtual machines running non-critical tasks at the end compress and release "low-value" resources, utilizing a buffer pool as a shared pool to achieve resource reallocation, prioritizing high-importance tasks, improving overall utilization, and reducing the waste of idle resources.
[0081] In one embodiment, a virtual machine resource monitoring and management system is provided. The system includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the steps of the virtual machine resource monitoring and management method as described above.
[0082] In this embodiment, the system can be a computer hardware system that executes its corresponding methods when the system is running. For a description of the virtual machine resource monitoring and management method above, please refer to the previous text; it will not be repeated here.
[0083] In this embodiment, the system's advantages lie in dynamically acquiring and parsing task importance based on the task schedule table, rather than fixing virtual machine priorities. This makes resource allocation more aligned with business needs and improves service quality. The sorting mechanism ensures that high-importance tasks are always prioritized, reducing the risk of task interruption. Virtual machines running non-critical tasks at the tail end compress and release "low-value" resources, utilizing a buffer pool as a shared pool to achieve resource reallocation, prioritizing high-importance tasks, improving overall utilization, and reducing idle resource waste.
[0084] It should be understood that although the steps in the flowcharts of the various embodiments of this application are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0085] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0086] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for monitoring and managing virtual machine resources, characterized in that, The method includes: Get the upper limit of the host machine's total performance, and get the real-time total performance usage of all virtual machines running on the host machine; Obtain the task schedule for each virtual machine, get the currently running tasks for each virtual machine, and obtain the importance level of the currently running tasks; When the ratio of the total occupied data to the upper limit data exceeds the warning threshold, the priority of each virtual machine is sorted according to the importance level to obtain a priority sequence, so that the ranking of virtual machines performing high-importance tasks is higher than that of virtual machines performing low-importance tasks. The performance of virtual machines at the tail end of the priority sequence is dynamically compressed, and the released performance is allocated to the host machine's performance buffer pool to prioritize the calls of virtual machines executing high-importance tasks. The method for dynamically compressing the performance of virtual machines at the tail of the priority sequence and allocating the released performance to the host machine's performance buffer pool is as follows: After excluding the protected virtual machines from the priority sequence, the last M virtual machines in the sequence are obtained as objects to be compressed; For each object to be compressed, the performance compression ratio α is obtained, and the performance ratio α is negatively correlated with the importance level of the task running by the object to be compressed; The resource configuration of the object to be compressed is updated based on the performance compression ratio α, and the released resources are injected into the performance buffer pool. Methods for obtaining protected virtual machines also include: Based on the task schedule of each virtual machine, the estimated remaining completion time of the currently running tasks of each virtual machine is obtained; Get the median remaining completion time for all tasks. ; The estimated remaining completion time is less than The task is set as a protected task, and the virtual machine executing the protected task is set as a protected virtual machine; where λ is a preset threshold multiplier.
2. The virtual machine resource monitoring and management method according to claim 1, characterized in that, The method for obtaining a protected virtual machine is as follows: Read the user group list, which includes a queue-free list; Obtain all renter IDs under the queue-free list, and read all queue-free virtual machines under each renter ID. Set all queue-free virtual machines as protected virtual machines.
3. The virtual machine resource monitoring and management method according to claim 1, characterized in that, The host machine's total performance includes one or more of the following hardware performance characteristics: CPU performance, memory capacity, maximum disk write and read speeds, and maximum network upload and download speeds; Different hardware performance levels have different preset warning thresholds.
4. The virtual machine resource monitoring and management method according to claim 1, characterized in that, When prioritizing each virtual machine based on its importance level, if several virtual machines have the same importance level for their running tasks, these virtual machines are set as virtual machines to be compared. The real-time performance utilization rate of the virtual machines to be compared is obtained, and a secondary sort is performed based on the performance utilization rate, so that the virtual machines with high performance utilization rate are placed at the end of the secondary sort.
5. A virtual machine resource monitoring and management device, characterized in that, The device includes: The data acquisition module is used to acquire the upper limit data of the total performance of the host machine and the real-time total performance usage data of all virtual machines running on the host machine. The importance level acquisition module is used to obtain the task schedule of each virtual machine, get the current running tasks of each virtual machine, and obtain the importance level of the current running tasks; The sorting module is used to sort the priority levels of each virtual machine based on the importance level when the ratio of the total occupied data to the upper limit data exceeds the warning threshold, so as to obtain a priority sequence, so that the sorting position of the virtual machine performing the high-importance task is higher than that of the virtual machine performing the low-importance task. The cache control module is used to dynamically compress the performance of virtual machines at the end of the priority sequence and allocate the released performance to the host machine's performance buffer pool so as to prioritize the virtual machines that are executing high-importance tasks. The cache control module includes: The compression object acquisition module is used to acquire the last M virtual machines in the priority sequence as objects to be compressed after excluding the protected virtual machines from the priority sequence. The compression ratio acquisition module is used to acquire the performance compression ratio α for each object to be compressed, wherein the performance ratio α is negatively correlated with the importance level of the task running by the object to be compressed; The configuration update module is used to update the resource configuration of the object to be compressed based on the performance compression ratio α, and inject the released resources into the performance buffer pool. Methods for obtaining protected virtual machines also include: Based on the task schedule of each virtual machine, the estimated remaining completion time of the currently running tasks of each virtual machine is obtained; Get the median remaining completion time for all tasks. ; The estimated remaining completion time is less than The task is set as a protected task, and the virtual machine executing the protected task is set as a protected virtual machine; where λ is a preset threshold multiplier.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the steps of the virtual machine resource monitoring and management method as described in any one of claims 1 to 4.
7. A virtual machine resource monitoring and management system, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the virtual machine resource monitoring and management method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Dynamic adjustment method and device for virtual machine memory, equipment and storage medium
CN117971489A
Information processing apparatus and method for shutting down virtual machines
US20140359356A1