Resource adjustment method and related equipment

By generating smart tags and adjusting the shared resource allocation of virtual machines based on the tags, the problem of unreasonable resource allocation in the existing technology is solved, and resource utilization and user experience are improved.

CN113138846BActive Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010060043.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-19
Publication Date
2024-11-22
Estimated Expiration
2040-01-19

AI Technical Summary

Technical Problem

When the existing technology regulates the shared resources of virtual machines (VMs), it is difficult to effectively reflect the performance characteristics of the VM, resulting in unreasonable resource allocation and affecting the normal operation of customer business.

Method used

By collecting hardware event information of the target VM, generating smart tags, adjusting the shared resources occupied by the VM based on the smart tags, reducing the impact on customer business. Smart tags include streaming, non-streaming, high sensitivity, low sensitivity, high bandwidth and low bandwidth, and the server adjusts the allocation of LLC and memory bandwidth based on these tags.

Benefits of technology

It realizes the rational allocation of shared resources while ensuring VM performance, reduces the impact on customer business, and improves resource utilization and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113138846B_ABST
    Figure CN113138846B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a resource adjustment method, which can be specifically applied to a virtual machine VM and a server. The method of the embodiment of the present application includes: the server determines the smart tag of the VM based on the hardware event information of two or more VMs collected, and adjusts the shared resources occupied by the VM according to the smart tag. The server adjusts the shared resources occupied by each VM according to the smart tag to reduce the impact on the normal operation of the customer business on the VM.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to computer technology, and in particular to a resource adjustment method and related equipment. Background Art

[0002] As the core technology of cloud scenarios, virtualization technology shares the hardware resources of a physical server with multiple users at the granularity of virtual machines (VMs), allowing users to use physical resources conveniently and flexibly under the premise of secure isolation. Compared with the operation mode where users monopolize a physical server, the multi-tenant sharing technology brought by virtualization improves the utilization rate of physical resources. However, when different users run services at the same time, they face increasingly fierce competition for shared resources (such as on-chip computing resources, last level cache (LLC) and memory bandwidth, etc.).

[0003] In order to adjust the shared resources occupied by each VM, the server in the prior art continuously collects the hardware event information of each VM, such as cache miss and instruction per clock (IPC), and allocates shared resources online according to the collected hardware event information. If the cache miss value of a VM increases and the IPC value decreases, the LLC resources allocated to the VM are increased, otherwise the LLC resources allocated to the VM are reduced. The server continuously adjusts the shared resources online to seek a reasonable shared resource allocation plan.

[0004] The hardware event information of the VM (such as IPC and cache miss) cannot effectively reflect the performance characteristics of the VM. The business of the VM itself will also cause the collected hardware event information to change continuously. The server continuously adjusts shared resources online to seek a reasonable shared resource allocation plan, which may affect the normal operation of customer business on the VM. Summary of the invention

[0005] The embodiments of the present application provide a resource adjustment method and related devices.

[0006] A first aspect of an embodiment of the present application provides a resource adjustment method, including:

[0007] The server collects hardware event information of a target VM, where there are at least two target VMs. These target VMs share shared resources of the server, where the shared resources include at least one of LLC, memory bandwidth and / or on-chip computing resources. The on-chip computing resources may be processors such as central processing units (CPUs). The server analyzes the collected hardware event information to obtain smart labels of the target VMs. One target VM may correspond to multiple smart labels divided by different evaluation rules. The server adjusts the shared resources occupied by the target VMs according to the smart labels.

[0008] In the embodiment of the present application, when the VM is running, the server collects the hardware event information of the VM and determines the smart tag corresponding to each VM based on the hardware event information. The smart tag indicates the performance characteristics of the target VM. During the adjustment process, the smart tag does not change due to the business of the VM itself. The server obtains a reasonable shared resource allocation plan through the smart tag, adjusts the shared resources occupied by each VM, and reduces the impact on the normal operation of customer business on the VM.

[0009] Based on the first aspect of the embodiments of the present application, in the first implementation of the first aspect of the embodiments of the present application, the smart tag can be streaming, non-streaming, high sensitivity, medium sensitivity, low sensitivity, high bandwidth and / or low bandwidth. The smart tag includes that the streaming target VM generates a large number of LLC accesses during operation, and most of the data required for its operation is in the memory bandwidth; the smart tag includes that when the target VM with high sensitivity changes in operation, its operation quality changes greatly and has high sensitivity when the shared resources it occupies change; the smart tag includes that the target VM with high bandwidth occupies more memory bandwidth during operation.

[0010] Based on the first implementation manner of the first aspect of the embodiments of the present application, in the second implementation manner of the first aspect of the embodiments of the present application, the specific implementation manner of the server adjusting the shared resources occupied by the target VM according to the smart tag can be that if the target VM is a high-bandwidth, low-sensitivity VM, the server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM. In the embodiments of the present application, the high-bandwidth, low-sensitivity VM is a target VM with lower performance sensitivity among the target VMs that occupy a larger memory bandwidth during runtime. Generally, it can be a target VM with smart tags including a low-sensitivity VM and a high-bandwidth VM.

