Memory bandwidth balancing method, host machine, electronic equipment and storage medium

By using different memory buses for memory access in virtualization technology and scheduling the virtual machine to the corresponding processing units, the problem of memory bandwidth competition among virtual machines is solved, and the allocation reliability of memory bandwidth and the operating performance of virtual machines is improved.

CN120386583APending Publication Date: 2025-07-29HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410122812.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In virtualization technology, the competition between virtual machines leads to poor memory bandwidth allocation reliability, poor virtual machine operation performance and tenant experience.

Method used

By determining the memory bandwidth requirements of the virtual machine for processing units, using different memory buses for memory access, and balancing the virtual machine to the corresponding processing units, so that its memory bandwidth usage matches the requirements, and using weighted computing and resource-oriented technology to adjust the memory bandwidth limit.

Benefits of technology

It improves the allocation reliability of memory bandwidth, improves the operating performance and tenant experience of virtual machines, and realizes balanced allocation of memory bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386583A_ABST
    Figure CN120386583A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a memory bandwidth balancing method, a host machine, electronic equipment and a storage medium. The memory bandwidth balancing method comprises the following steps: determining memory bandwidth requirements of a plurality of virtual machines on at least one processing unit, wherein different processing units perform memory access through different memory buses; and scheduling each virtual machine to the corresponding processing unit in the at least one processing unit in a balanced manner, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit is matched with the memory bandwidth requirement of the virtual machine. According to the scheme of the embodiment of the invention, the distribution reliability of the memory bandwidth is improved, the running performance of the virtual machine is improved, and the experience of virtual machine tenants is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a method for balancing memory bandwidth, a host computer, an electronic device, and a storage medium. Background Art

[0002] In virtualization technology, a host computer, as a physical machine for the running environment of a virtual machine monitor, can run multiple virtual machine instances. The host computer provides infrastructure such as computing resources, storage, and networks to support the running of virtual machines. The host computer is responsible for allocating and managing physical resources and providing an execution environment for virtual machines, including the allocation and scheduling of resources such as CPUs, memory, storage, and networks. The host computer usually has higher computing capabilities and hardware configurations to meet the needs of multiple virtual machine instances.

[0003] When each virtual machine is running, in the case of not exclusively occupying all the memory bandwidth of the entire host computer or not exclusively occupying all the memory bandwidth of a separate memory bus, there will be a situation of memory bandwidth contention between different virtual machines, the allocation reliability of the memory bandwidth is poor, the running performance of the virtual machine is poor, resulting in a poor experience for virtual machine tenants. Summary of the Invention

[0004] In view of this, the embodiments of the present invention provide a method for balancing memory bandwidth, a host computer, an electronic device, and a storage medium to at least partially solve the above problems.

[0005] According to a first aspect of the embodiments of the present invention, there is provided a method for balancing memory bandwidth, including: determining the memory bandwidth requirements of multiple virtual machines for at least one processing unit, where different processing units access memory through different memory buses; and evenly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine.

[0006] In another implementation manner of the present invention, determining the memory bandwidth requirements of multiple virtual machines for at least one processing unit includes: obtaining the historical occupied memory bandwidth of multiple virtual machines in the called processing unit; respectively performing weighted calculations on the historical occupied memory bandwidths of the multiple virtual machines to obtain the scheduling weight information of the multiple virtual machines; and determining the memory bandwidth requirements of the multiple virtual machines for at least one processing unit based on the scheduling weight information of the multiple virtual machines.

[0007] In another implementation of the present invention, determining the memory bandwidth requirements of the multiple virtual machines for at least one processing unit based on the scheduling weight information of each of the multiple virtual machines includes: determining the memory bandwidth ratio matching the scheduling weight information of each virtual machine; and determining the memory bandwidth requirement of the virtual machine based on the memory bandwidth ratio of each virtual machine and the total memory bandwidth of the at least one processing unit.

[0008] In another implementation of the present invention, evenly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit includes: when the host machine on which the multiple virtual machines are deployed is in a first resource state, dynamically scheduling different virtual machines with consistent memory bandwidth requirements to different processing units among the at least one processing unit, where the computing occupancy rate of the first resource state is less than a first preset occupancy rate.

[0009] In another implementation of the present invention, evenly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit further includes: when the host machine is in a second resource state, scheduling at least two virtual machines with consistent memory bandwidth requirements to the same processing unit among the at least one processing unit, where the computing resource occupancy rate of the second resource state is greater than a second preset occupancy rate, and the second preset occupancy rate is greater than the first preset occupancy rate.

[0010] In another implementation of the present invention, the at least two virtual machines include a first virtual machine and a second virtual machine, and the method further includes: determining the change state of the bandwidth occupancy ratio of the memory bus of the same processing unit for the first virtual machine and the second virtual machine; and setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit based on the change state of the bandwidth occupancy ratio.

[0011] In another implementation of the present invention, determining the change state of the bandwidth occupancy ratio of the memory bus of the same processing unit for the first virtual machine and the second virtual machine includes: monitoring a first change state of the occupied memory bandwidth of the first virtual machine and a second change state of the occupied memory bandwidth of the second virtual machine; and setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit based on the change state of the bandwidth occupancy ratio includes: if the first change state and the second change state are consistent, setting the memory bandwidth upper limits of the first virtual machine and the second virtual machine to evenly divide the memory bandwidth resources of the same processing unit.

[0012] In another implementation manner of the present invention, based on the change state of the bandwidth occupancy ratio, setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine on the same processing unit further includes: if the first change state and the second change state are inconsistent, then in the adjacent time period where the peak moment of the first change state is located, set the upper limit of the memory bandwidth of the second virtual machine to be less than half of the memory bandwidth resources of the processing unit.

