A resource allocation method and device

CN115390988BActive Publication Date: 2026-09-04NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210964764.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-09-04
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

[0004]云桌面虚拟机从NUMA节点迁移到其他NUMA节点时,被迁移的云桌面虚拟机需要远程访问迁移前NUMA节点的内存,会导致云桌面虚拟机访问内存的效率降低,因此需要将云桌面虚拟机与被分配的NUMA节点进行绑定,保证云桌面虚拟机可以直接访问内存,使得云桌面虚拟机在所在NUMA节点内进行调度,直接访问所在NUMA节点的本地内存

Benefits of technology

[0008] The beneficial effect of this application is that when each MUNA node of the physical server is bound to a virtual kernel according to its weight level and the number of CPU physical cores of each NUMA node is not less than the total number of bound virtual kernels, the efficiency of cloud desktop virtual machines accessing the memory of the bound NUMA nodes is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390988B_ABST
    Figure CN115390988B_ABST
Patent Text Reader

Abstract

The application provides a resource allocation method and device. The resource allocation method comprises the following steps: setting the number of physical cores of each NUMA node on a physical server to be equal to the maximum value of the bound virtual cores of each NUMA node; reading all cloud desktop virtual machines in a shutdown state when a resource allocation period arrives; dividing all the read cloud desktop virtual machines in the shutdown state into different weight grades; deleting the bound NUMA nodes of all the read cloud desktop virtual machines in the shutdown state; and binding the cloud desktop virtual machines in the shutdown state of each weight grade to the NUMA node currently bound to the minimum number of virtual cores in sequence from high to low according to the weight grades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, and more particularly to virtual desktop architecture technology, specifically a resource allocation method and device. Background Technology

[0002] VDI (Virtual Desktop Infrastructure) abstracts and hosts a large number of virtualized desktop sessions through a centralized backend server. Users connect to virtual desktops through virtual desktop clients to meet their remote work needs, utilizing the computing and storage resources of these servers.

[0003] Physical servers typically have multiple NUMA (Non-Uniform Memory Access) nodes. Each NUMA node has multiple physical CPU cores, and each physical core is configured with a cache. All physical cores of the same NUMA node share a single L3 cache and the NUMA node's local memory.

[0004] When cloud desktop virtual machines (VMs) migrate from one NUMA node to another, the migrated VMs need to remotely access the memory of the original NUMA node, which reduces the efficiency of memory access. Therefore, it's necessary to bind the VMs to their assigned NUMA nodes to ensure direct memory access, allowing them to be scheduled within their respective NUMA nodes and directly access the local memory. However, if frequently running VMs are bound to the same NUMA node, or if each NUMA node has the same number of VMs bound, but the number of physical CPU cores on a particular NUMA node is less than the total number of virtual cores of the bound VMs, this will also affect the efficiency of VMs accessing the memory of their bound NUMA nodes. Summary of the Invention

[0005] The purpose of this application is to provide a resource allocation method and device for dynamically allocating the virtual kernels bound to the NUMA nodes of a physical server.

[0006] To achieve the above objectives, this application provides a resource allocation method, which includes: setting the number of physical cores of each NUMA node on the physical server to be equal to the maximum number of virtual cores bound to each NUMA node; reading all cloud desktop virtual machines in a shutdown state when the resource allocation cycle arrives; dividing all the read cloud desktop virtual machines in a shutdown state into different weight levels; deleting all the bound NUMA nodes of the read cloud desktop virtual machines in a shutdown state; and binding the cloud desktop virtual machines in a shutdown state of each weight level to the NUMA node with the current minimum number of bound virtual cores in descending order of weight level.

[0007] To achieve the above objectives, this application also provides a resource allocation device applied to a cloud desktop management platform. The device includes a processor and a memory. The memory stores processor-executable instructions. The processor executes the processor-executable instructions in the memory to perform the following operations: setting the number of physical cores of each NUMA node on the physical server equal to the maximum number of virtual cores bound to each NUMA node; reading all cloud desktop virtual machines in a shutdown state when the resource allocation cycle arrives; dividing all read shutdown cloud desktop virtual machines into different weight levels; deleting the bound NUMA nodes of all read shutdown cloud desktop virtual machines; and binding each weight level of shutdown cloud desktop virtual machine to a NUMA node with the minimum number of virtual cores currently bound, in descending order of weight level.