[0011] In an embodiment of the present application, a specific implementation method is provided in which a server adjusts the shared resources occupied by a target VM according to a smart tag. For a target VM with abundant memory bandwidth resources and high sensitivity, its memory bandwidth can be reduced, and the reduced memory bandwidth can be allocated to other target VMs with insufficient memory bandwidth, so that the server can reasonably adjust resources.

[0012] Based on the second implementation manner of the first aspect of the embodiments of the present application, in the third implementation manner of the first aspect of the embodiments of the present application, the specific implementation manner of the server reducing the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM can be that the server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM on the premise that the performance sensitivity parameter of the high-bandwidth, low-sensitivity VM is less than a preset threshold, the performance sensitivity parameter is used to indicate the operating quality of the target VM, and the higher the performance sensitivity parameter of the target VM, the lower the operating quality of the target VM.

[0013] In the embodiment of the present application, when the server reduces the memory bandwidth of the high-bandwidth, low-sensitivity VM, it ensures that its performance sensitivity parameter is less than a preset threshold, so as to avoid the high-bandwidth, low-sensitivity VM from having excessive sensitivity due to insufficient memory bandwidth resources, which is not conducive to the user's performance experience.

[0014] Based on the third implementation of the first aspect of the embodiments of the present application, in the fourth implementation of the first aspect of the embodiments of the present application, the calculation method of the performance sensitivity parameter can be Perf_Sensitive=Stall_Cycles / CPU_CLK, where Perf_Sensitive is the performance sensitivity parameter, Stall_Cycles is the waiting clock cycle of the target VM, and CPU_CLK is the clock cycle of all central processing units (CPU) occupied by the target VM.

[0015] Based on any one of the first aspect of the embodiments of the present application to the fourth embodiment of the first aspect of the embodiments of the present application, in the fifth embodiment of the first aspect of the embodiments of the present application, the specific implementation method of the server adjusting the shared resources occupied by the target VM according to the smart tag may be that if the smart tag of the target VM includes streaming, the server reduces the shared resources occupied by the target VM, and the target VM including the streaming smart tag generates a large number of LLC accesses during runtime, and most of the data required for its runtime are in the memory bandwidth.

[0016] In an embodiment of the present application, the smart tag includes a streaming target VM, which occupies too many LLC resources and the LLC resources occupied by it have little impact on its normal operation, and the LLC resources occupied by the target VM can be reduced.

[0017] Based on the fifth implementation of the first aspect of the embodiments of the present application, in the sixth implementation of the first aspect of the embodiments of the present application, the specific implementation method of the server reducing the shared resources occupied by the target VM may be that the server reduces the shared resources occupied by the target VM according to a preset ratio.

[0018] Based on any one of the first aspect of the embodiments of the present application to the sixth embodiment of the first aspect of the embodiments of the present application, in the seventh embodiment of the first aspect of the embodiments of the present application, a specific implementation method of the server determining the smart label of the target VM based on hardware event information may be that the server determines that the target VM with a higher performance sensitivity parameter is a high-sensitivity VM through a clustering algorithm such as a K-means clustering algorithm, and the high-sensitivity VM smart label includes a high-sensitivity VM, and the performance sensitivity parameter of the high-sensitivity VM is greater than a first preset value.

[0019] Based on any one of the first aspect of the embodiments of the present application to the seventh embodiment of the first aspect of the embodiments of the present application, in the eighth embodiment of the first aspect of the embodiments of the present application, a specific implementation method for the server to determine the smart tag of the target VM based on hardware event information may be that the server determines that the target VM occupying a higher memory bandwidth of the server is a high-bandwidth VM through a clustering algorithm such as a K-means clustering algorithm, and the smart tag of the high-bandwidth VM includes the high-bandwidth VM, and the memory bandwidth occupied by the high-bandwidth VM is greater than a second preset value.

[0020] A second aspect of an embodiment of the present application provides a server, which executes the method of the first aspect.

[0021] A third aspect of an embodiment of the present application provides a server, which executes the method of the first aspect.

[0022] A fourth aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect as described above.

[0023] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes the method of the first aspect as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a resource allocation network framework diagram in an embodiment of the present application;

[0025] Figure 2 A schematic diagram of a flow chart of a resource adjustment method in an embodiment of the present application;

[0026] Figure 3 This is another flowchart of the resource adjustment method in the embodiment of the present application;

[0027] Figure 4 This is a schematic diagram of the last level cache allocation in an embodiment of the present application;

[0028] Figure 5 This is a structural diagram of a server in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The embodiment of the present application provides a resource adjustment method for adjusting the shared resources of a virtual machine to reduce the impact on the normal operation of customer services on the VM.

[0030] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0031] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] See also Figure 1 In the embodiment of the present application, the resource allocation architecture includes:

[0033] Virtual machines VM101 to 103 , servers 104 to 105 , a management server 106 , and users 107 to 109 .

[0034] The server 104 provides shared resources for VMs 101 to 103 , and the shared resources include: last level cache LLC 1041 and memory bandwidth 1042 .