[0013] According to a second aspect of the embodiments of the present invention, there is provided an application deployment method, including: determining the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of this microservice for the memory bus in the host machine where it is located; based on the memory bandwidth requirements of the multiple microservices, deploying the multiple microservices to multiple host machines such that the total memory bandwidth requirements of the respective microservices deployed in each host machine match the upper limit of the memory bandwidth of this host machine.

[0014] According to a third aspect of the embodiments of the present invention, there is provided a host machine, including: determining the memory bandwidth requirements of multiple virtual machines for at least one processing unit, where different processing units access memory through different memory buses; a scheduling module that evenly schedules each virtual machine to the corresponding processing unit among the at least one processing unit, so that the occupied memory bandwidth of this virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of this virtual machine.

[0015] According to a fourth aspect of the embodiments of the present invention, there is provided an application deployment device, including: determining the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of this microservice for the memory bus in the host machine where it is located; a deployment module that, based on the memory bandwidth requirements of the multiple microservices, deploys the multiple microservices to multiple host machines such that the total memory bandwidth requirements of the respective microservices deployed in each host machine match the upper limit of the memory bandwidth of this host machine.

[0016] According to a fifth aspect of the embodiments of the present invention, there is provided an electronic device, including: a processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations corresponding to the method described in the first aspect or the second aspect.

[0017] According to a sixth aspect of the embodiments of the present invention, there is provided a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method described in the first aspect or the second aspect.

[0018] In the solution of the embodiment of the present invention, since different processing units access memory through different memory buses, the memory bandwidth requirements of multiple virtual machines for at least one processing unit reflect the degree of demand for memory bandwidth contention of the memory buses of at least one processing unit to be scheduled by the multiple virtual machines. Furthermore, when each virtual machine is evenly scheduled to the corresponding processing unit among the at least one processing unit, the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine, enabling the virtual machine with a greater memory bandwidth requirement to be allocated a greater occupied memory bandwidth. Therefore, the allocation reliability of memory bandwidth is improved, the running performance of the virtual machine is enhanced, and the experience of virtual machine tenants is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0020] Figure 1 Schematic block diagram of a host computer in a cloud service system according to some embodiments of the present invention.

[0021] Figure 2 Flowchart of the steps of a memory bandwidth balancing method according to some embodiments of the present invention.

[0022] Figure 3 Flowchart of the steps of a memory bandwidth balancing method according to other embodiments of the present invention.

[0023] Figure 4 For Figure 2 Flowchart of the steps of a specific example of a memory bandwidth balancing method according to an embodiment of

[0024] Figure 5 Structural block diagram of a host computer according to other embodiments of the present invention.

[0025] Figure 6 Flowchart of the steps of an application deployment method according to other embodiments of the present invention.

[0026] Figure 7 Flowchart of the steps of an application deployment device according to other embodiments of the present invention.

[0027] Figure 8 Structural schematic diagram of an electronic device according to other embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0029] The following further illustrates the specific implementation of the embodiments of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention.

[0030] Figure 1 It is a schematic block diagram of a host in a cloud service system for some embodiments of the present invention. The cloud service system includes a control node such as a cloud management system (Cloud Management System, CMS), a configuration node such as a network controller, and a computing node composed of server hosts such as. As Figure 1 shown, the host as a server host can be locally configured with virtual machines #1, #2,..., #N provided for tenants to use. The virtual machines include, but are not limited to, JAVA virtual machines and container objects such as PODs. The host can also be configured with a virtual machine management module such as a hypervisor to manage each virtual machine. A configuration node such as a network controller performs communication between each virtual machine through the virtual machine management module. The control node can manage the virtual machines by creating, destroying, or orchestrating the virtual machines, etc., so as to achieve elastic computing or flexible deployment of applications. Further, in a microservices architecture, an application can be split into microservices as relatively independent application modules, and inter-process communication is used between each microservice.

[0031] Further, when each virtual machine needs the computing resources of the host to execute a program process from the virtual machine, each virtual machine is scheduled by the virtual machine management module into a processing unit such as processing unit #1 or processing unit #2, so that data access between the processing unit and the memory is performed through the corresponding bus to execute the application program in the virtual machine. For example, processing unit #1 accesses data with the memory through memory bus #1, and processing unit #2 accesses data with the memory through memory bus #2. It should be understood that the number of processing units that can independently exchange data with the memory through the bus is exemplary. Without loss of generality, one or more buses can be used to access data with the memory. The number of processing units here can correspond to the number of buses that can independently access the memory. For the X87 processor architecture, the processing unit can be implemented as the computing resources corresponding to the processing unit socket (socket), and the processing unit socket can access data with the memory through an independent bus. Each processing unit forms a processor such as a CPU. Physically, each processing unit can include at least one processing core. Logically, at least one virtual machine processing core can be configured for each virtual machine.

[0032] In addition, in a cloud service system deploying multiple host machines, the virtual machine can also be connected to an external physical network (such as a switch) through the corresponding network card via a port to perform packet forwarding in the physical network. The physical network is connected between each host machine to realize data forwarding between virtual machines in different host machines.

[0033] Specifically, each virtual machine can occupy the computing resources in the local host machine, and sometimes can also occupy the computing resources in a remote host machine. Virtual machine #1, virtual machine #2,..., virtual machine #N can occupy the computing resources of the local host machine. When virtual machine #1 exclusively occupies the computing resources of processing unit #1, virtual machine #2, etc. are scheduled to processing unit #2 or the processing unit of a remote host machine. Since processing unit #1 can independently access data with the memory through memory bus #1, there is no situation of competing for the memory bandwidth of memory bus #1 with other virtual machines such as virtual machine #2.