[0008] The beneficial effect of this application is that when each MUNA node of the physical server is bound to a virtual kernel according to its weight level and the number of CPU physical cores of each NUMA node is not less than the total number of bound virtual kernels, the efficiency of cloud desktop virtual machines accessing the memory of the bound NUMA nodes is improved. Attached Figure Description

[0009] Figure 1 A flowchart illustrating an embodiment of the resource allocation method provided in this application;

[0010] Figure 2 The process of rebinding cloud desktop virtual machines to NUMA nodes during the resource allocation cycle of the cloud desktop management platform provided in this application;

[0011] Figure 3 This is a schematic diagram of an embodiment of the resource allocation device provided in this application. Detailed Implementation

[0012] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0013] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0014] Figure 1 The resource allocation method embodiments of this application shown include:

[0015] Step 101: Set the number of physical cores for each NUMA node on the physical server to be equal to the maximum number of virtual cores bound to each NUMA node;

[0016] Step 102: When the resource allocation cycle arrives, read all cloud desktop virtual machines in shutdown status;

[0017] Step 103: Divide all the cloud desktop virtual machines in the shutdown state into different weight levels;

[0018] Step 104: Delete the bound NUMA nodes of all cloud desktop virtual machines in the shutdown state.

[0019] Step 105: In descending order of weight level, bind the powered-off cloud desktop virtual machines of each weight level to the NUMA nodes with the minimum number of virtual kernels currently bound.

[0020] Figure 1 The beneficial effect of the embodiment is that when each MUNA node of the physical server is bound to a virtual kernel according to its weight level and the number of CPU physical cores of each NUMA node is not less than the total number of bound virtual kernels, the efficiency of cloud desktop virtual machines accessing the memory of the bound NUMA nodes is improved.

[0021] Figure 2The diagram illustrates the process by which the cloud desktop management platform provided in this application rebinds cloud desktop virtual machines to NUMA nodes during the resource allocation cycle. To prevent the virtual kernels of cloud desktop virtual machines from being over-bound to NUMA nodes, and to avoid a large number of cloud desktop virtual machines' virtual CPUs being bound to NUMA nodes, the cloud desktop management platform can set the upper limit of the number of bindable virtual kernels for each NUMA node on the physical server to equal the number of physical cores. For example, if each NUMA node on the physical server has dual processors that are 16-core, 32-thread CPUs, the upper limit for the number of virtual kernels that each NUMA node can bind to is set to 64 virtual kernels; if each cloud desktop virtual machine has 2 virtual kernels, then each NUMA node can bind 32 cloud desktop virtual machines.

[0022] Step 201: Update the memory usage and usage time of each running cloud desktop virtual machine within the current resource allocation cycle;

[0023] For example, in this application, a resource allocation cycle is 24 hours. The cloud desktop management platform receives management messages from each cloud desktop virtual machine, according to its memory usage reporting cycle (e.g., 45 minutes), via a long connection (e.g., a socket connection), reporting the usage rate of the virtual machine on its respective cloud desktop. The cloud desktop management platform uses the UUID of the cloud desktop virtual machine in the received management message to locate the corresponding cloud desktop virtual machine and updates the memory usage and runtime of the corresponding cloud desktop virtual machine in the received management message for the previous 24 hours.

[0024] Step 202: Notify the agents of running cloud desktop virtual machines that exceed the maximum idle time threshold to shut down, and update the total online time of multiple consecutive resource allocation cycles.

[0025] In this application, each cloud desktop virtual machine is set with a maximum idle time, for example, 1 hour. When the agent of a running cloud desktop virtual machine bound to any NUMA node of the physical server detects that the cloud desktop virtual machine agent has been restricted for 1 hour within the current 24-hour resource allocation cycle, it sends a management message to the cloud desktop management platform to notify that the cloud desktop virtual machine's restricted time has exceeded the maximum idle time threshold of 1 hour.

[0026] When the cloud desktop management platform receives a management message indicating that the virtual machine's idle time has exceeded the maximum, it sends a remote procedure call protocol message, such as a gRPC message, to the agent of the corresponding virtual machine. This notifies the agent to execute the shutdown procedure for the virtual machine. The cloud desktop management platform calculates the online time of the shut-down virtual machines within the current 24 hours and updates the total online time of the shut-down virtual machines over several consecutive resource allocation cycles, such as a week spanning seven consecutive resource allocation cycles.