[0035] LLC1041 is used to cache data frequently accessed by the CPU. Compared with the memory, it has a very fast access speed, which facilitates fast access by the CPU.

[0036] VMs share server memory, and the server memory throughput rate (memory size read per unit time) becomes the memory bandwidth 1042. When different VMs access the server memory at the same time, there will be competition for memory bandwidth.

[0037] The server 104 may include a host operating system (Host OS) 1044, which may determine the manner in which the shared resources of VMs 101 to 103 are adjusted. It is understandable that the server may determine the manner in which the shared resources of VMs 101 to 103 are adjusted through other software or hardware units, such as XXX. The specific units are not limited here, and the embodiments of the present application are only described by taking the host operating system as an example.

[0038] The host operating system 1044 may include multiple units with different functions, such as a collection unit 1045 , a determination unit 1046 , and a regulation unit 1047 .

[0039] The server 104 can collect the underlying hardware event information 1048 of VM101 to 103 through the collection unit 1045. The determination unit 1046 of the server 104 can intelligently process the collected results, perceive the characteristics of each VM's demand for shared resources, and determine the corresponding smart tags. The server's adjustment unit 1047 can adjust the allocation of shared resources to each VM by the management program 1043 according to the characteristics, so that users 107 to 109 can have a better quality of service (QoS) experience. Each unit can be different software or programs, which are not limited here.

[0040] The embodiment of the present application is illustrated by taking two servers 104 to 105, one management server 106 and three VMs 101 to 103 as examples. In actual applications, the number of servers is not limited, and the shared resources of at least one server are shared by two or more VMs, and the specific number of VMs is not limited.

[0041] Management server 106 can adjust the shared resources of multiple servers. If there is fierce competition for resources on a server, such as server 104, or server 104 fails, management server 106 can migrate the VM on server 104 to other servers with sufficient shared resources, such as server 105. It can be understood that in actual operation, the management server may not be involved in resource adjustment.

[0042] Combination Figure 1 The present application embodiment provides a plurality of methods for allocating shared resources, which are described below respectively:

[0043] 1. The server regulates the shared resources by controlling the range of shared resources that can be used by the streaming VM:

[0044] See also Figure 2 In an embodiment of the present application, a resource adjustment method includes:

[0045] 201. The server collects hardware event information of the target VM;

[0046] The server collects hardware event information of target VMs, the number of target VMs is two or more, and these target VMs share shared resources of the server, the shared resources include LLC, memory bandwidth and / or on-chip computing resources, and the on-chip computing resources include processors such as CPUs.

[0047] The hardware event information may include the number of LLC accesses generated by the target VM in a unit time, the number of missed accesses, the number of instructions, the number of CPU waiting cycles due to lack of data, the total number of CPU cycles consumed by the virtual machine, and other relevant data that can be collected by the server when the virtual machine is running.

[0048] 202. The server determines a smart tag of the target VM according to the hardware event information;

[0049] The server analyzes the collected hardware event information to obtain the smart label of the target VM. The smart label may include streaming, non-streaming, high sensitivity, medium sensitivity, low sensitivity, high bandwidth and / or low bandwidth, etc.

[0050] In this embodiment, after the server determines the smart tag of the target VM, it can add the smart tag to the attribute file of the target VM to identify the target VM. Alternatively, the server can pre-generate some smart tag groups and classify the target VM into the corresponding smart tag groups. The attributes of the smart tag group can be regarded as the smart tag of the target VM. Smart tags can also be in other forms, which are not limited here.

[0051] A target VM can correspond to multiple smart labels divided by different evaluation rules. The following describes each evaluation rule separately:

[0052] (1) The server divides the target VMs according to performance sensitivity:

[0053] Competition for shared resources leads to performance degradation of virtual machines. The degree of performance degradation can be represented by the parameter performance degradation parameter (slowdown):

[0054] Slowdown=Cycles_share / Cycles_alone=(Effective_Cycles+Stall_Cycles) / Cycles_alone;

[0055] Among them, Cycles_share is the clock cycle used by the target VM to process the unit business, Cycles_alone is the clock cycle used by the target VM to process the unit business if the current server only serves the target VM, Effective_Cycles is the effective clock cycle in Cycles_share, that is, the sum of the number of clocks of the central processing unit (CPU) corresponding to the target VM executing effective instructions when processing the unit business is Effective_Cycles, and Stall_Cycles is the waiting clock cycle of the target VM, that is, the sum of the number of clocks in the waiting state when the CPU corresponding to the target VM has no effective instructions to execute when processing the unit business is Stall_Cycles.

[0056] For an application, its Effective_Cycles is constant, and Stall_Cycles changes with the degree of competition for shared resources. Therefore, the sensitivity of VM performance can be reflected by the performance sensitivity parameter. The server can calculate the performance sensitivity parameter of the target VM through the hardware event information of the target VM. The specific calculation method includes:

[0057] Perf_Sensitive = Stall_Cycles / CPU_CLK, where Perf_Sensitive is performance sensitivity, Stall_Cycles is the sum of the number of clocks in the waiting state when the CPU corresponding to the target VM has no valid instructions to execute when processing unit business, and CPU_CLK is the clock cycle of all central processing units of the server's CPU processing unit business. It can be understood that Stall_Cycles and CPU_CLK are hardware event information.