[0034] However, when virtual machine #1 and virtual machine #2 are scheduled to processing unit #1, the memory bandwidth of memory bus #1 will be occupied by both virtual machine #1 and virtual machine #2. At this time, if the memory bandwidth requirements of both virtual machine #1 and virtual machine #2 are high, there will be a resource scramble for the memory bandwidth of memory bus #1, resulting in poor management reliability of the memory bandwidth, poor running performance of the virtual machine, and poor experience for the virtual machine tenant.

[0035] Figure 2 It is a step flowchart of the memory bandwidth balancing method according to some embodiments of the present invention. Specifically, the memory bandwidth balancing method includes:

[0036] S210: Determine the memory bandwidth requirements of multiple virtual machines for at least one processing unit. Different processing units access memory through different memory buses.

[0037] It should be understood that the memory bandwidth in this text refers to the access rate at which a processor such as a processing unit accesses data of a virtual machine program in memory (e.g., RAM). For example, the number of bits or bytes that memory can transfer per second.

[0038] It should also be understood that in some examples, the memory bandwidth requirements can indicate the relative magnitude of the memory bandwidth requirements of each virtual machine compared to those of other virtual machines. For example, it can be characterized by the ratio between each virtual machine and the total memory bandwidth requirements of all virtual machines, or by the urgency of the memory bandwidth requirements, or by the sensitivity of the memory bandwidth requirements, or by a combination of the above metrics. That is to say, a virtual machine with more urgent memory bandwidth requirements has larger memory bandwidth requirements, and a virtual machine with less urgent memory bandwidth requirements has smaller memory bandwidth requirements. A virtual machine with a higher sensitivity to memory bandwidth requirements has larger memory bandwidth requirements, and a virtual machine with a lower sensitivity to memory bandwidth requirements has smaller memory bandwidth requirements.

[0039] The following takes the characterization by the ratio between each virtual machine and the total memory bandwidth requirements of all virtual machines as an example. That is, in the case where the sensitivity and urgency of the memory bandwidth requirements of each virtual machine are similar, or when not considering the sensitivity and urgency of the memory bandwidth requirements of each virtual machine, when there are 10 virtual machines configured on a local host, if the total memory bandwidth requirement is 20 GB / s, the average memory bandwidth requirement of each virtual machine is 2 GB / s. Therefore, if a virtual machine has a memory bandwidth requirement of 1 GB / s < 2 GB / s, it indicates that the memory bandwidth requirement of this virtual machine is smaller; if a virtual machine has a memory bandwidth requirement of 5 GB / s > 2 GB / s, it indicates that the memory bandwidth requirement of this virtual machine is larger.

[0040] S220: Balancedly schedule each virtual machine to the corresponding processing unit among at least one processing unit, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine.

[0041] It should be understood that the memory bandwidth occupied by the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine. That is to say, the greater the memory bandwidth requirement of the virtual machine, the greater the memory bandwidth occupied by the virtual machine in the memory bus of the corresponding processing unit. That is to say, since different processing units access memory through different memory buses, therefore, two virtual machines scheduled to the processing units corresponding to the same memory bus will have memory bandwidth contention, while two virtual machines scheduled to the processing units corresponding to different memory buses will not have memory bandwidth contention. Furthermore, by adjusting the factors that cause memory bandwidth contention and the factors that do not cause memory bandwidth contention, multiple virtual machines are scheduled to at least one processing unit, meeting the respective memory bandwidth requirements of multiple virtual machines.

[0042] It should also be understood that the number of virtual machines in the processing unit can indicate the memory bandwidth occupied by the memory bus of the processing unit. That is, the greater the number of virtual machines in the processing unit, the smaller the proportion of the bandwidth occupied by the virtual machines for the memory bus of the processing unit, and the smaller the memory bandwidth occupied by the virtual machines for the memory bus of the processing unit to which they are scheduled. For example, when the memory bandwidth occupied by the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine, the memory bandwidth requirement of the virtual machine matches the number of virtual machines in the processing unit where the virtual machine is located.

[0043] In the solution of the embodiment of the present invention, since different processing units access memory through different memory buses, the memory bandwidth requirements of multiple virtual machines for at least one processing unit reflect the degree of demand for memory bandwidth contention of multiple virtual machines for the memory buses of at least one processing unit to be scheduled. Furthermore, when each virtual machine is evenly scheduled to the corresponding processing unit in the at least one processing unit, the memory bandwidth occupied by the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine, enabling the virtual machine with a greater memory bandwidth requirement to be allocated a greater occupied memory bandwidth. Therefore, the reliability of memory bandwidth allocation is improved, the running performance of the virtual machine is enhanced, and the experience of the virtual machine tenant is improved.

[0044] As other embodiments, as an example of determining the memory bandwidth requirements of multiple virtual machines, historical occupied memory bandwidth data of multiple virtual machines can be obtained respectively; weighted calculations are performed on the historical occupied memory bandwidth data of multiple virtual machines respectively to obtain scheduling weight information of multiple virtual machines respectively; based on the scheduling weight information of multiple virtual machines, the memory bandwidth requirements of multiple virtual machines for at least one processing unit are determined.

[0045] Furthermore, a user profile of the virtual machine tenant can be generated based on the historical occupied memory bandwidth data of the virtual machine. The dimensions of the user profile include, but are not limited to, the ratio between each virtual machine and the total memory bandwidth requirements of each virtual machine, the characterization of the urgency of the memory bandwidth requirement, the characterization of the sensitivity of the memory bandwidth requirement, the business priority of the virtual machine, the tenant priority, etc.