[0027] Step 203: The current resource allocation cycle has arrived. Read all cloud desktop virtual machines in shutdown status and sort them according to their weight level.

[0028] When the 24-hour mark of the current resource allocation cycle arrives, the cloud desktop management platform reads all cloud desktops in a shutdown state. In this application, the cloud desktop virtual machines in a shutdown state include both the cloud desktop virtual machines shut down due to timeout in step 202 and the cloud desktop virtual machines shut down by the user through the cloud desktop client.

[0029] The different weight levels in this application include at least: the highest designated priority, the high frequency of use priority, and the high resource utilization priority.

[0030] The highest designated priority is when an administrator manually assigns a high-priority cloud desktop virtual machine to a specific user.

[0031] High-frequency usage priority refers to the order in which cloud desktop virtual machines that have exceeded the usage time threshold and memory usage threshold in the previous resource allocation cycle are ranked from highest to lowest according to their usage time in the previous resource allocation cycle, and are assigned a specified number of such machines.

[0032] In this embodiment, after the 24-hour resource allocation cycle in step 203 is reached, the previous 24 hours are considered the previous resource allocation cycle. The cloud desktop management platform filters out cloud desktop virtual machines that have never been set to the highest priority shutdown state. From these, cloud desktop virtual machines with usage time exceeding two hours in the previous 24 hours (the usage time threshold in this embodiment) and memory usage exceeding 80% (the memory usage threshold in this embodiment) are selected, and then 10 cloud desktop virtual machines are selected in descending order of usage time in the previous 24 hours.

[0033] High resource utilization priority refers to the order in which cloud desktop virtual machines that have exceeded the total online time threshold in the previous consecutive resource allocation cycles and whose total online time in the previous consecutive resource allocation cycles is ranked from high to low by a specified number of times.

[0034] In this embodiment, the cloud desktop management platform filters out the 20 cloud desktop virtual machines with the longest total online time from those that are in a shutdown state and have never been set to the highest priority or selected as high-frequency usage priority. This is done within the previous week, i.e., the seven consecutive resource allocation cycles.

[0035] In this application, the number of cloud desktop virtual machines with the highest designated priority, those that can be filtered for high-frequency usage priority, and high resource utilization priority is set according to the environment. The total number can be greater than or less than the upper limit of the number of virtual kernels that can be bound to all NUMA nodes on the physical server. When it exceeds the upper limit, since the cloud desktop management platform can set the upper limit of the number of virtual kernels that can be bound to each NUMA node on the physical server to be equal to the number of physical kernels, no virtual kernels will be bound to the NUMA node after the upper limit is exceeded, thus avoiding the over-limit of virtual kernels bound to the physical kernels of the NUMA node.

[0036] If the number of cloud desktop virtual machines in a shutdown state that can be used for weighted ranking does not meet the set number that can be filtered for high-frequency usage priority, then if there are only 7 shutdown cloud desktop virtual machines with usage time exceeding two hours in the first 24 hours and memory usage exceeding 80%, then these 7 machines will be sorted according to usage time.

[0037] If the number of shutdown cloud desktop virtual machines that are not ranked according to weight does not meet the set number that can be filtered for high-frequency usage priority, for example, if there are only 10 shutdown cloud desktop virtual machines that were not set to the highest specified priority and were not filtered for high-frequency usage priority in the previous week, these 7 machines will be selected based on online data; if there are 30 machines remaining, 20 will be selected in descending order of total online time.

[0038] Step 204: Unbind all cloud desktop virtual machines that are in a shutdown state from the NUMA node.

[0039] The cloud desktop management platform ranks all powered-off cloud desktop virtual machines according to different weight levels and then unbinds the NUMA nodes bound to these powered-off cloud desktop virtual machines within the previous 24 hours. In this way, after these powered-off cloud desktop virtual machines are unbound from the NUMA nodes bound within the previous 24 hours, they are rebound within the current resource allocation cycle. When users open these powered-off cloud desktop virtual machines through the cloud desktop client, the newly bound NUMA node configuration will automatically take effect upon startup.

[0040] Step 205: Select the cloud desktop virtual machine in the shutdown state from the highest specified priority, and select the NUMA node with the smallest number of currently bound virtual kernels.

[0041] In this application, the cloud desktop management platform can select cloud desktop virtual machines in the highest specified priority shutdown state sequentially, or select the priority shutdown state cloud desktop virtual machines according to UUID from largest to smallest or smallest to largest, or other rules.