[0058] In the embodiments of the present application, only the above-mentioned calculation method is used as an example for explanation. It can be understood that in practical applications, the specific calculation method can also have other forms, such as equivalent deformation of the above-mentioned formula, etc., which are not specifically limited here.

[0059] The server can divide the target VM into two categories of VMs, VMs with high performance sensitivity and VMs with low performance sensitivity, according to the level of performance sensitivity. In this embodiment, the server can determine that the smart tags of the target VMs with high performance sensitivity include high sensitivity, and determine that the smart tags of the target VMs with low performance sensitivity include low sensitivity. It can be understood that the embodiment of the present application does not limit the number of categories for dividing the target VMs according to performance sensitivity. For example, if they are divided into three categories, the corresponding smart tags may be high sensitivity, medium sensitivity and low sensitivity.

[0060] The performance sensitivity of the target VM can be reflected by the performance sensitivity parameter. The server can divide the target VM according to the clustering algorithm. The specific implementation method is that the server divides the performance sensitivity parameters of each target VM into K1 groups through a clustering algorithm such as the K-means clustering algorithm. The specific value of K1 in this embodiment is not limited. If K1=2, the server can divide the target VM into two categories according to the performance sensitivity parameter, corresponding to the smart labels of high sensitivity and low sensitivity. If K1=3, the server can divide the target VM into three categories according to the performance sensitivity parameter, corresponding to the smart labels of high sensitivity, medium sensitivity and low sensitivity. It can be understood that the way the server divides the target VM according to performance sensitivity is not limited to the clustering algorithm. The server can divide the target VM according to preset parameters. The specific implementation method can be that the server determines whether the performance deterioration parameter of the target VM is greater than the preset parameter. If so, the server determines that the target VM is a VM with high performance sensitivity, that is, determines that the smart label of the target VM includes high sensitivity. In this embodiment, the way the server divides the target VM according to performance sensitivity is not limited.

[0061] (2) The server divides the target VMs according to the size of the occupied memory bandwidth:

[0062] The server can divide the target VM into two categories according to the size of the memory bandwidth occupied by the target VM during operation, namely, high-bandwidth VM and low-bandwidth VM. In this embodiment, the server can determine that the smart tags of the target VM that occupies a larger memory bandwidth during operation include high bandwidth, and determine that the smart tags of the target VM that occupies a smaller memory bandwidth during operation include low bandwidth. It can be understood that the embodiment of the present application does not limit the number of categories of the target VM divided according to the size of the memory bandwidth occupied, and this embodiment is illustrated by taking two categories as an example.

[0063] The server can divide the target VM according to the clustering algorithm. The specific implementation method is that the server divides the size of the memory bandwidth occupied by each target VM during operation into K2 groups through a clustering algorithm such as the K-means clustering algorithm. If K2=2, the server can divide the target VM into two categories of high-bandwidth VM and low-bandwidth VM according to the size of the memory bandwidth, which correspond to the smart labels high bandwidth and low bandwidth respectively. If K2=3, the server can divide the target VM into three categories of high-bandwidth VM, medium-bandwidth VM and low-bandwidth VM according to the size of the memory bandwidth, which correspond to the smart labels high bandwidth, medium bandwidth and low bandwidth respectively. It can be understood that the way the server divides the target VM according to the size of the memory bandwidth occupied by the target VM during operation is not limited to the clustering algorithm. The server can divide the target VM according to preset parameters. The specific implementation method can be that the server determines whether the size of the memory bandwidth occupied by the target VM during operation is greater than the preset parameters. If so, the server determines that the target VM is a high-bandwidth VM, that is, determines that the smart label of the target VM includes high bandwidth. In this embodiment, the way the server divides the target VM according to the size of the occupied memory bandwidth is not limited.

[0064] In addition to dividing the target VMs according to performance indicators such as performance sensitivity and memory bandwidth usage, the server can also divide the target VMs according to their characteristics and determine the labels of the target VMs, such as the division of streaming VMs and non-streaming VMs, and the corresponding smart labels are streaming and non-streaming respectively.

[0065] In the embodiment of the present application, the streaming VM has the following characteristics:

[0066] 1) A large number of LLC accesses are generated during operation;

[0067] A large number of LLC accesses generated by a streaming VM affects the performance of other VMs related to the number of LLC accesses. The server can determine whether a VM generates a large number of LLC accesses through hardware event information, such as the number of LLC accesses.

[0068] 2) Most of the data needed at runtime is in the memory bandwidth;

[0069] The streaming VM's access to LLC has little impact on its own operation. The data required by the streaming VM during operation is mostly in the memory bandwidth. There is no cache hotspot during the operation of the streaming VM. The server can use hardware event information, such as the number of LLC accesses and the number of LLC access misses per unit time during the operation of the VM to determine whether the VM's access to LLC has a significant impact on its operation. If the number of LLC access misses of the VM is close to the number of LLC accesses, it indicates that the VM's access to LLC has little impact on its operation, and the data required by the VM is mostly in the memory bandwidth.