[0046] Furthermore, weighted calculations can be performed on the historical occupied memory bandwidth data of each of the multiple virtual machines respectively based on the memory bandwidth requirement metrics, to obtain the scheduling weight information of each of the multiple virtual machines. For example, the memory bandwidth requirement metrics can be the preset weight metrics for the above-mentioned respective dimensions. Correspondingly, based on the preset weight metrics for each dimension, calculations can be performed on each dimension of the historical occupied memory bandwidth data of each virtual machine, to obtain the scheduling weight information of each of the multiple virtual machines. That is to say, the higher the scheduling weight of a virtual machine, the greater its memory bandwidth requirement.

[0047] Alternatively, or optionally, when determining the memory bandwidth requirements of multiple virtual machines, the memory bandwidth requirements of the multiple virtual machines can be determined based on the current business traffic of the application programs deployed to the multiple virtual machines. For example, the greater the current business traffic of the deployed application program, the greater the memory bandwidth requirement of the virtual machine.

[0048] Specifically, in a high-concurrency access scenario, the current business traffic of the application program is relatively large, and in a low-concurrency access scenario, the current business traffic is relatively small, thereby resulting in different memory bandwidth requirements for virtual machines deploying different application programs or different microservices of the same application program.

[0049] It should be understood that the current business traffic of the application program in the virtual machine can be used as one weight factor of the scheduling weight information, and the historical occupied memory bandwidth of the virtual machine can be used as another weight factor, to determine the scheduling weight information of each virtual machine. For example, based on the memory bandwidth requirement metrics, weighted calculations are respectively performed on the historical occupied memory bandwidth data and the current business traffic of each of the multiple virtual machines, to obtain the scheduling weight information of each of the multiple virtual machines. Further, the weights between different weight factors can be further set to be equal or different.

[0050] Further, in order to determine the memory bandwidth requirements of the multiple virtual machines for at least one processing unit based on the respective scheduling weight information of the multiple virtual machines, the memory bandwidth ratio matching the scheduling weight information of each virtual machine can be determined, and then, based on the memory bandwidth ratio of each virtual machine and the total memory bandwidth of the at least one processing unit, the memory bandwidth requirement of the virtual machine can be determined. For example, multiplying the memory bandwidth ratio of each virtual machine by the total memory bandwidth of the at least one processing unit gives the memory bandwidth requirement of the virtual machine. It should also be understood that the scheduling weight information of multiple virtual machines can be implemented as a scheduling weight range, that is, each virtual machine can correspond to a scheduling weight range. For example, the higher the weight value in the scheduling weight range, the greater the weight of the virtual machine.

[0051] As another embodiment, evenly scheduling each virtual machine to the corresponding processing unit among the at least one processing unit includes: when the host machine deploying the multiple virtual machines is in a first resource state, dynamically scheduling different virtual machines with consistent memory bandwidth requirements to different processing units, where the computing occupancy rate of the first resource state is less than a first preset occupancy rate. That is to say, the first preset occupancy rate can indicate the degree of tension of the resource state of the host machine. When the resource state of the host machine is not tense, different virtual machines with consistent memory bandwidth requirements can be dynamically scheduled to different processing units. For example, as an example where the memory bandwidth requirements of different virtual machines are consistent, if the weight values of the scheduling weight information of at least two virtual machines are the same or similar, then the memory bandwidth requirements of the at least two virtual machines are consistent. Further, if at least two virtual machines belong to the same scheduling weight range, then the memory bandwidth requirements of the at least two virtual machines are consistent.

[0052] Also, for example, different virtual machines with scheduling weights all higher than a preset weight can be dynamically scheduled to different processing units, and the virtual machines with scheduling weights lower than the preset weight can be randomly scheduled, so that when the resource state of the host machine is not tense, the virtual machines with relatively higher memory bandwidth requirements are allocated a larger occupied memory bandwidth. It should be understood that the resource state includes two dimensions: the storage resource state and the computing resource state, and the occupancy rates of the storage resource state and the computing resource state can be weighted respectively to obtain the occupancy rate of the computing resources.

[0053] More specifically, as an example of dynamically scheduling different virtual machines with consistent memory bandwidth requirements to different processing units, for example, the to-be-scheduled virtual machines that are not in the running state can be directly scheduled to different processing units from the already-scheduled virtual machines. Alternatively, if at least two already-scheduled virtual machines are in the running state, then some of the already-scheduled virtual machines are migrated so that different already-scheduled virtual machines are in different processing units.

[0054] As other embodiments, if the processing module of at least one processing unit is a processor architecture such as AMD, for example, the processing module includes 2 processing units (i.e., each processing unit corresponds to a socket), each processing unit includes 128 virtual processing cores, each processing unit includes 8 processing subunits, and correspondingly, the processing module includes 16 processing subunits. That is to say, each processing subunit includes 16 virtual processing cores. If the specification of the virtual machine is 128 virtual processing cores, 8 virtual processing cores can be allocated to each processing subunit, that is to say, the occupied memory bandwidth of this virtual machine can obtain at most 1 times of expansion. Without loss of generality, different virtual machines with consistent memory bandwidth requirements can be dynamically scheduled into multiple processing subunits, so that the occupied memory bandwidth of each processing subunit is balanced.

[0055] As other embodiments for evenly scheduling each virtual machine to the corresponding processing unit for processing, when multiple virtual machines are in the second resource state of the host, at least two virtual machines with consistent memory bandwidth requirements can be scheduled to the same processing unit, where the computing resource occupancy rate of the second resource state is greater than the second preset occupancy rate.

[0056] In other examples, the second preset occupancy rate is greater than the first preset occupancy rate, thereby further realizing more reliable memory bandwidth allocation according to the tension degree of the resource state of the host.