[0042] Step 206: Determine whether the number of unbound virtual kernels of the selected NUMA node is less than the number of virtual kernels of the selected cloud desktop virtual machine. If yes, proceed to step 207; otherwise, proceed to step 208.

[0043] Step 207: Terminate the binding of the cloud desktop virtual machines to each NUMA node of the physical server in a powered-off state.

[0044] If the number of unbound kernels of the NUMA nodes that have been bound to the minimum virtual kernel on the physical server is less than the number of virtual kernels of the selected cloud desktop virtual machines that are in a shutdown state and waiting to be bound, it means that the virtual kernels of all NUMA nodes on the physical server are insufficient for binding. In this case, the cloud desktop virtual machines that are in a shutdown state for the next 24 hours will be terminated and rebound to NUMA nodes.

[0045] Step 208: Determine whether all cloud desktop virtual machines in the shutdown state among the highest specified priorities have been bound; if yes, proceed to step 209; otherwise, return to step 206.

[0046] If the cloud desktop management platform determines that all cloud desktop virtual machines in the highest priority shutdown state have been rebound, it will select the rebound shutdown cloud desktop virtual machines from the next weight level of high-frequency usage priority.

[0047] Step 209: Select the cloud desktop virtual machine that has been in shutdown state for the longest time from the high frequency of use priority, and select the NUMA node with the smallest number of currently bound virtual kernels.

[0048] In this application, the cloud desktop management platform filters out 10 cloud desktop virtual machines that have been used for more than two hours in the previous 24 hours (the usage time threshold in this embodiment) and have a memory usage rate of more than 80% (the memory usage rate threshold in this embodiment), and sorts them in descending order of usage time in the previous 24 hours. From these, the cloud desktop virtual machine with the longest usage time and the one in the shutdown state is selected.

[0049] Step 210: Determine whether the number of unbound virtual kernels of the selected NUMA node is less than the number of virtual kernels of the selected cloud desktop virtual machine; if yes, proceed to step 207; if no, proceed to step 211.

[0050] Step 211: Determine whether all cloud desktop virtual machines in the shutdown state in the high-frequency usage priority have been bound; if yes, proceed to step 212; if no, return to step 209.

[0051] If the cloud desktop management platform determines that all cloud desktop virtual machines in the shutdown state with high-frequency usage priority have been rebound, it will select the rebound shutdown cloud desktop virtual machines from the next weight level of high resource utilization priority.

[0052] Step 212: Select the cloud desktop virtual machine in the shutdown state with the longest total online time from the high resource utilization priority, and select the NUMA node with the smallest number of currently bound virtual kernels;

[0053] In this application, the cloud desktop management platform selects the cloud desktop virtual machine in the shutdown state with the longest total online time in the former type.

[0054] Step 213: Determine whether the number of unbound virtual kernels of the selected NUMA node is less than the number of virtual kernels of the selected cloud desktop virtual machine; if yes, proceed to step 207; if no, return to step 214.

[0055] Step 214: Determine whether all cloud desktop virtual machines in the shutdown state in the high resource utilization priority have been bound; if yes, proceed to step 207; if no, return to step 212.

[0056] In this application, virtual kernels of a limited number of NUMA nodes on an automatically scheduled physical server can be bound to resources according to the phased usage needs in each resource allocation cycle. This binds high-weight cloud desktop virtual machines to NUMA nodes, improves the memory access efficiency of cloud desktop virtual machines in each resource allocation cycle, and optimizes the user experience of using cloud desktop virtual machines through the cloud desktop client in the current resource allocation cycle.

[0057] Figure 3 This application provides a resource allocation device applied to a cloud desktop management platform. The device 30 includes a processor and a memory. The memory stores processor-executable instructions. The processor executes the processor-executable instructions in the memory to perform the following operations: setting the number of physical cores of each NUMA node on the physical server equal to the maximum number of virtual cores bound to each NUMA node; reading all cloud desktop virtual machines in a shutdown state when the resource allocation cycle arrives; dividing all the read cloud desktop virtual machines in a shutdown state into different weight levels; deleting the bound NUMA nodes of all the read cloud desktop virtual machines in a shutdown state; and binding the cloud desktop virtual machines in a shutdown state to the NUMA nodes with the minimum number of virtual cores currently bound, according to the weight level from high to low.