[0070] If the target VM meets the above characteristics, the server determines that the target VM is a streaming VM, and the smart tag of the target VM includes streaming.

[0071] 203. The server reduces the shared resources of the streaming VM;

[0072] The server can appropriately reduce the shared resources of the streaming VM to achieve a reasonable allocation of shared resources. Because the streaming VM generates a large number of LLC accesses during operation and most of these accesses are invalid, the server generally reduces the LLC resources available to the streaming VM. See Figure 4 , taking LLC resources as an example, the server can reduce the LLC resources occupied by the streaming VM from 401 and 402 to 401.

[0073] The server can determine the reduction extent of the available shared resources of the streaming VM according to preset rules such as binary search rules. The specific operation can be to reduce the available LLC resources of the streaming VM to 50% of the original. It can be understood that the server can adopt other preset rules to reduce the available shared resources of the streaming VM. For example, the server obtains the reduction extent according to historical records, and the server reduces the available shared resources of the streaming VM according to the reduction extent. The specific rules are not limited here.

[0074] 204. The server determines whether the shared resources of the streaming VM are less than a threshold value. If so, step 205 is executed. If not, step 206 is executed.

[0075] The server determines whether the available shared resources of the streaming VM are less than a threshold. If so, the server increases the shared resources of the streaming VM. If not, the server determines whether the performance sensitivity of the streaming VM changes dramatically. The threshold can be set manually or obtained by the server analyzing historical data.

[0076] 205. The server increases the shared resources of the streaming VM;

[0077] If the available shared resources of the streaming VM are less than the threshold, the server increases the available shared resources of the streaming VM. If the server reduces the shared resources of the streaming VM according to the binary search rule, the specific operation may be to increase the available resources of the streaming VM to twice the current amount, that is, to restore the shared resource usage range before performing the step 203 operation. If the server reduces the shared resources of the streaming VM according to other preset rules, the server increases the shared resources of the streaming VM by a corresponding increase.

[0078] 206. The server determines whether the performance sensitivity of the streaming VM changes dramatically. If so, step 207 is executed. If not, step 203 is executed.

[0079] The server determines whether the performance sensitivity of the streaming VM changes dramatically. If so, the shared resources of the streaming VM are increased; if not, the shared resources of the streaming VM are continued to be reduced. The criteria for determining whether the performance sensitivity changes dramatically can be set in advance. If the server determines that the performance sensitivity parameter of the streaming VM changes by more than 10%, it is determined that the performance sensitivity of the streaming VM changes dramatically, and step 207 is executed; otherwise, step 203 is executed. It can be understood that in actual operation, the server determines whether the performance sensitivity of the streaming VM changes dramatically. The criteria can also be formed according to historical data and a reasonable floating range of performance sensitivity parameter changes according to a clustering algorithm. If it does not belong to the range, it indicates that the performance sensitivity changes dramatically, and step 207 is executed; otherwise, step 203 is executed. This embodiment does not limit the judgment method.

[0080] 207. The server increases the shared resources of the streaming VM.

[0081] Step 207 is similar to step 205 of this embodiment and will not be described again here.

[0082] Figure 2 The illustrated embodiment provides a method for determining a smart tag of a target VM. For a streaming VM, the server can reasonably adjust the shared resources by reducing the shared resources occupied by the streaming VM, especially the LLC resources, i.e., executing steps 201 to 203. Furthermore, under the condition that the performance sensitivity of the streaming VM does not change drastically, the shared resources of the streaming VM are reduced, i.e., executing steps 201 to 207, to ensure the normal operation of the streaming VM and reasonably adjust the shared resources.

[0083] 2. The server adjusts shared resources by adjusting the memory bandwidth of high-bandwidth and low-sensitivity VMs:

[0084] See also Figure 3 Another resource adjustment method in the embodiment of the present application includes:

[0085] 301. The server collects hardware event information of the target VM;

[0086] 302. The server determines the smart tag of the target VM according to the hardware event information;

[0087] Steps 301 to 302 in this embodiment are similar to those in the previous embodiment. Figure 2 Steps 201 to 202 in the illustrated embodiment are similar and will not be described in detail herein.

[0088] 303. The server determines whether there is a high-bandwidth low-sensitivity VM in the VM group. If not, step 304 is executed. If yes, step 305 is executed.

[0089] The high-bandwidth low-sensitivity VM refers to whether there is a target VM with low performance sensitivity among the target VMs that occupy a large memory bandwidth during runtime. Generally, the smart label may include a target VM with low sensitivity VM and a high-bandwidth VM.

[0090] The server determines whether the memory bandwidth occupied during operation is large according to the actual number of classification categories. Generally, the target VM with a smart label including high bandwidth is determined to be the VM that occupies a large memory bandwidth. If the server divides the target VM into two categories according to the size of the memory bandwidth occupied by the target VM, the server can determine that the target VM with a smart label including high bandwidth occupies a large memory bandwidth during operation. If the server divides the target VM into three categories according to the size of the memory bandwidth occupied by the target VM, the server can determine that the target VM with a smart label including high bandwidth occupies a large memory bandwidth during operation, or determine that the target VM with a smart label including high bandwidth or medium bandwidth occupies a large memory bandwidth during operation. The specific details are not limited here.