[0057] For example, at least two virtual machines include the first virtual machine and the second virtual machine. In the memory bandwidth balancing method, the change state of the bandwidth occupancy ratio of the first virtual machine and the second virtual machine to the memory bus of the same processing unit can also be determined; based on the change state of the bandwidth occupancy ratio, the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit is set. For example, the Resource Director Technology (RDT) can be used to adjust the memory bandwidth upper limit. It should be understood that RDT can help system administrators perform fine-grained control of memory bandwidth and provide priority management for the memory bandwidth of different applications and tasks. By using RDT, administrators can reserve sufficient memory bandwidth for critical tasks to ensure their normal operation without being affected by other tasks. At the same time, RDT can also limit the use of memory bandwidth by some low-priority tasks to prevent them from occupying too many resources and affecting the performance of other tasks.

[0058] That is to say, the change state of the occupancy ratio reflects the more fine-grained memory bandwidth requirement situation in the same processing unit. Through the above solution, the allocation granularity of memory bandwidth is further improved, and the computing performance of each virtual machine is further enhanced.

[0059] For another example, determining the change status of the bandwidth occupancy ratios of the memory buses of the same processing unit by the first virtual machine and the second virtual machine includes: monitoring a first change status of the memory bandwidth occupied by the first virtual machine and a second change status of the memory bandwidth occupied by the second virtual machine. Based on the change status of the bandwidth occupancy ratio, setting the upper limit of the memory bandwidth occupied by at least one of the first virtual machine and the second virtual machine in the same processing unit includes: if the first change status (e.g., the fluctuation status of the occupancy ratio) and the second change status (e.g., the fluctuation status of the occupancy ratio) are consistent, setting the upper limits of the memory bandwidths of the first virtual machine and the second virtual machine to evenly divide the memory bandwidth resources of the same processing unit. That is to say, the Resource Director Technology (RDT) can be used to evenly divide the memory bandwidth of the same processing unit. For example, setting the memory bandwidth occupied by each virtual machine to 50% of the processing unit, that is, evenly distributing the total memory bandwidth of the memory bus, thereby further improving the allocation granularity of the memory bandwidth and further enhancing the computing performance of each virtual machine.

[0060] It should be understood that, as an example of monitoring the first change status of the memory bandwidth occupied by the first virtual machine and the second change status of the memory bandwidth occupied by the second virtual machine, it is possible to monitor the change status of the first virtual machine after it is scheduled to the processing unit, and predict the first change status after the current moment based on the previous change status from the time after scheduling to the current moment. Similarly, it is possible to monitor the change status of the second virtual machine after it is scheduled to the processing unit, and predict the second change status after the current moment based on the previous change status from the time after scheduling to the current moment. When no complete peak or trough appears in the respective change statuses of the first virtual machine and the second virtual machine immediately after scheduling, the total memory bandwidth of the processing unit can be evenly divided between the first virtual machine and the second virtual machine. After complete peaks or troughs appear in the change statuses of both the first virtual machine and the second virtual machine, dynamic allocation of the occupied memory bandwidth is then performed based on whether the first change status and the second change status are consistent.

[0061] As some other embodiments, based on the change status of the bandwidth occupancy ratio, setting the upper limit of the memory bandwidth occupied by at least one of the first virtual machine and the second virtual machine in the same processing unit further includes: if the first change status and the second change status are inconsistent, setting the upper limit of the memory bandwidth of the second virtual machine to be less than half of the memory bandwidth resources of the processing unit in the adjacent period where the peak moment of the first change status is located.

[0062] For example, if the peak and / or trough moments of the memory bandwidth occupied by two virtual machines do not coincide, that is, they are in a staggered state, the memory bandwidth of the two virtual machines can be dynamically adjusted using the staggered peaks and / or troughs. For example, when approaching the peak moment of the first change state, the upper limit of the memory bandwidth occupied by the second virtual machine is restricted to increase the memory bandwidth occupied by the first virtual machine. Conversely, when approaching the peak moment of the second change state, the upper limit of the memory bandwidth occupied by the first virtual machine is restricted, increasing the memory bandwidth occupied by the second virtual machine, thereby further improving the allocation granularity of the memory bandwidth and further enhancing the computing performance of each virtual machine and the experience of virtual machine tenants.

[0063] In summary, based on the memory bandwidth requirements of virtual machines, coarse-grained memory bandwidth balancing of virtual machines can be performed, and based on the change state of the memory bandwidth occupied by virtual machines, fine-grained memory bandwidth balancing can be performed.

[0064] Figure 3 It is a flowchart of the steps of the memory bandwidth balancing method for some other embodiments. The memory bandwidth balancing method includes:

[0065] S310: Determine the memory bandwidth requirements of multiple virtual machines for at least one processing unit, and different processing units access memory through different memory buses.

[0066] S320: When multiple virtual machines are in the first resource state of the host, dynamically schedule different virtual machines with the same memory bandwidth requirements to different processing units, where the computing occupancy rate of the first resource state is less than the first preset occupancy rate.

[0067] S330: When multiple virtual machines are in the second resource state of the host, schedule at least two virtual machines with the same memory bandwidth requirements to the same processing unit, where the computing resource occupancy rate of the second resource state is greater than the second preset occupancy rate.

[0068] It should be understood that the execution process of the steps similar to those in the Figure 2 embodiment in the memory bandwidth balancing method of this embodiment will not be elaborated here. In various embodiments of the present invention, different embodiments and variants can be obtained by various combinations of the steps.

[0069] Figure 4 For Figure 2 It is a flowchart of the steps of a specific example of the memory bandwidth balancing method of the Figure 4 The memory bandwidth balancing method includes:

[0070] Step S410: Start performing memory bandwidth allocation and turn to step S415.