[0058] The processor executes processor-executable instructions in runtime memory to bind cloud desktop virtual machines in shutdown states, in order of weight level, to NUMA nodes with the minimum number of virtual kernels currently bound. This includes:

[0059] Ensure that the number of virtual kernels bound to all NUMA nodes on the physical server does not exceed the number of physical kernels of all NUMA nodes on the physical server.

[0060] Determine if all currently highest-weighted, powered-off cloud desktop virtual machines are bound to NUMA nodes. If not, select the preferred powered-off cloud desktop virtual machine from the currently highest-weighted, powered-off cloud desktop virtual machines, and then select the NUMA node on the physical server with the smallest number of currently bound virtual kernels. If the number of unbound virtual kernels on the NUMA node with the smallest number of bound virtual kernels is greater than the number of kernels on the currently highest-weighted, prioritized powered-off cloud desktop virtual machine, then proceed with the binding. If the number of unbound virtual kernels on the NUMA node with the smallest number of bound virtual kernels is less than the number of unbound virtual kernels on the currently highest-weighted, prioritized powered-off cloud desktop virtual machine, then terminate the binding.

[0061] The different weight levels include at least: highest specified priority, high frequency usage priority, and high resource utilization priority. Among them, high frequency usage priority refers to the order of cloud desktop virtual machines that have exceeded the usage time threshold and memory usage threshold in the previous resource allocation cycle, and are ranked in descending order of the usage time in the previous resource allocation cycle, according to a specified number of these machines. High resource utilization priority refers to the order of cloud desktop virtual machines that have exceeded the total online time threshold in the previous consecutive resource allocation cycles, and are ranked in descending order of the total online time in the previous consecutive resource allocation cycles, according to a specified number of these machines.

[0062] Before the resource allocation cycle arrives, the processor performs the following operations by running processor-executable instructions in memory: receiving the memory usage of the cloud desktop virtual machine sent by each agent according to the memory usage reporting cycle, and updating the memory usage and usage time of each running cloud desktop virtual machine in the current resource allocation cycle.

[0063] Before the resource allocation cycle arrives, the processor performs the following operations by executing processor-executable instructions in memory: receiving virtual machine idle notifications sent by agents of running cloud desktop virtual machines that have exceeded the maximum idle time threshold in the current resource allocation cycle; notifying agents of running cloud desktop virtual machines that have exceeded the maximum idle time threshold in the current resource allocation cycle to perform shutdown; calculating the online duration of the current resource allocation cycle; and updating the total online time of multiple consecutive previous resource allocation cycles.

[0064] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A resource allocation method, characterized in that, The method includes: Set the number of physical cores for each NUMA node on the physical server to be equal to the maximum number of virtual cores bound to each NUMA node; When the resource allocation cycle arrives, read all cloud desktop virtual machines in shutdown status; All cloud desktop virtual machines in a shutdown state are divided into different weight levels; Delete all bound NUMA nodes of cloud desktop virtual machines that are in a shutdown state; In descending order of weight level, the powered-off cloud desktop virtual machines of each weight level are bound to the NUMA nodes with the minimum number of virtual kernels currently bound.

2. The method according to claim 1, characterized in that, The process involves binding cloud desktop virtual machines in a powered-off state to NUMA nodes with the minimum number of virtual kernels currently bound, in order of their respective weight levels: Select the cloud desktop virtual machine in the shutdown state with priority from the current highest weight level, and select the NUMA node with the smallest number of currently bound virtual kernels on the physical server; If the number of unbound virtual kernels of the NUMA node currently bound to the minimum number of virtual kernels is less than the number of cloud desktop virtual machines in the current highest priority shutdown state, then the binding will be terminated. If the number of unbound virtual kernels on the NUMA node currently bound to the minimum number of virtual kernels is greater than the number of kernels on the cloud desktop virtual machine in the preferred shutdown state, then binding will be performed; Determine whether all cloud desktop virtual machines in the current highest priority shutdown state are bound to NUMA nodes; If not, select the next priority shutdown virtual machine from the current highest weight level; if yes, select the next priority shutdown virtual machine from the next weight level.

3. The method according to claim 1, characterized in that, The different weight levels include at least: highest specified priority, high frequency of use priority, and high resource utilization priority; among which, The high-frequency usage priority refers to the order of cloud desktop virtual machines that exceed the usage time threshold and memory usage threshold in the previous resource allocation cycle, and are ranked from highest to lowest according to the usage time in the previous resource allocation cycle, by a specified number. The high resource utilization priority refers to the order in which cloud desktop virtual machines that have exceeded the total online time threshold in the previous consecutive resource allocation cycles are ranked from high to low according to the total online time in the previous consecutive resource allocation cycles, and a specified number of them are prioritized.