[0091] The server determines whether the performance sensitivity of the target VM is low based on the actual number of classification categories. Generally, the server determines that the target VM whose smart label includes low sensitivity is a VM with low performance sensitivity. If the server divides the target VM into two categories according to the level of performance sensitivity, the server can determine that the target VM whose smart label includes low sensitivity has low performance sensitivity. If the server divides the target VM into three categories according to the level of performance sensitivity, the server can determine that the target VM whose smart label includes low sensitivity has low performance sensitivity, or determine that the target VM whose smart label includes low sensitivity or medium sensitivity has low performance sensitivity. The specific details are not limited here.

[0092] 304. The server reports the hotspot information to the management server;

[0093] The server determines whether there is a high-bandwidth, low-sensitivity VM in the VM group. If not, it reports hotspot information to the management server. The hotspot information indicates that the shared resources of the server are highly competitive and cannot provide sufficient shared resources for the normal operation of the target VM. The management server can migrate some target VMs to other servers with sufficient shared resources based on the hotspot report.

[0094] It is understandable that step 304 may not be performed in actual operation.

[0095] 305. The server reduces the memory bandwidth occupied by high-bandwidth low-sensitivity VMs;

[0096] The server can reduce the memory bandwidth of the high-bandwidth, low-sensitivity VM according to preset rules. If the server can reduce the memory bandwidth of the high-bandwidth, low-sensitivity VM according to a preset ratio, the preset ratio is X%. The specific operation can be that the server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM to the original X%. X in this embodiment is a real number greater than zero and less than 100, and is not specifically limited here. For example, if X is 95, X%=95%.

[0097] It is understandable that the server can use other preset rules to reduce the memory bandwidth of the high-bandwidth, low-sensitivity VM. For example, the server obtains the reduction range based on historical records, and the server reduces the memory bandwidth of the high-bandwidth, low-sensitivity VM based on the reduction range. The specific rules are not limited here.

[0098] If there are multiple high-bandwidth, low-sensitivity VMs in the VM group, the server can choose to reduce the memory bandwidth of one or more of the high-bandwidth, low-sensitivity VMs. The specific number is not limited here. If the server chooses to reduce the memory bandwidth of multiple high-bandwidth, low-sensitivity VMs, the server can prioritize reducing the high-bandwidth, low-sensitivity VM that occupies the largest memory bandwidth in order of the memory bandwidth occupied during operation.

[0099] 306. The server determines whether the performance sensitivity of the high-bandwidth low-sensitivity VM is less than a preset threshold. If so, step 305 is executed. If not, step 307 is executed.

[0100] The server determines whether the performance sensitivity of the high-bandwidth, low-sensitivity VM is less than a preset threshold after the memory bandwidth is reduced. The preset threshold may be the average value of the performance sensitivity parameters of the target VMs whose smart tags include high sensitivity in the VM group, or the average value of the performance sensitivity parameters of all target VMs. It is understandable that the server may also determine the preset threshold in other ways, which are not limited here.

[0101] 307. The server increases the memory bandwidth of high-bandwidth low-sensitivity VMs.

[0102] If the performance sensitivity of the high-bandwidth, low-sensitivity VM is greater than a preset threshold after the memory bandwidth is reduced, the server increases the available shared resources of the high-bandwidth, low-sensitivity VM. If the server reduces the shared resources of the high-bandwidth, low-sensitivity VM according to a preset ratio of X%, the specific operation may be to increase the available resources of the high-bandwidth, low-sensitivity VM to 1 / (X%) times the current amount, that is, to restore the memory bandwidth usage range before performing step 305. If the server reduces the memory bandwidth of the high-bandwidth, low-sensitivity VM according to other preset rules, the server increases the memory bandwidth of the high-bandwidth, low-sensitivity VM by a corresponding increase.

[0103] For the high-bandwidth, low-sensitivity VM, the server can reasonably adjust the shared resources by reducing the memory bandwidth it occupies, that is, executing steps 301 to 305. Furthermore, under the condition that the performance sensitivity parameter of the high-bandwidth, low-sensitivity VM is greater than a preset threshold, the memory bandwidth of the high-bandwidth, low-sensitivity VM is reduced, that is, executing steps 301 to 307, to ensure the normal operation of the high-bandwidth, low-sensitivity VM and reasonably adjust the shared resources.

[0104] Above Figure 2 A corresponding embodiment is that the server adjusts the shared resources by controlling the range of shared resources that can be used by the streaming VM. Figure 3 The corresponding embodiment is that the server adjusts the shared resources by adjusting the memory bandwidth of the high-bandwidth low-sensitivity VM. It can be understood that in actual applications, the above two embodiments can be implemented together or one of them can be selected for implementation. Figure 2 The embodiment shown is mainly used to adjust LLC resources. Figure 3 The embodiment shown is mainly used to adjust the memory bandwidth, and the order in which the VM accesses the shared resources is to first access the LLC resources and then access the memory bandwidth. If the above two embodiments are implemented together, in general, the first Figure 2 The embodiment shown adjusts LLC, and then adopts Figure 3 The illustrated embodiment regulates memory bandwidth.