[0071] Step S415: Obtain the historical occupied memory bandwidth data of each of the multiple virtual machines, and then proceed to step S420. For example, a user profile of the virtual machine tenant can be generated based on the historical occupied memory bandwidth data of the virtual machine. The dimensions of the user profile include, but are not limited to, the ratio between each virtual machine and the total memory bandwidth requirements of all virtual machines, the characterization of the urgency of the memory bandwidth requirement, the characterization of the sensitivity of the memory bandwidth requirement, the business priority of the virtual machine, the tenant priority, etc.

[0072] Step S420: Calculate the scheduling weights of the multiple virtual machines based on the historical occupied memory bandwidth data of each of the multiple virtual machines, and then proceed to step S425. For example, based on the preset weight metrics for each dimension, calculate each dimension of the historical occupied memory bandwidth data of each virtual machine to obtain the scheduling weight information of each of the multiple virtual machines.

[0073] Step S425: Determine whether the computing resources of the host are in short supply. If yes, proceed to step S445. If no, proceed to step S430. For example, the first preset occupancy rate and the second preset occupancy rate of the resource status of the virtual machine can be used as the judgment criteria for whether the computing resources are in short supply.

[0074] Step S430: Schedule the virtual machines with the same scheduling weight to the same processing unit, and then proceed to step S435. For example, when multiple virtual machines are in the first resource state of the host, dynamically schedule different virtual machines with the same memory bandwidth requirement to different processing units, where the computing occupancy rate of the first resource state is less than the first preset occupancy rate.

[0075] Step S435: Determine whether the first change state of the first virtual machine is consistent with the second change state of the second virtual machine. If yes, proceed to step S465. If no, proceed to step 440.

[0076] Step S440: In the adjacent period where the peak moment of the first change state is located, set the memory bandwidth upper limit of the second virtual machine to be less than half of the memory bandwidth resources of the processing unit. For example, the Resource Director Technology (RDT) can be used to adjust the memory bandwidth upper limit.

[0077] Step S445: Determine whether there are multiple processing subunits in each processing unit of the host. If yes, execute step S450. For example, when multiple virtual machines are in the second resource state of the host, schedule at least two virtual machines with the same memory bandwidth requirement to the same processing unit, where the computing resource occupancy rate of the second resource state is greater than the second preset occupancy rate. If no, proceed to step S455 and S60.

[0078] Step S450: Dynamically schedule the same virtual machine to multiple processing subunits so that the occupied memory bandwidth of each processing subunit is balanced.

[0079] Step S455: If the target virtual machine is not in the running state, directly schedule the target virtual machine to a processing unit different from that of the already scheduled virtual machines.

[0080] Step S460: If at least two already scheduled virtual machines are in the running state, migrate some of the already scheduled virtual machines so that different already scheduled virtual machines are in different processing units.

[0081] Step S465: Set the upper limit of the memory bandwidth of the first virtual machine and the second virtual machine to evenly divide the memory bandwidth resources of the same processing unit. For example, set the occupied memory bandwidth of each virtual machine to 50% of the processing unit, that is, evenly distribute the total memory bandwidth of the memory bus.

[0082] It should be understood that Step S440 and Step S465 are parallel processing procedures, and at least one of them can be executed.

[0083] Figure 5 It is a structural block diagram of a host computer according to other embodiments of the present invention. The host computer includes:

[0084] A determination module 510 determines the memory bandwidth requirements of multiple virtual machines for at least one processing unit, and different processing units access memory through different memory buses;

[0085] A scheduling module 520 evenly schedules each virtual machine to the corresponding processing unit in the at least one processing unit, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine.

[0086] In the solution of the embodiment of the present invention, since different processing units access memory through different memory buses, the memory bandwidth requirements of multiple virtual machines for at least one processing unit reflect the degree of demand for memory bandwidth contention of multiple virtual machines for the memory buses of the at least one processing unit to be scheduled. Furthermore, when each virtual machine is evenly scheduled to the corresponding processing unit in the at least one processing unit, the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine, which can make the virtual machine with a larger memory bandwidth requirement be allocated a larger occupied memory bandwidth. Therefore, the reliability of memory bandwidth allocation is improved, the running performance of the virtual machine is enhanced, and the experience of virtual machine tenants is improved.

[0087] As other embodiments, the determining module is specifically configured to: obtain the historical occupied memory bandwidth of multiple virtual machines in the called processing unit; perform weighted calculation on the historical occupied memory bandwidth of each of the multiple virtual machines respectively to obtain the scheduling weight information of each of the multiple virtual machines; and determine the memory bandwidth requirements of the multiple virtual machines for at least one processing unit based on the scheduling weight information of each of the multiple virtual machines.

[0088] As other embodiments, the determining module is specifically configured to: determine the memory bandwidth ratio matching the scheduling weight information of each virtual machine; and determine the memory bandwidth requirement of the virtual machine based on the memory bandwidth ratio of each virtual machine and the total memory bandwidth of the at least one processing unit.

[0089] As other embodiments, the scheduling module is specifically configured to: when the host machine deploying the multiple virtual machines is in a first resource state, dynamically schedule different virtual machines with consistent memory bandwidth requirements to different processing units among the at least one processing unit, where the computing occupancy rate of the first resource state is less than a first preset occupancy rate.

[0090] As other embodiments, the scheduling module is further configured to: when the host machine is in a second resource state, schedule at least two virtual machines with consistent memory bandwidth requirements to the same processing unit among the at least one processing unit, where the computing resource occupancy rate of the second resource state is greater than a second preset occupancy rate, and the second preset occupancy rate is greater than the first preset occupancy rate.

[0091] As other embodiments, the at least two virtual machines include a first virtual machine and a second virtual machine, and the scheduling module is further configured to: determine the change state of the bandwidth occupancy ratio of the memory buses of the first virtual machine and the second virtual machine for the same processing unit; and set the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit based on the change state of the bandwidth occupancy ratio.

