Cloud host hybrid deployment method and device, computer equipment, readable storage medium and program product
By dynamically adjusting virtual machine deployment and resource partitioning, the problem of low utilization caused by resource isolation in traditional cloud host deployment is solved, achieving efficient utilization of physical node resources and improving overall resource utilization.
Patent Information
- Application Number
- CN202511806499.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-01-23
AI Technical Summary
In traditional cloud server deployments, the physical isolation between dedicated and shared cloud servers results in resource utilization rates of less than 40%, which cannot effectively improve the overall resource utilization of the data center.
By obtaining the total resources of each physical node and the resource specifications of the cloud host, an initial combination scheme is determined, and the deployment of virtual machines is dynamically adjusted based on the overall allocation rate. Physical node resources are dynamically divided into exclusive areas, shared areas, and hybrid areas to eliminate the physical isolation of virtual machines and realize dynamic partitioning of resources.
It improved the resource utilization rate of physical nodes, reduced the resource fragmentation rate and idle rate, and increased the overall resource utilization rate by about 15%.
Smart Images

Figure CN121387440A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing resource scheduling technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for hybrid deployment of cloud hosts. Background Technology
[0002] With the development of big data technology, various entities have set up data centers, but the resource utilization rate of these data centers is usually less than 40%. In order to improve the overall resource utilization rate of cloud computing clusters, cloud data center personnel have begun to pay more attention to the hybrid utilization of physical hosts.
[0003] In traditional technologies, data centers are statically pre-defined areas for dedicated (CM) cloud server deployment and areas for shared (S) cloud server deployment.
[0004] However, due to the physical isolation between dedicated (CM) cloud servers and shared (S) cloud servers, resource utilization is low (global utilization is less than 40%). Summary of the Invention
[0005] Therefore, it is necessary to provide a cloud host hybrid deployment method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the utilization rate of physical node resources to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for hybrid deployment of cloud servers, the method comprising:
[0007] Obtain the total resources of each physical node and the resource specifications of the cloud host; wherein, the total resources include physical CPU cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU core; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core;
[0008] Based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine, an initial combination scheme for each physical node is determined; wherein, the initial combination scheme includes the number of the first virtual machines and the number of the second virtual machines deployed in the physical node;
[0009] For each initial combination scheme of the physical node, calculate the comprehensive allocation rate corresponding to the initial combination scheme, and determine the target combination scheme of each physical node based on the comprehensive allocation rate.
[0010] According to the target combination scheme, the first virtual machine and the second virtual machine are deployed on the corresponding physical nodes.
[0011] In one embodiment, determining the target combination scheme for each physical node based on the comprehensive allocation rate includes:
[0012] The initial combination scheme corresponding to the maximum overall allocation rate is taken as the candidate combination scheme;
[0013] The candidate combination schemes are assigned and verified. If the assignment verification passes, the candidate combination scheme is adopted as the target combination scheme.
[0014] In one embodiment, the physical node includes at least one non-uniform memory access node; the allocation verification of the candidate combination scheme includes:
[0015] Based on each cloud host in the candidate combination scheme, determine the non-uniform memory access type of the cloud host; wherein, the non-uniform memory access type includes a single non-uniform memory access type and a double non-uniform memory access type;
[0016] For a cloud host with a single non-uniform memory access type, determine whether the cloud host's resources are less than or equal to a first resource threshold; if the cloud host's resources are less than or equal to the first resource threshold, it indicates that the allocation verification has passed; wherein, the first resource threshold is determined based on the resources of one of the non-uniform memory access nodes in the physical nodes to be deployed on the cloud host.
[0017] For cloud hosts with two non-uniform memory access types, it is determined whether the resources of the cloud host are greater than or equal to a second resource threshold; if the resources of the cloud host are greater than or equal to the second resource threshold, it indicates that the allocation verification has passed; wherein, the second resource threshold is determined based on the resources of the two non-uniform memory access nodes in the physical nodes to be deployed on the cloud host.
[0018] In one embodiment, the method further includes:
[0019] Get a new cloud server;
[0020] For each physical node, the utilization rate of the first region corresponding to each physical node is determined based on the number of the first virtual machines in the target combination scheme and the total resources of the corresponding physical node.
[0021] Based on the weight model and the utilization rate of each of the first regions, the weight values are determined.
[0022] Based on the weight value, the first target physical node for deploying the newly added cloud host is determined, and the newly added cloud host is deployed on the first target physical node.
[0023] In one embodiment, the newly added cloud host includes adding a first virtual machine and adding a second virtual machine; the method further includes:
[0024] If the number of cores in the first idle physical CPU core set of the newly added first virtual machine deployed in the second target physical node is greater than the first core number threshold, add at least one second idle physical CPU core to the first idle physical CPU core set; bind the newly added first virtual machine to at least one second idle physical CPU core.
[0025] If the number of cores in the second idle physical CPU core set of the second virtual machine already deployed in the second target physical node is greater than the second core number threshold, at least one first idle physical CPU core is added to the second idle physical CPU core set; the newly added second virtual machine is bound to at least one first idle physical CPU core.
[0026] In one embodiment, the method further includes:
[0027] Obtain the performance metrics of each physical node, and determine the interference score of each physical node based on the performance metrics;
[0028] If the interference score is greater than the score threshold, the resource quota of the physical node will be reduced proportionally.
[0029] When the resource quota with proportional decay is less than or equal to the quota threshold, the third target physical node is migrated to the fourth target physical node; wherein, the third target physical node is a physical node with an interference score greater than the score threshold, and the fourth target physical node is a node other than the third target physical node.
[0030] Secondly, this application also provides a cloud server hybrid deployment device, the device comprising:
[0031] The acquisition module is used to acquire the total resources of each physical node and the resource specifications of the cloud host; wherein, the total resources include physical CPU cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU core; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core.
[0032] The first determining module is configured to determine initial combination schemes for each physical node based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine; wherein the initial combination schemes include the number of the first virtual machines and the number of the second virtual machines deployed in the physical node;
[0033] The second determining module is used to calculate the comprehensive allocation rate corresponding to each initial combination scheme for each physical node, and to determine the target combination scheme for each physical node based on each comprehensive allocation rate.
[0034] The deployment module is used to deploy the first virtual machine and the second virtual machine on the corresponding physical nodes according to the target combination scheme.
[0035] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0037] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0038] The aforementioned cloud host hybrid deployment method, apparatus, computer equipment, computer-readable storage medium, and computer program product first obtain the total resources of each physical node and the resource specifications of the cloud host; wherein the total resources include physical central processing unit (CPU) cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU core; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core; secondly, based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine, determine each initial combination scheme for each physical node; wherein the initial combination scheme includes the number of first virtual machines and the number of second virtual machines deployed in the physical node; thirdly, for each initial combination scheme of each physical node, calculate the comprehensive allocation rate corresponding to the initial combination scheme, and based on each comprehensive allocation rate, determine the target combination scheme for each physical node; finally, according to the target combination scheme, deploy the first virtual machine and the second virtual machine on the corresponding physical node. The physical node resources are dynamically divided into exclusive areas, shared areas, and hybrid areas, without fixing the proportion of each area. A dynamic partitioning mechanism eliminates the physical isolation between the first virtual machine and the second virtual machine, overcoming high resource fragmentation and high resource idle rates, thereby improving the utilization rate of physical node resources. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart illustrating a cloud server hybrid deployment method in one embodiment;
[0041] Figure 2 This is a flowchart illustrating the allocation and verification process for candidate combination schemes in one embodiment.
[0042] Figure 3 This is a schematic diagram of the process of adding a new cloud host in one embodiment;
[0043] Figure 4 This is a flowchart illustrating the interference detection and suppression process in one embodiment;
[0044] Figure 5 This is a schematic diagram of the allocation rate of cloud hosts of different generations before and after the hybridization in one embodiment.
[0045] Figure 6 This is a schematic diagram illustrating the tail latency fluctuation of shared cloud hosts before and after the hybridization process in one embodiment.
[0046] Figure 7 This is a structural block diagram of a cloud host hybrid deployment device in one embodiment;
[0047] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] In one embodiment, such as Figure 1 As shown, a hybrid deployment method for cloud servers is provided. This embodiment illustrates the method applied to a terminal, but it is understood that the method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S102 to S108. Wherein:
[0050] Step S102: Obtain the total resources of each physical node and the resource specifications of the cloud host.
[0051] The total resources include physical CPU cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPUs of the first virtual machine correspond one-to-one with the physical CPU cores, i.e., it is an exclusive virtual machine; the virtual CPUs of the second virtual machine correspond to at least one physical CPU core, i.e., it is a shared virtual machine. For example, the resource specifications of the first virtual machine are 4 virtual CPUs (vCPUs), 8GB of memory, and the vCPUs are bound to the physical CPU cores in a 1:1 ratio. The resource specifications of the second virtual machine are 4 virtual CPUs (vCPUs), 4GB of memory, and the vCPUs are bound to the physical CPU cores in a 1:3 ratio.
[0052] Optionally, the terminal obtains the total resources of each physical node, including physical central processing unit cores (C) and memory (M), as well as a list of cloud host resource specifications, which includes the resource specifications of each cloud host.
[0053] Furthermore, the terminal obtains the total resources of the physical nodes (C=64, M=128), and the cloud host resource specification list includes 8 first virtual machines and 15 second virtual machines.
[0054] Step S104: Based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine, determine the initial combination schemes for each physical node.
[0055] The initial combination scheme includes the number of the first virtual machine and the number of the second virtual machine deployed on the physical node.
[0056] Optionally, the terminal counts the proportion of cloud hosts with different resource specifications in the total resources of each physical node, enumerates all possible initial combination schemes of the first virtual machine and the second virtual machine, and the initial combination scheme satisfies the following condition: the total CPU and memory requirements of all cloud hosts in the initial combination scheme are ≤ physical node resources (considering over-provisioning rules).
[0057] Step S106: For each initial combination scheme of each physical node, calculate the comprehensive allocation rate corresponding to the initial combination scheme, and determine the target combination scheme of each physical node based on each comprehensive allocation rate.
[0058] Optionally, for each initial combination scheme of a physical node, the terminal determines the overall allocation rate corresponding to the initial combination scheme based on the CPU allocation rate and memory allocation rate in the initial combination scheme. Specifically, it obtains the CPU of each cloud host, calculates the total number of CPUs, and determines the CPU allocation rate based on the ratio of the total number of CPUs of the cloud host to the physical central processing unit cores (C) of the physical node; the memory allocation rate is calculated similarly. The terminal obtains the weight corresponding to the CPU allocation rate, for example, 0.5, then the weight corresponding to the memory allocation rate is 0.5, and the sum of the two weights is 1. Assuming 10 first virtual machines and 12 second virtual machines, the CPU usage is: 10×4 (CM) + 12×(4 / 3)(S) = 40 + 16 = 56 cores; CPU allocation rate = 56 / 64 = 87.5%; Memory usage is: 10×8 + 12×4 = 80 + 48 = 128GB; Memory allocation rate = 128 / 128 = 100%; Overall allocation rate = 0.5×87.5% + 0.5×100% = 93.75%.
[0059] Furthermore, the terminal calculates the overall allocation rate corresponding to the initial combination schemes within the same physical node, and selects the initial combination scheme with the highest overall allocation rate as the target combination scheme for the physical node. This also includes the number of the first virtual machine and the number of the second virtual machine deployed within the physical node.
[0060] Step S108: Deploy the first virtual machine and the second virtual machine on the corresponding physical nodes according to the target combination scheme.
[0061] Optionally, the terminal is deployed on the physical nodes corresponding to the target combination scheme, according to the number of the first virtual machines and the number of the second virtual machines in the target combination scheme. The deployment status of the physical nodes is: 10 first virtual machines and 12 second virtual machines, indicating that the logical first region (exclusive region) should be 40 cores + 80GB memory, and the second region (shared region) should be 16 cores + 48GB memory. When the number of first virtual machines and second virtual machines deployed on the node is different, the division of the first region and the second region will change dynamically.
[0062] In the aforementioned hybrid cloud server deployment method, firstly, the total resources of each physical node and the resource specifications of the cloud server are obtained. The total resources include physical CPU cores and memory. The cloud server includes a first virtual machine and a second virtual machine. The virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU cores; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core. Secondly, based on the total resources of each physical node and the resource specifications of the first and second virtual machines, initial combination schemes for each physical node are determined. These initial combination schemes include the number of first and second virtual machines deployed on the physical node. Thirdly, for each initial combination scheme of each physical node, the overall allocation rate corresponding to the initial combination scheme is calculated, and based on each overall allocation rate, the target combination scheme for each physical node is determined. Finally, according to the target combination scheme, the first and second virtual machines are deployed on the corresponding physical nodes. The physical node resources are dynamically divided into exclusive, shared, and hybrid zones, without fixing the proportion of each zone. A dynamic partitioning mechanism eliminates the physical isolation between the first and second virtual machines, overcoming high resource fragmentation and high resource idle rates, thereby improving the utilization rate of physical node resources.
[0063] In an exemplary embodiment, the target combination scheme for each physical node is determined based on each comprehensive allocation rate, including: taking the initial combination scheme corresponding to the maximum comprehensive allocation rate as a candidate combination scheme; performing allocation verification on the candidate combination scheme, and taking the candidate combination scheme as the target combination scheme if the allocation verification passes.
[0064] The total resources of the physical nodes are (C=64, M=128), where C=64 represents 64 physical cores. For example, there are two Non-Uniform Memory Access (NUMA) nodes (each NUMA has 32 cores). Non-Uniform Memory Access (NUMA) is a memory architecture design for multiprocessor systems designed to address the scalability bottleneck of traditional symmetric multiprocessor (SMP) systems.
[0065] In practical applications, in servers with multiple CPU sockets (NUMA nodes), each CPU has its own directly accessed "local memory." Accessing "remote memory" (the memory of another CPU) is much slower than accessing local memory (latency can increase by more than 50%). If a cloud host's vCPU is on one NUMA node, but the memory it uses is on another NUMA node, its performance will degrade significantly. Allocation verification is to ensure that during scheduling, each cloud host's vCPU and its allocated memory are located on the same NUMA node as much as possible, i.e., adhering to NUMA affinity.
[0066] Optionally, the terminal selects the initial combination scheme corresponding to the maximum overall allocation rate as a candidate combination scheme; and performs allocation verification on the candidate combination scheme. If the allocation verification passes, the candidate combination scheme is selected as the target combination scheme. If the allocation verification fails, a new candidate combination scheme is determined, and the candidate combination scheme is verified again.
[0067] In this embodiment, cross-node access latency is reduced and instance response stability is improved by allocating verification, i.e., NUMA affinity guarantee.
[0068] In one exemplary embodiment, such as Figure 2 As shown, the physical node includes at least one non-uniform memory access node; the allocation verification of candidate combination schemes includes the following steps S202 to S206. Wherein:
[0069] Step S202: Determine the non-uniform memory access type of each cloud host in the candidate combination scheme.
[0070] Non-uniform memory access types include single non-uniform memory access type and double non-uniform memory access type.
[0071] Optionally, assume that physical node N1 has two NUMA nodes, NUMA 0 and NUMA 1, each with 32 physical CPU cores and 64GB of memory. Cloud hosts are mainly divided into two categories: single non-uniform memory access type (i.e., single NUMA node cloud host) and dual non-uniform memory access type (i.e., dual NUMA node cloud host). The corresponding verification rules are also different. The terminal determines the type of cloud host.
[0072] Step S204: For a cloud host with a single non-uniform memory access type, determine whether the cloud host's resources are less than or equal to the first resource threshold; if the cloud host's resources are less than or equal to the first resource threshold, it indicates that the allocation verification has passed.
[0073] The first resource threshold is determined based on the resources of a non-uniform memory access node among the physical nodes to be deployed on the cloud host. For example, half the resources of a non-uniform memory access node would be the first resource threshold.
[0074] Optionally, the objective is to verify that all CPU and memory resources required by a single non-uniform memory access type cloud host are fully contained within the same NUMA node. For example, for a single non-uniform memory access type cloud host, the terminal checks the cloud host's resources, such as the number of CPU cores being less than or equal to the remaining number of CPU cores in either NUMA 0 or NUMA 1; checks the cloud host's resources, such as memory being less than or equal to the remaining memory in either NUMA 0 or NUMA 1; further, the terminal continues to check that the single NUMA cloud host's resources do not exceed half of the target NUMA node's resources, and checks the cloud host's resources, such as the number of CPU cores being less than or equal to half of the remaining number of CPU cores in either NUMA 0 or NUMA 1; checks the cloud host's resources, such as memory being less than or equal to half of the remaining memory in either NUMA 0 or NUMA 1. Choosing half of the resources as the threshold is to prevent large instances from monopolizing a single node, leading to resource fragmentation. If the cloud host's resources, such as the number of CPU cores (4) ≤ 32 / 2 = 16; memory (8G) ≤ 64 / 2 = 32G, then the verification is successful. If neither NUMA nodes, such as NUMA 0 and NUMA 1, can be satisfied, then this cloud host combination cannot be deployed on this node, the combination is marked as invalid, and the algorithm needs to fall back to select the suboptimal combination.
[0075] Step S206: For cloud hosts with dual non-uniform memory access types, determine whether the cloud host's resources are greater than or equal to the second resource threshold; if the cloud host's resources are greater than or equal to the second resource threshold, it indicates that the allocation verification has passed.
[0076] The second resource threshold is determined based on the resources of two non-uniform memory access nodes among the physical nodes to be deployed on the cloud host.
[0077] The purpose of dual NUMA verification is to ensure that the CPU and memory resources of the cloud host are distributed nearly evenly across the two NUMA nodes. The terminal determines that the cloud host is of dual NUMA type and evenly distributes the number of vCPU cores across the two NUMA nodes. For example, 32 vCPUs -> 16 cores allocated to NUMA 0 and 16 cores allocated to NUMA 1. Memory is also allocated proportionally. For example, 64GB of memory -> 32GB allocated to NUMA 0 and 32GB allocated to NUMA 1. The terminal checks whether the cloud host's resources exceed the resources of each NUMA node, and also exceed the resources of both NUMA nodes. For example, it checks whether the remaining CPU cores in NUMA 0 are ≥16; whether the remaining CPU cores in NUMA 1 are ≥16; whether the remaining memory in NUMA 0 is ≥32GB; and whether the remaining memory in NUMA 1 is ≥32GB. If all conditions are met, the verification passes.
[0078] In this embodiment, NUMA-level allocation verification is used to ensure that the combination of candidate algorithm schemes is real and feasible.
[0079] In one exemplary embodiment, a new cloud host is added, such as Figure 3 As shown, steps S302 to S308 are included. Wherein:
[0080] Step S302: Obtain the newly added cloud host.
[0081] Optionally, the terminal obtains the newly added cloud host A.
[0082] Step S304: For each physical node, determine the utilization rate of the first region corresponding to each physical node based on the number of the first virtual machines in the target combination scheme and the total resources of the corresponding physical nodes.
[0083] Optionally, for each physical node, the terminal determines the utilization rate of the first region corresponding to each physical node based on the number of the first virtual machines in the target combination scheme and the total resources of the corresponding physical node. For example, physical node N1: currently 0 CM type, 0 S type → CM utilization rate = 0%; physical node N2: already 6 CM type (24 cores) → CM utilization rate = 37.5%; physical node N3: already 12 CM type (48 cores) → CM utilization rate = 75%.
[0084] Step S306: Determine each weight value based on the weight model and the usage rate of each first region.
[0085] Optionally, the terminal obtains a target threshold, for example, set to 75%, before calculating the weight value. The terminal determines the weight value of each physical node based on the target threshold and the utilization rate of each first region using a Gaussian weight model formula, as shown in formula (1).
[0086] weight = exp(-(x - x0)² / (2σ²)) Formula (1)
[0087] In the formula, x represents the resource utilization rate of the physical node; x0 represents the target threshold (e.g., exclusive zone utilization rate ≤ 75%); σ represents the standard deviation (the penalty is reduced by 20 times when the threshold is exceeded).
[0088] The terminal uses the Gaussian weighting model formula and the utilization rate of each first region to calculate the weight values of the three physical nodes:
[0089] The weight of physical node N1 is calculated as: exp(-(0-0.75)² / (2×0.1²)) ≈ 0.000.
[0090] The weight of physical node N2 is calculated as: exp(-(0.375-0.75)² / (2×0.1²)) ≈ 0.325.
[0091] The weight value of physical node N3 is calculated as follows: exp(-(0.75-0.75)² / (2×0.1²)) = 1.0.
[0092] Step S308: Determine the first target physical node for the deployment of the new cloud host based on the weight value, and deploy the new cloud host on the first target physical node.
[0093] Optionally, the terminal selects the physical node with the highest weight value, such as N3, as the first target physical node for deploying the new cloud host, based on the weight values. The new cloud host A is then deployed on the first target physical node 3.
[0094] In this embodiment, by comparing the weight values, the strategy of "selecting the node closest to the target threshold" is executed precisely, which can improve the resource utilization of physical nodes.
[0095] In an exemplary embodiment, adding a new cloud host includes adding a first virtual machine and adding a second virtual machine; the method further includes: obtaining the new first virtual machine, and if the number of cores in the first idle physical CPU core set of the first virtual machine already deployed in the second target physical node is greater than a first core number threshold, adding at least one second idle physical CPU core to the first idle physical CPU core set; binding the new first virtual machine to at least one second idle physical CPU core; obtaining the new second virtual machine, and if the number of cores in the second idle physical CPU core set of the second virtual machine already deployed in the second target physical node is greater than a second core number threshold, adding at least one first idle physical CPU core to the second idle physical CPU core set; binding the new second virtual machine to at least one first idle physical CPU core.
[0096] The second target physics section can be the same as or different from the first target physics section.
[0097] Assume the first virtual machine has 0-39 physical CPU cores; the second virtual machine has 40-63 physical CPU cores. The terminal allocates resources to cloud host A, selecting four idle physical cores (e.g., cores 8-11) from the first virtual machine's physical CPU cores; it then performs vCPU binding: binding the four vCPUs of cloud host A to cores 8, 9, 10, and 11 respectively, and allocating 8GB of memory from the first region where the first virtual machine resides, ensuring NUMA affinity (all on the same NUMA node).
[0098] Optionally, the terminal acquires the 11th virtual machine to be deployed, but the physical CPU cores of the first virtual machine are 0-39 (10 CM-type machines already occupy 40 cores). That is, if the number of cores in the first idle physical CPU core set of the first virtual machines already deployed in the second target physical node is greater than the first core count threshold, the terminal adds at least one second idle physical CPU core to the first idle physical CPU core set; it reclaims 4 cores (e.g., cores 40-43) from the physical CPU cores 40-63 of the second virtual machine, moving cores 40-43 from the physical CPU cores of the second virtual machine to the physical CPU cores of the first virtual machine. At least one second idle physical CPU core is added to the first idle physical CPU core set; the newly added first virtual machine is bound to at least one second idle physical CPU core. The vCPUs of the second virtual machine originally bound to cores 40-43 are rebound to the remaining cores (44-63) of the second virtual machine, allowing the newly added first virtual machine to be bound to the newly reclaimed cores 40-43. During this process, cloud host A is unaffected, as it continues to run on its dedicated cores 8-11.
[0099] The same applies when a new second virtual machine is received. The terminal receives the new second virtual machine. If the number of cores in the second idle physical CPU core set of the second virtual machine already deployed on the second target physical node is greater than the second core count threshold, at least one first idle physical CPU core is added to the second idle physical CPU core set; the new second virtual machine is then bound to at least one first idle physical CPU core.
[0100] In this embodiment, by dynamically expanding the physical CPU cores corresponding to the cloud hosts, all physical CPU cores can move on demand between the first region where the first virtual machine is located and the second region where the second virtual machine is located, significantly reducing resource fragmentation and idleness. Minimizing changes during expansion ensures the performance and stable tail latency of other cloud hosts.
[0101] In one exemplary embodiment, interference detection and suppression, such as Figure 4 As shown, steps S402 to S406. Wherein:
[0102] Step S402: Obtain the performance indicators of each physical node, and determine the interference score of each physical node based on the performance indicators.
[0103] Optionally, the terminal acquires performance metrics for the cloud hosts deployed on each physical node. These metrics include the Memory Access Response Index (CPI), LLC hit rate, and I / O latency. For example, the terminal acquires data for cloud host A deployed on a physical node, with CPI=1, LLC hit rate=85%, and I / O latency=20ms. The interference score for 20ms is calculated as 0.4×1.0 + 0.3×(1-0.85) + 0.3×0.02 = 0.469 (e.g., healthy), indicating that cloud host A has been running normally for several weeks with stable performance metrics. CPI is the number of instruction cycles collected in real-time using the perf tool; LLC hit rate is the Last-Level Cache hit rate monitored using the pqos tool; and I / O latency is the block device latency collected using blktrace.
[0104] Optionally, cloud host B is deployed on this physical node, preempting the resources of cloud host A. This causes the CPI of the terminal acquiring cloud host A to increase to 1.8, the LLC hit rate to decrease to 50%, and the IO latency to increase to 80ms. The interference score is then calculated as follows: Score = 0.4 × 1.8 + 0.3 × (1 - 0.5) + 0.3 × 0.08 = 0.72 + 0.15 + 0.024 = 0.894.
[0105] Step S404: If the interference score is greater than the score threshold, the resource quota of the physical node is reduced proportionally.
[0106] The scoring threshold is 0.7.
[0107] Optionally, if the interference score of 0.7 < 0.894 is greater than the score threshold, the resource quota of the physical node is reduced proportionally. For example, if the terminal identifies the interference source cloud host B, the CPU quota of cloud host B is reduced from 100% to 70%, 49% → 34% → 24% → 17% → 12% → 10% (terminated), thereby limiting the resource use of cloud host B, reducing the pressure of resource preemption, until the performance of cloud host A is restored.
[0108] Step S406: When the resource quota with proportional decay is less than or equal to the quota threshold, the third target physical node is migrated to the fourth target physical node.
[0109] The third target physical node is a physical node whose interference score exceeds the scoring threshold, and the fourth target physical node is any node other than the third target physical node. The third and fourth target physical nodes are not the same; the third target physical node may be the same as or different from the first and second target physical nodes, and the fourth target physical node may be the same as or different from the first and second target physical nodes.
[0110] Optionally, when the resource quota of cloud host B is less than or equal to the quota threshold, such as 10%, the third target physical node where cloud host B is located will be migrated to a new physical node, namely the fourth target physical node. During the migration process, cloud host A will be unaware and the operation of cloud host A will not be affected.
[0111] In this embodiment, when performance interference occurs during actual operation, precise detection, graded response, and automatic recovery ensure that the Service Level Agreement (SLA) of cloud host A is not violated (tail latency fluctuation is reduced).
[0112] A Service Scope Agreement (SLA) is a formal contract between a service provider and a customer regarding service quality, performance standards, and scope of responsibility. It aims to clarify the rights and obligations of both parties and ensure service reliability and predictability.
[0113] The cloud server hybrid deployment method described in the above embodiments improves resource utilization by 15%. Figure 5 Before and after the mixed deployment, the tail latency fluctuation of each shared cloud server remained essentially zero, with a tail latency fluctuation of less than 5%. Figure 6 This achieved a dual breakthrough in resource utilization and service quality. "Generation" refers to the identifier of the deployed system.
[0114] It should be understood that although the steps in the flowcharts of the embodiments described above 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 the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides a cloud server hybrid deployment apparatus for implementing the cloud server hybrid deployment method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more cloud server hybrid deployment apparatus embodiments provided below can be found in the limitations of the cloud server hybrid deployment method described above, and will not be repeated here.
[0116] In one exemplary embodiment, such as Figure 7 As shown, a cloud server hybrid deployment device is provided, including: an acquisition module 701, a first determination module 702, a second determination module 703, and a deployment module 704, wherein:
[0117] The acquisition module 701 is used to acquire the total resources of each physical node and the resource specifications of the cloud host; wherein, the total resources include physical central processing unit cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual central processing unit of the first virtual machine corresponds one-to-one with the physical central processing unit core; the virtual central processing unit of the second virtual machine corresponds to at least one physical central processing unit core.
[0118] The first determining module 702 is used to determine each initial combination scheme for each physical node based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine; wherein the initial combination scheme includes the number of the first virtual machine and the number of the second virtual machine deployed in the physical node.
[0119] The second determining module 703 is used to calculate the comprehensive allocation rate corresponding to each initial combination scheme for each physical node, and to determine the target combination scheme for each physical node based on each comprehensive allocation rate.
[0120] Deployment module 704 is used to deploy the first virtual machine and the second virtual machine on the corresponding physical nodes according to the target combination scheme.
[0121] In an exemplary embodiment, the second determining module 703 is further configured to take the initial combination scheme corresponding to the maximum comprehensive allocation rate as a candidate combination scheme; perform allocation verification on the candidate combination scheme, and if the allocation verification passes, take the candidate combination scheme as the target combination scheme.
[0122] In an exemplary embodiment, the second determining module 703 is further configured to determine the non-uniform memory access type of a cloud host based on each cloud host in the candidate combination scheme; wherein, the non-uniform memory access type includes a single non-uniform memory access type and a double non-uniform memory access type; for a cloud host with a single non-uniform memory access type, determine whether the cloud host's resources are less than or equal to a first resource threshold; if the cloud host's resources are less than or equal to the first resource threshold, it indicates that the allocation verification has passed; wherein, the first resource threshold is determined based on the resources of one non-uniform memory access node in the physical nodes to be deployed on the cloud host; for a cloud host with a double non-uniform memory access type, determine whether the cloud host's resources are greater than or equal to a second resource threshold; if the cloud host's resources are greater than or equal to the second resource threshold, it indicates that the allocation verification has passed; wherein, the second resource threshold is determined based on the resources of two non-uniform memory access nodes in the physical nodes to be deployed on the cloud host.
[0123] In an exemplary embodiment, a cloud host hybrid deployment apparatus includes a new deployment module for acquiring new cloud hosts; for each physical node, determining the utilization rate of a first region corresponding to each physical node based on the number of first virtual machines in the target combination scheme and the total resources of the corresponding physical node; determining each weight value based on a weight model and the utilization rate of each first region; determining the first target physical node for deploying the new cloud host based on the weight value, and deploying the new cloud host on the first target physical node.
[0124] In an exemplary embodiment, adding a new cloud host includes adding a first virtual machine and adding a second virtual machine; the new deployment module is further configured to: acquire the newly added first virtual machine, and if the number of cores in the first idle physical CPU core set of the first virtual machine already deployed in the second target physical node is greater than a first core number threshold, add at least one second idle physical CPU core to the first idle physical CPU core set; bind the newly added first virtual machine to at least one second idle physical CPU core; acquire the newly added second virtual machine, and if the number of cores in the second idle physical CPU core set of the second virtual machine already deployed in the second target physical node is greater than a second core number threshold, add at least one first idle physical CPU core to the second idle physical CPU core set; bind the newly added second virtual machine to at least one first idle physical CPU core.
[0125] In an exemplary embodiment, a cloud host hybrid deployment device further includes an interference suppression module, used to acquire the performance indicators of each physical node and determine the interference score of each physical node based on the performance indicators; if the interference score is greater than a score threshold, trigger a proportional decay of the resource quota of the physical node; if the proportionally decayed resource quota is less than or equal to the quota threshold, migrate the third target physical node to the fourth target physical node; wherein, the third target physical node is the physical node with an interference score greater than the score threshold, and the fourth target physical node is a node other than the third target physical node.
[0126] The modules in the aforementioned cloud server hybrid deployment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0127] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores cloud server deployment data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a cloud server hybrid deployment method.
[0128] Those skilled in the art will understand that Figure 8 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.
[0129] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0132] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer 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, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0133] 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 application.
[0134] 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 application should be determined by the appended claims.
Claims
1. A method for hybrid deployment of cloud servers, characterized in that, The method includes: Obtain the total resources of each physical node and the resource specifications of the cloud host; wherein, the total resources include physical CPU cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU core; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core; Based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine, an initial combination scheme for each physical node is determined; wherein, the initial combination scheme includes the number of the first virtual machines and the number of the second virtual machines deployed in the physical node; For each initial combination scheme of the physical node, calculate the comprehensive allocation rate corresponding to the initial combination scheme, and determine the target combination scheme of each physical node based on the comprehensive allocation rate. According to the target combination scheme, the first virtual machine and the second virtual machine are deployed on the corresponding physical nodes.
2. The method according to claim 1, characterized in that, The determination of the target combination scheme for each physical node based on the comprehensive allocation rate includes: The initial combination scheme corresponding to the maximum overall allocation rate is taken as the candidate combination scheme; The candidate combination schemes are assigned and verified. If the assignment verification passes, the candidate combination scheme is adopted as the target combination scheme.
3. The method according to claim 2, characterized in that, The physical nodes include at least one non-uniform memory access node; the allocation verification of the candidate combination schemes includes: Based on each cloud host in the candidate combination scheme, determine the non-uniform memory access type of the cloud host; wherein, the non-uniform memory access type includes a single non-uniform memory access type and a double non-uniform memory access type; For a cloud host with a single non-uniform memory access type, determine whether the cloud host's resources are less than or equal to a first resource threshold; if the cloud host's resources are less than or equal to the first resource threshold, it indicates that the allocation verification has passed; wherein, the first resource threshold is determined based on the resources of one of the non-uniform memory access nodes in the physical nodes to be deployed on the cloud host. For cloud hosts with two non-uniform memory access types, it is determined whether the resources of the cloud host are greater than or equal to a second resource threshold; if the resources of the cloud host are greater than or equal to the second resource threshold, it indicates that the allocation verification has passed; wherein, the second resource threshold is determined based on the resources of the two non-uniform memory access nodes in the physical nodes to be deployed on the cloud host.
4. The method according to claim 1, characterized in that, The method further includes: Get a new cloud server; For each physical node, the utilization rate of the first region corresponding to each physical node is determined based on the number of the first virtual machines in the target combination scheme and the total resources of the corresponding physical node. Based on the weight model and the utilization rate of each of the first regions, the weight values are determined. Based on the weight value, the first target physical node for deploying the newly added cloud host is determined, and the newly added cloud host is deployed on the first target physical node.
5. The method according to claim 4, characterized in that, The newly added cloud host includes a newly added first virtual machine and a newly added second virtual machine; the method further includes: If the number of cores in the first idle physical CPU core set of the newly added first virtual machine deployed in the second target physical node is greater than the first core number threshold, add at least one second idle physical CPU core to the first idle physical CPU core set; bind the newly added first virtual machine to at least one second idle physical CPU core. If the number of cores in the second idle physical CPU core set of the second virtual machine already deployed in the second target physical node is greater than the second core number threshold, at least one first idle physical CPU core is added to the second idle physical CPU core set; the newly added second virtual machine is bound to at least one first idle physical CPU core.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the performance metrics of each physical node, and determine the interference score of each physical node based on the performance metrics; If the interference score is greater than the score threshold, the resource quota of the physical node will be reduced proportionally. When the resource quota with proportional decay is less than or equal to the quota threshold, the third target physical node is migrated to the fourth target physical node; wherein, the third target physical node is a physical node with an interference score greater than the score threshold, and the fourth target physical node is a node other than the third target physical node.
7. A cloud server hybrid deployment device, characterized in that, The device includes: The acquisition module is used to acquire the total resources of each physical node and the resource specifications of the cloud host; wherein, the total resources include physical CPU cores and memory; the cloud host includes a first virtual machine and a second virtual machine; the virtual CPU of the first virtual machine corresponds one-to-one with the physical CPU core; the virtual CPU of the second virtual machine corresponds to at least one physical CPU core. The first determining module is configured to determine initial combination schemes for each physical node based on the total resources of each physical node, the resource specifications of the first virtual machine, and the resource specifications of the second virtual machine; wherein the initial combination schemes include the number of the first virtual machines and the number of the second virtual machines deployed in the physical node; The second determining module is used to calculate the comprehensive allocation rate corresponding to each initial combination scheme for each physical node, and to determine the target combination scheme for each physical node based on each comprehensive allocation rate. The deployment module is used to deploy the first virtual machine and the second virtual machine on the corresponding physical nodes according to the target combination scheme.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.