4. The method according to claim 1, characterized in that, The method further includes the following steps before the resource allocation cycle arrives: Receive the memory usage of the cloud desktop virtual machines sent by each agent according to the memory usage reporting cycle, and update the memory usage and usage time of each running cloud desktop virtual machine in the current resource allocation cycle.

5. The method according to claim 1, characterized in that, The method further includes the following steps before the resource allocation cycle arrives: Receive virtual machine idle notifications from the agent of running cloud desktop virtual machines that have exceeded the maximum idle time threshold in the current resource allocation cycle; The system notifies the agent of any running cloud desktop virtual machines that exceed the maximum idle time threshold in the current resource allocation cycle to be shut down, calculates the online time in the current resource allocation cycle, and updates the total online time in multiple consecutive previous resource allocation cycles.

6. A resource allocation device, applied to a cloud desktop management platform, characterized in that, The device includes a processor and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: Set the number of physical cores for each NUMA node on the physical server to be equal to the maximum number of virtual cores bound to each NUMA node; When the resource allocation cycle arrives, read all cloud desktop virtual machines in shutdown status; All cloud desktop virtual machines in a shutdown state are divided into different weight levels. Delete all bound NUMA nodes of cloud desktop virtual machines that are in a shutdown state; In descending order of weight level, the powered-off cloud desktop virtual machines of each weight level are bound to the NUMA nodes with the minimum number of virtual kernels currently bound.

7. The device according to claim 6, characterized in that, The processor executes processor-executable instructions in the memory to bind cloud desktop virtual machines in shutdown states, in order of weight level, to NUMA nodes with the minimum number of virtual kernels currently bound. Select the cloud desktop virtual machine in the shutdown state with priority from the current highest weight level, and select the NUMA node with the smallest number of currently bound virtual kernels on the physical server; If the number of unbound virtual kernels of the NUMA node currently bound to the minimum number of virtual kernels is less than the number of cloud desktop virtual machines in the current highest priority shutdown state, then the binding will be terminated. If the number of unbound virtual kernels on the NUMA node currently bound to the minimum number of virtual kernels is greater than the number of kernels on the cloud desktop virtual machine in the preferred shutdown state, then binding will be performed; Determine whether all cloud desktop virtual machines in the current highest priority shutdown state are bound to NUMA nodes; If not, select the next priority shutdown virtual machine from the current highest weight level; if yes, select the next priority shutdown virtual machine from the next weight level.

8. The device according to claim 6, characterized in that, The different weight levels include at least: highest specified priority, high frequency of use priority, and high resource utilization priority; among which, The high-frequency usage priority refers to the order of cloud desktop virtual machines that exceed the usage time threshold and memory usage threshold in the previous resource allocation cycle, and are ranked from highest to lowest according to the usage time in the previous resource allocation cycle, by a specified number. The high resource utilization priority refers to the order in which cloud desktop virtual machines that have exceeded the total online time threshold in the previous consecutive resource allocation cycles are ranked from high to low according to the total online time in the previous consecutive resource allocation cycles, and a specified number of them are prioritized.

9. The device according to claim 6, characterized in that, The processor also performs the following operations before the resource allocation cycle arrives by executing processor-executable instructions in the memory: Receive the memory usage of the cloud desktop virtual machines sent by each agent according to the memory usage reporting cycle, and update the memory usage and usage time of each running cloud desktop virtual machine in the current resource allocation cycle.

10. The device according to claim 9, characterized in that, The processor also performs the following operations before the resource allocation cycle arrives by executing processor-executable instructions in the memory: Receive virtual machine idle notifications sent by the agent of running cloud desktop virtual machines that exceed the maximum idle time threshold in the current resource allocation cycle; Notify the agents of running cloud desktop virtual machines that exceed the maximum idle time threshold in the current resource allocation cycle to shut down, and calculate the online duration of the current resource allocation cycle; The total online time over multiple consecutive resource allocation cycles prior to the update.

Citation Information

Patent Citations

  • Dynamic scheduling method and device for virtual machine resource

    CN106445690A

  • NUMA node scheduling method and device of virtual machine, equipment and medium

    CN111078363A