[0092] As other embodiments, the scheduling module is specifically configured to: monitor a first change state of the occupied memory bandwidth of the first virtual machine and a second change state of the occupied memory bandwidth of the second virtual machine; and if the first change state and the second change state are consistent, set the memory bandwidth upper limits of the first virtual machine and the second virtual machine to equally divide the memory bandwidth resources of the same processing unit.

[0093] As other embodiments, the scheduling module is further configured to: if the first change state and the second change state are inconsistent, set the upper limit of the memory bandwidth of the second virtual machine to be less than half of the memory bandwidth resources of the processing unit in the adjacent period where the peak moment of the first change state is located.

[0094] For the specific implementation of each module in the host, reference may be made to the corresponding descriptions in the corresponding steps of the foregoing method embodiments, and they have corresponding beneficial effects, which will not be elaborated herein. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described modules can refer to the corresponding process descriptions in the foregoing method embodiments, which will not be repeated herein.

[0095] Figure 6 FIG. 5 is a flowchart of steps of an application deployment method according to another embodiment of the present invention. Figure 6 The application deployment method can be executed by a control node such as a Cloud Management System (CMS), and the control node is used to execute the deployment of microservices of an application program. Specifically, the application deployment method includes:

[0096] S610: Determine the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of the microservice for the memory bus in the host where it is located.

[0097] It should be understood that the application program includes core microservices with relatively high requirements for real-time memory bandwidth, such as order modules, recommendation modules, payment modules, etc., and non-core microservices with relatively low requirements for real-time memory bandwidth, such as calendar modules, message modules, etc. The memory bandwidth requirements of core microservices are higher than those of non-core microservices.

[0098] S620: Based on the memory bandwidth requirements of the multiple microservices, deploy the multiple microservices to multiple hosts, so that the total memory bandwidth requirements of the respective microservices deployed in each host match the memory bandwidth upper limit of the host.

[0099] It should be understood that the computing resources or storage resource configurations of multiple hosts are not the same. That is to say, when the computing resources or storage resources of a host are relatively large, the memory bandwidth upper limit of the host is relatively high, and when the computing resources or storage resources of a host are relatively small, the memory bandwidth upper limit of the host is relatively low.

[0100] It should also be understood that the memory bandwidth balancing method of the embodiments of the present invention can balance the occupied memory bandwidth of the hosts. Communication between different hosts needs to be implemented by means of network cards or switches. When the memory bandwidth requirements of the respective microservices deployed in each host are consistent with the memory bandwidth upper limit of the host, it can further optimize the memory bandwidth balance of the host locally.

[0101] In this embodiment, since the memory bandwidth requirements of the various microservices deployed in each host are consistent with the memory bandwidth upper limit of the host, the balance of the memory bandwidth requirements between different hosts is achieved, that is, from the dimension of the application program, the memory bandwidth management is efficiently performed with the management granularity between hosts.

[0102] Figure 7 It is a step flowchart of an application deployment device according to other embodiments of the present invention. Figure 7 The application deployment device corresponding to the application deployment method includes:

[0103] A determination module 710 that determines the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of the microservice for the memory bus in the host where it is located.

[0104] A deployment module 720 that deploys the multiple microservices to multiple hosts based on the memory bandwidth requirements of the multiple microservices, so that the total memory bandwidth requirements of the various microservices deployed in each host match the memory bandwidth upper limit of the host.

[0105] For the specific implementation of each module in the application deployment device, reference can be made to the corresponding descriptions in the corresponding steps of the above method embodiments, and they have corresponding beneficial effects, which will not be elaborated here. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described modules can refer to the corresponding process descriptions in the foregoing method embodiments, and will not be elaborated here.

[0106] Refer to Figure 8 , which shows a schematic structural diagram of an electronic device according to another embodiment of the present invention. The specific implementation of the electronic device in the specific embodiments of the present invention is not limited.

[0107] As Figure 8 shown, the electronic device may include: a processor 802 for executing a program 810, a communication interface 804, a memory 806, and a communication bus 808.

[0108] The processor, the communication interface, and the memory complete communication with each other through the communication bus.

[0109] The communication interface is used to communicate with other electronic devices or servers.

[0110] The processor is used to execute the program, and specifically can execute the relevant steps in the above method embodiments.

[0111] Specifically, the program may include program code, which includes computer operation instructions.

[0112] The processor may be a CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the intelligent device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.

[0113] The memory is used to store the program. The memory may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.

[0114] The program may include multiple computer instructions. Specifically, the program may cause the processor to execute through multiple computer instructions:

[0115] Determine the memory bandwidth requirements of multiple virtual machines for at least one processing unit. Different processing units access memory through different memory buses; evenly schedule each virtual machine to the corresponding processing unit in the at least one processing unit, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine;

[0116] Or,

[0117] Determine the memory bandwidth requirements of multiple microservices of an application program. The memory bandwidth requirement of each microservice indicates the bandwidth requirement of the microservice for the memory bus in the host where it is located; based on the memory bandwidth requirements of the multiple microservices, deploy the multiple microservices to multiple hosts, so that the total memory bandwidth requirement of each microservice deployed in each host matches the memory bandwidth upper limit of the host.

[0118] For the specific implementation of each step in the program, reference may be made to the corresponding descriptions in the corresponding steps and units in the above method embodiments, and there are corresponding beneficial effects, which will not be elaborated here. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices and modules can refer to the corresponding process descriptions in the foregoing method embodiments, which will not be elaborated here.

[0119] The embodiments of the present invention further provide a computer storage medium, on which a computer program is stored. When the program is executed by a processor, the methods described in any one of the foregoing multiple method embodiments are implemented. The computer storage medium includes, but is not limited to: Compact Disc Read-Only Memory (CD-ROM), Random Access Memory (RAM), floppy disks, hard disks, magneto-optical disks, etc.