[0105] The resource adjustment method in the embodiment of the present application is described above. The server in the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, one embodiment of the server includes:

[0106] The collecting unit 1045 is used to collect hardware event information of target virtual machines VM, the number of target VMs is two or more, and the target VMs share the shared resources of the server.

[0107] The determining unit 1046 is configured to determine a smart tag of the target VM according to the hardware event information, where the smart tag indicates a performance characteristic of the target VM.

[0108] The determining unit 1046 is specifically configured to:

[0109] (1) By using a clustering algorithm, it is determined that the smart tags of the target VMs with higher performance sensitivity parameters include high-sensitivity VMs, and the performance sensitivity parameters of the target VMs are greater than a first preset value.

[0110] (2) By using a clustering algorithm, it is determined that the smart tag of the target VM that occupies a high memory bandwidth of the server includes a high-bandwidth VM, and the memory bandwidth occupied by the target VM is greater than a second preset value.

[0111] The adjustment unit 1047 is used to adjust the shared resources occupied by the target VM according to the smart tag.

[0112] The adjustment unit 1047 is specifically used for:

[0113] (1) If the target VM is a high-bandwidth, low-sensitivity VM, the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM is reduced. The smart label of the high-bandwidth, low-sensitivity VM includes high bandwidth but does not include high sensitivity.

[0114] (2) The memory bandwidth occupied by the high-bandwidth, low-sensitivity VM is reduced according to the performance sensitivity parameter. The performance sensitivity parameter is used to indicate the running quality of the target VM. The higher the performance sensitivity parameter of the target VM, the lower the running quality of the target VM. The performance sensitivity parameter of the high-bandwidth, low-sensitivity VM is less than a preset threshold.

[0115] (3) If the smart tag of the target VM includes streaming, the shared resources occupied by the target VM are reduced.

[0116] (4) Reduce the shared resources occupied by the target VM according to a preset ratio.

[0117] In this embodiment, the operations performed by each unit in the server are the same as those described above. Figures 2 to 3 The description in the illustrated embodiment is similar.

[0118] See also Figure 5 , another structural diagram of the processor in the embodiment of the present application, the server 500 may include one or more processors 501 and a memory 505, and the memory 505 stores one or more applications or data.

[0119] The memory 505 may be a volatile storage or a persistent storage. The program stored in the memory 505 may include one or more modules, each of which may include a series of instruction operations on the processor. Furthermore, the central processor 501 may be configured to communicate with the memory 505 and execute a series of instruction operations in the memory 505 on the server 500.

[0120] The server 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input and output interfaces 504, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0121] The processor 501 may execute the aforementioned Figures 2 to 3 The operations performed by the road information detection device in the illustrated embodiment will not be described in detail here.

[0122] The present application provides a resource adjustment device, which can be applied to a device such as a server or a management server. The resource adjustment device is coupled to a memory and is used to read and execute instructions stored in the memory, so that the resource adjustment device can achieve the above-mentioned Figure 2 or Figure 3 The steps of the method executed by the server in any of the embodiments. In one possible design, the resource adjustment device is a chip or a system on chip.

[0123] The present application provides a chip system, which includes a processor for supporting a server to implement the functions involved in the above aspects, such as sending or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store necessary program instructions and data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0124] In another possible design, when the chip system is a chip in a server, the chip includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit to enable the chip in the server to execute the above Figure 2 or Figure 3 The steps of the method executed by the server in any one of the embodiments. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip in the UE or base station, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0125] The embodiment of the present application also provides a processor, which is coupled to a memory and is used to execute the methods and functions related to the server in any of the above embodiments.

[0126] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method flow related to the server in any of the above method embodiments is implemented. Correspondingly, the computer may be the above server.

[0127] It should be understood that the processors mentioned in the server, chip system, etc. in the above embodiments of the present application, or the processors provided in the above embodiments of the present application, may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0128] It should also be understood that the number of processors in the server, chip system, etc. in the above embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited. The number of memories in the embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited.

[0129] It should also be understood that the memory or readable storage medium mentioned in the server, chip system, etc. in the above embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).

[0130] It should also be noted that when the server includes a processor (or processing unit) and a memory, the processor in this application can be integrated with the memory, or the processor and the memory can be connected through an interface. It can be adjusted according to the actual application scenario and is not limited.

[0131] The present application also provides a computer program or a computer program product including the computer program, which, when executed on a computer, enables the computer to implement the method flow with the server in any of the above method embodiments. Correspondingly, the computer may be the above server.