[0120] The embodiments of the present invention further provide a computer program product, including computer instructions, which direct a computing device to perform operations corresponding to any one of the foregoing multiple method embodiments of the memory bandwidth balancing method.

[0121] In addition, it should be noted that the information related to users (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data for training a model, data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the users or fully authorized by all parties. And the collection, use, and processing of the relevant data need to comply with relevant regulations and standards, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0122] It should be pointed out that according to the needs of implementation, each component / step described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.

[0123] The method according to an embodiment of the present invention can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or be implemented as computer code that is originally stored in a remote recording medium or a non-transitory machine-readable medium and downloaded through a network and will be stored in a local recording medium. Thus, the method described herein can be stored on such a software process on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (such as a Random Access Memory (RAM), a Read-Only Memory (ROM), a flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.

[0124] Those of ordinary skill in the art can realize that the units and method steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.

[0125] The above embodiments are only used to illustrate the embodiments of the present invention, rather than to limit the embodiments of the present invention. Those of ordinary skill in the relevant technical field can also make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention shall be defined by the claims.

Claims

1. A method for balancing memory bandwidth, comprising: Determining the memory bandwidth requirements of multiple virtual machines for at least one processing unit, where different processing units access memory through different memory buses; Balancedly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit, such that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine.

2. The method according to claim 1, wherein, Determining the memory bandwidth requirements of multiple virtual machines for at least one processing unit includes: Obtaining the historical occupied memory bandwidth of multiple virtual machines in the invoked processing unit; Respectively performing weighted calculations on the historical occupied memory bandwidths of the multiple virtual machines to obtain the scheduling weight information of the multiple virtual machines; Based on the scheduling weight information of the multiple virtual machines, determining the memory bandwidth requirements of the multiple virtual machines for at least one processing unit.

3. The method according to claim 2, wherein, Based on the scheduling weight information of the multiple virtual machines, determining the memory bandwidth requirements of the multiple virtual machines for at least one processing unit includes: Determining the memory bandwidth occupancy ratio matching the scheduling weight information of each virtual machine; Based on the memory bandwidth occupancy ratio of each virtual machine and the total memory bandwidth of the at least one processing unit, determining the memory bandwidth requirement of the virtual machine.

4. The method according to claim 1, wherein Balancedly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit includes: When the host machine where the multiple virtual machines are deployed is in a first resource state, dynamically scheduling different virtual machines with the same memory bandwidth requirement to different processing units among the at least one processing unit, where the computing occupancy rate of the first resource state is less than a first preset occupancy rate.

5. The method according to claim 4, wherein, Balancedly scheduling each virtual machine to a corresponding processing unit among the at least one processing unit further includes: When the host machine is in a second resource state, scheduling at least two virtual machines with the same memory bandwidth requirement to the same processing unit among the at least one processing unit, where the computing resource occupancy rate of the second resource state is greater than a second preset occupancy rate, and the second preset occupancy rate is greater than the first preset occupancy rate.

6. The method according to claim 5, wherein, The at least two virtual machines include a first virtual machine and a second virtual machine, and the method further includes: Determining the change state of the bandwidth occupancy ratio of the first virtual machine and the second virtual machine for the memory bus of the same processing unit; Based on the change state of the bandwidth occupancy ratio, setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit.

7. The method according to claim 6, wherein Determining the change state of the bandwidth occupancy ratio of the first virtual machine and the second virtual machine for the memory bus of the same processing unit includes: Monitoring the first change state of the occupied memory bandwidth of the first virtual machine and the second change state of the occupied memory bandwidth of the second virtual machine; Based on the change state of the bandwidth occupancy ratio, setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit includes: If the first change state is the same as the second change state, set the upper limits of the memory bandwidths of the first virtual machine and the second virtual machine to evenly divide the memory bandwidth resources of the same processing unit.

8. The method according to claim 7, wherein Based on the change state of the bandwidth occupancy ratio, setting the upper limit of the occupied memory bandwidth of at least one of the first virtual machine and the second virtual machine in the same processing unit further includes: If the first change state is not the same as the second change state, then in the adjacent time period where the peak moment of the first change state is located, set the upper limit of the memory bandwidth of the second virtual machine to be less than half of the memory bandwidth resources of the processing unit.

9. An application deployment method, including: Determine the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of the microservice for the memory bus in the host machine where it is located; Based on the memory bandwidth requirements of the multiple microservices, deploy the multiple microservices to multiple host machines, so that the total memory bandwidth requirements of the respective microservices deployed in each host machine match the memory bandwidth upper limit of the host machine.

10. A host machine, including: A determination module that determines the memory bandwidth requirements of multiple virtual machines for at least one processing unit, and different processing units perform memory access through different memory buses; A scheduling module that evenly schedules each virtual machine to the corresponding processing unit among the at least one processing unit, so that the occupied memory bandwidth of the virtual machine for the memory bus of the corresponding processing unit matches the memory bandwidth requirement of the virtual machine.

11. An application deployment device, including: A determination module that determines the memory bandwidth requirements of multiple microservices of an application program, where the memory bandwidth requirement of each microservice indicates the bandwidth requirement of the microservice for the memory bus in the host machine where it is located; A deployment module that, based on the memory bandwidth requirements of the multiple microservices, deploys the multiple microservices to multiple host machines, so that the total memory bandwidth requirements of the respective microservices deployed in each host machine match the memory bandwidth upper limit of the host machine.

12. An electronic device, comprising: A processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations corresponding to the method according to any one of claims 1-9.

13. A computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method according to any one of claims 1-9.