[0132] In the above Figure 2 or Figure 3 In various embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0133] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A resource adjustment method, characterized in that: include: The server collects hardware event information of the target virtual machine VM; The server determines the smart tag of the target VM according to the hardware event information, the smart tag indicates the performance characteristics of the target VM, and the smart tag is determined according to at least one of the following performance characteristics of the target VM: a performance sensitivity parameter of the target VM, a size of memory bandwidth occupied by the target VM, and whether the target VM is a streaming VM or a non-streaming VM; the smart tag includes: streaming, non-streaming, high sensitivity, medium sensitivity, low sensitivity, high bandwidth and / or low bandwidth; the performance sensitivity parameter is determined in the following manner: Perf_Sensitive=Stall_Cycles / CPU_CLK; wherein, Perf_Sensitive is the performance sensitivity parameter, the Stall_Cycles is the waiting clock cycle of the target VM, and the CPU_CLK is all central processing unit CPU clock cycles occupied by the target VM; The server adjusts the shared resources occupied by the target VM according to the smart tag; Among them, the server adjusts the shared resources occupied by the target VM according to the smart tag, including: if the target VM is a high-bandwidth, low-sensitivity VM, the server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM, and the smart tag of the high-bandwidth, low-sensitivity VM includes the high bandwidth but does not include the high sensitivity; or, if the smart tag of the target VM includes the streaming, the server reduces the shared resources occupied by the target VM.

2. The method according to claim 1, characterized in that The server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM, including: the server reduces the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM until a performance sensitivity parameter of the high-bandwidth, low-sensitivity VM is not less than a preset threshold, and the performance sensitivity parameter is used to indicate the operating quality of the target VM, and the higher the performance sensitivity parameter of the target VM, the lower the operating quality of the target VM.

3. The method according to any one of claims 1 to 2, characterized in that The server reducing the shared resources occupied by the target VM includes: The server reduces the shared resources occupied by the target VM according to a preset ratio.

4. The method according to any one of claims 1 to 2, characterized in that The server determines the smart tag of the target VM according to the hardware event information, including: The server determines, through a clustering algorithm, that the smart tag of the target VM includes high sensitivity, and that a performance sensitivity parameter of the target VM is greater than a first preset value.

5. The method according to any one of claims 1 to 2, characterized in that The server determines the smart tag of the target VM according to the hardware event information, including: The server determines, through a clustering algorithm, that the smart tag of the target VM includes high bandwidth, and that the memory bandwidth occupied by the target VM is greater than a second preset value.

6. A server, characterized in that: include: A collection unit, used for collecting hardware event information of a target virtual machine VM, where the number of the target VMs is two or more, and the target VMs share the shared resources of the server; A determination unit, configured to determine a smart tag of the target VM according to the hardware event information, wherein the smart tag indicates a performance characteristic of the target VM, and the smart tag is determined according to at least one of the following performance characteristics of the target VM: a performance sensitivity parameter of the target VM, a size of memory bandwidth occupied by the target VM, and whether the target VM is a streaming VM or a non-streaming VM; the smart tag includes: streaming, non-streaming, high sensitivity, medium sensitivity, low sensitivity, high bandwidth and / or low bandwidth; the performance sensitivity parameter is determined in the following manner: Perf_Sensitive=Stall_Cycles / CPU_CLK; wherein the Perf_Sensitive is the performance sensitivity parameter, the Stall_Cycles is the waiting clock cycle of the target VM, and the CPU_CLK is the total CPU clock cycles occupied by the target VM; an adjusting unit, configured to adjust the shared resources occupied by the target VM according to the smart tag; Among them, the adjustment unit is specifically used to, if the target VM is a high-bandwidth, low-sensitivity VM, reduce the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM, and the smart tag of the high-bandwidth, low-sensitivity VM includes the high bandwidth but does not include the high sensitivity; or, the adjustment unit is specifically used to, if the smart tag of the target VM includes the streaming, reduce the shared resources occupied by the target VM.

7. The server according to claim 6, characterized in that: The adjustment unit is specifically used to reduce the memory bandwidth occupied by the high-bandwidth, low-sensitivity VM until a performance sensitivity parameter of the high-bandwidth, low-sensitivity VM is not less than a preset threshold, and the performance sensitivity parameter is used to indicate the operating quality of the target VM. The higher the performance sensitivity parameter of the target VM, the lower the operating quality of the target VM.

8. The server according to any one of claims 6 to 7, characterized in that: The adjustment unit is specifically configured to reduce the shared resources occupied by the target VM according to a preset ratio.

9. The server according to any one of claims 6 to 7, characterized in that: The determining unit is specifically configured to determine, through a clustering algorithm, that the smart tag of the target VM includes high sensitivity, and that a performance sensitivity parameter of the target VM is greater than a first preset value.

10. The server according to any one of claims 6 to 7, characterized in that: The determining unit is specifically configured to determine, through a clustering algorithm, that the smart tag of the target VM includes high bandwidth, and that the memory bandwidth occupied by the target VM is greater than a second preset value.

11. A server, characterized in that: include: Processor, memory, bus, input and output devices; The processor is connected to the memory and the input and output devices; The bus is respectively connected to the processor, the memory and the input and output devices; The processor executes the method according to any one of claims 1 to 5.

12. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 5.

13. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 5.