Public cloud downtime risk identification method, device and storage medium

By collecting CPU frequency fluctuations and CPU utilization in a public cloud environment and identifying risky virtual machines, the frequency reduction problem caused by high-load services in public clouds is solved, and the stability of tenant business and SLA protection is achieved.

CN117271056BActive Publication Date: 2025-03-18BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311214779.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-03-18
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

In public cloud environments, high-load services may cause the host's single socket or whole machine to downgrade frequency, which in turn affects the performance of other tenant services, affects the stability of tenant services and service-level agreement SLA.

Method used

By collecting the frequency fluctuations of each CPU unit in the host in the public cloud environment and the CPU utilization of each tenant virtual machine, the risky virtual machines that may be affected by the CPU frequency reduction are selected, thereby providing a basis for the migration and scheduling of the risky virtual machine and reducing the impact of the frequency reduction.

Benefits of technology

It realizes the rapid and accurate identification of risky virtual machines that may be affected by CPU frequency reduction, reduces the impact of frequency reduction on tenant business, avoids load interference between tenants in public cloud, and ensures the stability of tenant virtual machines and the SLA of public cloud.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271056B_ABST
    Figure CN117271056B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a method, device and storage medium for identifying the risk of frequency reduction in a public cloud, by collecting the frequency fluctuation of each CPU unit in a host machine in a public cloud environment; collecting the CPU utilization of each tenant virtual machine in the host machine; and screening out risky virtual machines from the tenant virtual machines based on the frequency fluctuation of each CPU unit and the CPU utilization of each tenant virtual machine. By detecting the frequency fluctuation of each CPU unit in a host machine and the CPU utilization of each tenant virtual machine in a public cloud environment, risky virtual machines that may be affected by CPU frequency reduction can be quickly and accurately screened out, thereby providing a basis for the migration and scheduling of risky virtual machines, reducing the impact of frequency reduction, avoiding load interference between tenants of the public cloud, ensuring the stability of public cloud tenant virtual machines, and ensuring the service level agreement of the public cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and more particularly to a method, device, and storage medium for identifying a public cloud frequency reduction risk. Background Art

[0002] Public cloud refers to cloud computing resources provided by third-party providers to users. In the non-oversold public cloud scenario, in order to achieve elastic sale and on-demand use of resources, multiple tenants generally share different physical cores on the same host machine to run services. Public cloud providers provide basic multi-tenant isolation and security, as well as specs (manufacturer virtual machine specifications) of expected operating frequencies.

[0003] Public cloud providers generally achieve basic isolation and performance assurance by binding vCPUs (virtual machine processes) to physical cores. However, when tenant businesses are high-load businesses, it may still cause a single socket or the entire host machine to downgrade, resulting in performance degradation of other tenant businesses on the same socket or the same host machine, affecting the tenant business. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, device and storage medium for identifying risk of CPU frequency reduction in a public cloud, so as to screen out risky virtual machines that may be affected by CPU frequency reduction in a public cloud environment.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for identifying a risk of downscaling in a public cloud, including:

[0006] Collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores;

[0007] Collecting the CPU utilization of each tenant virtual machine in the host machine;

[0008] According to the frequency fluctuation of each CPU unit and the CPU utilization rate of each tenant virtual machine, risky virtual machines are screened out from the tenant virtual machines.

[0009] In a second aspect, an embodiment of the present disclosure provides a public cloud frequency reduction risk identification device, including:

[0010] A CPU frequency fluctuation collection unit is used to collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores;

[0011] A CPU utilization collection unit, used to collect the CPU utilization of each tenant virtual machine in the host machine;

[0012] The identification unit is used to screen out risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization rates of the tenant virtual machines.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;

[0014] The memory stores computer-executable instructions;

[0015] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the public cloud frequency reduction risk identification method as described in the first aspect and various possible designs of the first aspect.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the public cloud frequency reduction risk identification method described in the first aspect and various possible designs of the first aspect is implemented.

[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, the public cloud frequency reduction risk identification method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] The public cloud frequency reduction risk identification method, device and storage medium provided by the embodiments of the present disclosure collect the frequency fluctuations of each CPU unit in the host machine in the public cloud environment; collect the CPU utilization of each tenant virtual machine in the host machine; and screen out risky virtual machines from the tenant virtual machines based on the frequency fluctuations of each CPU unit and the CPU utilization of each tenant virtual machine. By detecting the frequency fluctuations of each CPU unit in the host machine and the CPU utilization of each tenant virtual machine in the public cloud environment, risky virtual machines that may be affected by CPU frequency reduction can be quickly and accurately screened out, thereby providing a basis for the migration and scheduling of risky virtual machines, reducing the impact of frequency reduction, avoiding load interference between public cloud tenants, ensuring the stability of public cloud tenant virtual machines, and ensuring the service level agreement SLA of the public cloud. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 This is an example diagram of public cloud frequency reduction risk identification in the prior art;

[0021] Figure 2 A schematic diagram of the architecture of a method for identifying a public cloud frequency reduction risk provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a process flow of a method for identifying a public cloud frequency reduction risk provided by an embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a process flow of a method for identifying a public cloud frequency reduction risk provided by another embodiment of the present disclosure;

[0024] Figure 5 A structural block diagram of a public cloud frequency reduction risk identification device provided in an embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0027] Public cloud providers generally achieve basic isolation and performance assurance by binding vCPUs (virtual machine processes) to physical cores. However, when tenant businesses are high-load businesses, it may still cause a single socket (CPU slot) or the entire host machine to be downgraded, resulting in performance degradation of other tenant businesses on the same socket or the same host machine, affecting tenant businesses (for example, increased latency for real-time tasks and suboptimal performance of computing businesses).

[0028] The specific reason is that different tenant virtual machines coexist on a physical socket or numa (non-uniform memory access architecture, in some cases numa is equivalent to a socket), and in essence they still share the power supply on the physical socket. When a certain number of cores are running high-load services, such as rendering, AVX / AMX heavy-load instructions, the temperature of a single CPU (socket) will rise after a certain period of operation and reach the TDP (Thermal Design Power) preset by the CPU manufacturer, which is related to the specific CPU model, triggering the hardware to perform frequency reduction, such as Figure 1As shown in the figure, tenants A, B, and C use cores in socket 0 and socket 1. When tenant A runs the AMX heavy load instruction, socket 0 reaches TDP, causing the entire CPU unit (including each core) corresponding to socket 0 to be frequency-reduced. The services of tenants B and C are also affected by the frequency reduction, which may increase latency. As a result, tenants B and C may complain that the public cloud provider has overselling or instability issues, and tenant A may also fail to meet expectations in terms of performance.

[0029] Therefore, when public cloud providers sell non-oversold virtual machines in public clouds, how to ensure isolation between tenants has always been an important manifestation of the key competitiveness of major providers. In addition, CPU frequency reduction is common and unavoidable in the industry. How to control the impact of frequency reduction on tenant businesses and ensure SLA (Service Level Agreement) is a problem that needs to be solved urgently.

[0030] In order to solve the above technical problems, the embodiments of the present disclosure provide a method for identifying the risk of frequency reduction in a public cloud, by collecting the frequency fluctuations of each CPU unit in a host machine in a public cloud environment; collecting the CPU utilization of each tenant virtual machine in the host machine; and screening out risky virtual machines from the tenant virtual machines based on the frequency fluctuations of each CPU unit and the CPU utilization of each tenant virtual machine. By detecting the frequency fluctuations of each CPU unit in a host machine and the CPU utilization of each tenant virtual machine in a public cloud environment, risky virtual machines that may be affected by CPU frequency reduction can be quickly and accurately screened out, thereby providing a basis for the migration and scheduling of risky virtual machines, reducing the impact of frequency reduction, avoiding load interference between tenants of the public cloud, ensuring the stability of public cloud tenant virtual machines, and ensuring the service level agreement SLA of the public cloud, and being applicable to scenarios with more tenants of different load types.

[0031] The system architecture of the method for identifying the risk of downscaling in a public cloud according to the embodiment of the present disclosure is as follows: Figure 2 As shown, the frequency fluctuation of each CPU unit in the host machine and the CPU utilization of each tenant virtual machine in the host machine can be collected into the indicator service (metricsserver), and the CPU utilization of each tenant virtual machine is added to the message queue (such as Kafka) downstream through the data task, and then the stream data processing engine (such as Flink) consumes the frequency fluctuation of each CPU unit in the host machine and the CPU utilization of each tenant virtual machine from the message queue. According to the frequency fluctuation of each CPU unit and the CPU utilization of each tenant virtual machine, the risky virtual machines are screened out from the tenant virtual machines, and then stored in another message queue (such as Kafka) for subsequent refined screening (that is, offline scheduling).

[0032] Refined screening (also known as offline scheduling) detects whether the risky virtual machine is a target virtual machine affected by frequency reduction according to preset detection rules, thereby screening the target virtual machines affected by frequency reduction. When migrating the target virtual machines, one or more target virtual machines whose number of cores of the target CPU unit is not 0 and whose number of cores of the target CPU unit is the least are migrated through sorting. Before migrating the target virtual machine, it is necessary to determine whether the target virtual machine is allowed to be migrated and verify the feasibility of the migration. Finally, the migration is performed to complete the offline scheduling.

[0033] In addition, the analytical database clickhouse can also obtain the historical CPU usage of each tenant's virtual machine, add a label to each tenant according to the historical CPU usage (or add a label to each tenant's virtual machine load), and the labels include high-load business type labels and low-load business type labels; after receiving a virtual machine creation request from any tenant, online scheduling is performed, and the host machine and / or CPU unit used to create the tenant's virtual machine is determined according to the tenant's label, and the tenant virtual machine is created according to the virtual machine creation request. By reasonably deploying the tenant virtual machines in advance, frequency reduction can be avoided as much as possible to prevent the impact of frequency reduction on tenant business.

[0034] It should be noted that the user information and data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] The public cloud frequency reduction risk identification method disclosed in the present invention will be described in detail below in conjunction with specific embodiments.

[0036] refer to Figure 3 , Figure 3 A flowchart of a method for identifying a public cloud downscaling risk provided by an embodiment of the present disclosure is provided. The method of this embodiment can be applied in a terminal device or a server. The method for identifying a public cloud downscaling risk includes:

[0037] S201. Collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment.

[0038] In this embodiment, the public cloud includes multiple host machines, each of which usually includes two CPU units (that is, the host machine usually includes two sockets or numas), and each CPU unit includes multiple cores (also called kernels). Different tenant virtual machines may coexist in the same CPU unit, and different tenant virtual machines use different cores of the CPU unit. When the CPU frequency is reduced, the entire CPU unit is usually reduced. Therefore, in this embodiment, the frequency fluctuation of the CPU unit is detected in the CPU unit dimension.

[0039] Optionally, for any CPU unit, obtain the frequency difference between the actual operating frequency and the expected operating frequency of each core of the CPU unit; aggregate the frequency difference of each core of the CPU unit to obtain the frequency fluctuation of the CPU unit. The formula can be as follows:

[0040]

[0041] cpu_x_f req_deviation indicates the frequency fluctuation of CPU unit x, where x refers to the socket or numa number, usually 0 or 1; cores is the number of physical cores on a single socket or single muna; f expect (core i ) is core i The expected operating frequency can be the all turbo boost frequency in the white paper of the corresponding CPU manufacturer; f actual (core i ) is core i The actual operating frequency can be obtained from the CPU register, not from the / proc or / sys interface under the core, to improve accuracy; the multiplication by 1000 is to convert the frequency fluctuation into thousandths for better comparison of frequency fluctuations, but it is not necessary to multiply by 1000. For example, assuming cpu_0_freq_deviation = 110, it means that the actual operating frequency of the CPU on socket0 differs from the expected operating frequency by (110 / 1000) = 11.1%, that is, the CPU is downclocked by 11.1%.

[0042] S202: Collect the CPU utilization of each tenant virtual machine in the host machine.

[0043] In this embodiment, it is also necessary to collect the CPU utilization of each tenant virtual machine in the host machine to reflect the load of the tenant business. It should be noted that the tenant virtual machine may use the core of a single CPU unit, or may use the cores of different CPU units across CPU units. In this embodiment, the CPU utilization of the tenant virtual machine is the utilization of all cores used, which can be used as a tenant virtual machine business portrait to reflect the load of the tenant business.

[0044] It should be noted that there is no distinction between the execution order of S201 and S202.

[0045] S203: Screen out risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilizations of the tenant virtual machines.

[0046] In this embodiment, after obtaining the frequency fluctuation of each CPU unit of the host machine and the CPU utilization of each tenant virtual machine, it can be determined whether each CPU has frequency reduction according to the frequency fluctuation of each CPU unit. After frequency reduction occurs, it can be determined which tenant virtual machines may be affected by the CPU frequency reduction according to the CPU utilization of each tenant virtual machine. The higher the CPU utilization, the more obvious the user perception of the CPU frequency reduction, and the greater the impact of the CPU frequency reduction on the tenant virtual machine. The lower the CPU utilization, the less obvious the user perception of the CPU frequency reduction, and the less impact the tenant virtual machine is affected by the CPU frequency reduction (for example, for a tenant with a normal load of 5% CPU utilization, even if the frequency is reduced by 20% immediately, it may be an imperceptible state and be less affected by the CPU frequency reduction). Therefore, the risk virtual machines that may be affected by the CPU frequency reduction can be screened out from the tenant virtual machines to facilitate migration and scheduling of tenant virtual machines to reduce the impact of CPU frequency reduction.

[0047] The public cloud frequency reduction risk identification method provided in this embodiment collects the frequency fluctuations of each CPU unit in the host machine in the public cloud environment; collects the CPU utilization of each tenant virtual machine in the host machine; and screens out risky virtual machines from the tenant virtual machines based on the frequency fluctuations of each CPU unit and the CPU utilization of each tenant virtual machine. By detecting the frequency fluctuations of each CPU unit in the host machine and the CPU utilization of each tenant virtual machine in the public cloud environment, risky virtual machines that may be affected by CPU frequency reduction can be quickly and accurately screened out, thereby providing a basis for the migration and scheduling of risky virtual machines, reducing the impact of frequency reduction, avoiding load interference between tenants of the public cloud, ensuring the stability of public cloud tenant virtual machines, and ensuring the service level agreement SLA of the public cloud.

[0048] On the basis of the above embodiment, the step S203 of screening risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization of the tenant virtual machines may specifically include:

[0049] If the frequency fluctuation of any target CPU unit downclocking exceeds a preset fluctuation threshold, a tenant virtual machine whose CPU utilization is greater than a preset CPU utilization threshold is screened from the tenant virtual machines and determined as the risky virtual machine.

[0050] In this embodiment, if the frequency fluctuation of any target CPU unit downclocking exceeds a preset fluctuation threshold, for example, the preset fluctuation threshold is 10%, it can be determined that the CPU of the host machine is downclocked, and then based on the CPU utilization of each tenant virtual machine, the risk virtual machines that may be affected by the CPU downclocking are screened. A preset CPU utilization threshold can be set, for example, the preset CPU utilization threshold is 70%. If the screened CPU utilization in any tenant virtual machine in the host machine is greater than the preset CPU utilization threshold, the tenant virtual machine is treated as a risky virtual machine.

[0051] Among them, the preset CPU utilization threshold can be set according to demand. In this embodiment, 70% is used because the preset CPU utilization threshold is not set too large (such as 90%), leaving a certain space to prevent omissions; and a CPU utilization of 70% belongs to a high-load business, and tenants of high-load businesses pay more attention to CPU utilization.

[0052] In another optional embodiment, the CPU utilization fluctuation of each tenant virtual machine can also be detected. When it is determined that the frequency fluctuation of any target CPU unit downclocking exceeds the preset fluctuation threshold, the tenant virtual machines whose CPU utilization fluctuation exceeds the preset CPU utilization fluctuation threshold (such as 10%) are screened from the tenant virtual machines, and it is considered that the CPU utilization of the tenant virtual machine decreases due to the target CPU unit downclocking, and thus it is determined as a risky virtual machine. However, the computational complexity of this embodiment is relatively high, which affects the timeliness of risky virtual machine identification.

[0053] On the basis of the above embodiment, after the risky virtual machines are screened out, further refined screening (ie, secondary determination) may be performed to detect whether the risky virtual machines are target virtual machines that are actually affected by the frequency reduction according to preset detection rules.

[0054] In this embodiment, based on the frequency fluctuation of each CPU unit of the host machine and the CPU utilization of each tenant virtual machine, it can only be preliminarily determined which tenant virtual machines may be affected by CPU frequency reduction, that is, there is a risk of being affected, and through refined screening, the target virtual machines that are actually affected by the frequency reduction can be determined. Since the risk virtual machine only considers the CPU utilization rate, more information about the tenant virtual machine can be considered during refined screening, including but not limited to whether the tenant belongs to the preset tenant set (tenant whitelist), whether the tenant has exclusive use of the host machine, the distribution of the cores used by the tenant, etc. By configuring the preset detection rules and combining one or more of the above information, it is possible to accurately screen out the target virtual machines that are actually affected by the frequency reduction.

[0055] Optionally, when detecting whether the risky virtual machine is a target virtual machine affected by frequency reduction according to a preset detection rule, it may specifically include:

[0056] Determine whether the tenant corresponding to the risky virtual machine belongs to a preset tenant set, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0057] Determine whether the risky virtual machine exclusively occupies the host machine, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0058] According to the number of cores of the target CPU unit used by the risk virtual machine, it is detected whether the risk virtual machine is a target virtual machine affected by frequency reduction.

[0059] In this embodiment, the preset tenant set includes multiple preset tenants, these tenants do not care about CPU frequency reduction, or even if the CPU frequency is reduced, they think it is not affected, or these tenant virtual machines do not need to be scheduled and migrated. If the tenant corresponding to the risky virtual machine belongs to the preset tenant set, it is determined that the risky virtual machine is not a target virtual machine affected by the frequency reduction, and the risky virtual machine can be excluded.

[0060] In addition, if the risky virtual machine occupies the host machine exclusively, that is, there is only the risky virtual machine in the host machine and no other tenant virtual machines exist, then the CPU frequency reduction is caused by the risky virtual machine itself, which is within expectations. Therefore, it is also determined that the risky virtual machine is not the target virtual machine affected by the frequency reduction, and the risky virtual machine can be excluded.

[0061] In addition, since the target CPU unit is frequency-reduced, and the degree to which the risky virtual machine is affected also depends on the number of cores of the target CPU unit used by the risky virtual machine, it is possible to determine whether the risky virtual machine is a target virtual machine affected by the frequency reduction based on the number of cores of the target CPU unit used by the risky virtual machine.

[0062] Optionally, if the number of cores of the target CPU unit used by the risky virtual machine is 0, that is, the risky virtual machine does not use the cores of the target CPU unit and will not be affected by the frequency reduction of the target CPU unit, it can be determined that the risky virtual machine is not the target virtual machine affected by the frequency reduction and the risky virtual machine can be excluded.

[0063] Optionally, if the number of cores of the target CPU unit used by the risk virtual machine is not 0 and is less than the preset core number threshold, it means that the risk virtual machine uses fewer cores of the target CPU unit and is more susceptible to the impact of frequency reduction of the target CPU unit; and the business on the cores used by the risk virtual machine in the target CPU unit is more convenient to migrate, so the risk virtual machine is determined to be a target virtual machine affected by the frequency reduction, and subsequent migration can be performed to migrate the business on the cores used by the target virtual machine in the target CPU unit to other CPU units.

[0064] Optionally, the risk virtual machines whose core numbers using the target CPU unit are not 0 are sorted according to the core numbers using the target CPU unit, and one or more risk virtual machines in the sorting that use the least core numbers of the target CPU unit are determined as target virtual machines affected by frequency reduction.

[0065] In this embodiment, risk virtual machines whose core number of the target CPU unit is not 0 are sorted according to the number of cores of the target CPU unit used. One or more risk virtual machines that use the least number of cores of the target CPU unit in the sort are more susceptible to the impact of frequency reduction of the target CPU unit and are also more convenient to migrate. Therefore, one or more risk virtual machines that use the least number of cores of the target CPU unit are determined as target virtual machines affected by frequency reduction, and subsequent migration can be performed to migrate the services of the target virtual machines on the cores used in the target CPU unit to other CPU units.

[0066] The risky virtual machines that use a large number of cores of the target CPU unit in the sorting may be virtual machines that cause the target CPU unit to be down-clocked, or they may be inconvenient to migrate due to the large number of cores involved, and therefore are excluded.

[0067] On the basis of the above embodiment, after determining that the risky virtual machine is a target virtual machine affected by the frequency reduction, the target virtual machine can also be migrated, especially migrating the business on the core used by the target virtual machine in the target CPU unit to other CPU units, that is, the target virtual machine no longer uses the core of the target CPU unit, and will not be affected by the frequency reduction of the target CPU unit.

[0068] Optionally, when migrating the target virtual machines, not all target virtual machines are migrated, but one or more target virtual machines whose number of cores used by the target CPU unit is not 0 and whose number of cores used by the target CPU unit is the least are migrated (the services on the cores used by these target virtual machines in the target CPU unit are migrated to other CPU units) to avoid excessive migration bandwidth.

[0069] Based on any of the above embodiments, before migrating the target virtual machine, it can also be determined whether the target virtual machine is allowed to be migrated; if it is determined that the target virtual machine is allowed to be migrated, the target virtual machine is migrated; otherwise, if the target virtual machine is not allowed to be migrated, the target virtual machine is not migrated.

[0070] Optionally, when determining whether the target virtual machine is allowed to be migrated, a variety of factors may be considered, such as determining whether the target virtual machine is preset with a label that allows migration (or a label that does not allow migration), and whether the target virtual machine is allowed to migrate can be determined based on the label; in addition, the target virtual machine is also preset with a protection level, some of which allow migration and some of which do not, and it can be determined whether the protection level of the target virtual machine is a protection level that allows migration, thereby determining whether the target virtual machine is allowed to migrate; of course, other factors may also be considered in determining whether migration is allowed, which are not limited here.

[0071] On this basis, if the target virtual machine is preset with a tag allowing migration, and / or the protection level of the target virtual machine meets the protection level allowing migration, it is determined that the target virtual machine is allowed to be migrated.

[0072] Optionally, after the target virtual machine is screened out, a risk notification may be performed to notify the tenant that the target virtual machine is affected by the frequency reduction, and the tenant may be requested whether to migrate. After the tenant determines to migrate, the target virtual machine is migrated.

[0073] Based on any of the above embodiments, when collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment in S201, the following may be specifically included:

[0074] The frequency fluctuation of each CPU unit in the host machine is collected at a first preset time interval and added to a message queue. The frequency fluctuation of each CPU unit is consumed from the message queue by a stream data processing engine, and the frequency fluctuation of the same CPU unit is filtered to filter out abnormal frequency fluctuations.

[0075] In this embodiment, the frequency fluctuation of each CPU unit in the host machine can be collected and sent to the metrics server at a first preset time interval. The downstream adds the frequency fluctuation of each CPU unit to a message queue (such as Kafka) through a data task, and then the stream data processing engine (such as Flink) consumes the frequency fluctuation of each CPU unit from the message queue, filters the frequency fluctuation of the same CPU unit, and filters out abnormal frequency fluctuations, such as some abnormal frequency fluctuations with large deviations.

[0076] When collecting the CPU utilization of each tenant virtual machine in the host machine, the CPU utilization of each tenant virtual machine in the host machine can also be collected to the metrics server at a preset time interval. The CPU utilization of each tenant virtual machine is added to the message queue (such as Kafka) downstream through the data task, and then the stream data processing engine (such as Flink) consumes the CPU utilization of each tenant virtual machine from the message queue.

[0077] By screening out risky virtual machines from each tenant virtual machine based on the frequency fluctuation of each CPU unit and the CPU utilization of each tenant virtual machine, the risky virtual machines are stored in another message queue (such as Kafka) for subsequent fine-grained screening. The subsequent fine-grained screening process can consume risky virtual machines from the message queue for fine-grained screening, which may include but is not limited to filtering, sorting, and verification of whether migration is allowed.

[0078] Based on any of the above embodiments, Figure 4 As shown, the method also includes:

[0079] S301, obtaining the historical CPU usage of each tenant virtual machine, and adding a label to each tenant according to the historical CPU usage, wherein the label includes a high-load business type label and a low-load business type label;

[0080] S302: After receiving a virtual machine creation request from any tenant among the tenants, determine a host machine and / or CPU unit for creating the tenant's virtual machine according to the tenant's label, and create the tenant's virtual machine according to the virtual machine creation request.

[0081] In this embodiment, the historical CPU usage of each tenant virtual machine in the host machine can be obtained, and a corresponding business profile of each tenant can be made based on the historical CPU usage, that is, the business load of the tenant can be determined, and then a label can be added to each tenant, where the label includes a high-load business type label and a low-load business type label. When any of these tenants creates a new virtual machine, that is, when the tenant's virtual machine creation request is received, a suitable host machine and / or CPU unit can be selected according to the tenant's label to create a new virtual machine for the tenant, wherein the virtual machines of tenants with high-load business type labels are isolated on different host machines as much as possible in combination with the online scheduling anti-affinity capability, and the tenant virtual machines are reasonably deployed in advance to avoid frequency reduction as much as possible and prevent the impact of frequency reduction on tenant business.

[0082] When obtaining the historical CPU usage of each tenant virtual machine, it includes:

[0083] The CPU utilization of each tenant's virtual machine is collected at a second preset time interval and stored in the analytical database;

[0084] The analytical database is used to determine the CPU utilization corresponding to the preset quantiles of the CPU utilization of the same tenant virtual machine at different times, and determine it as the historical CPU utilization of the tenant virtual machine.

[0085] In this embodiment, the CPU utilization of each tenant's virtual machine is collected at every second preset time interval and analyzed using an analytical database, wherein the analytical database may be an OLAP data clickhouse or any other analytical database. By analyzing the CPU utilization (time series data) of the same tenant's virtual machine at different historical times, the CPU utilization corresponding to the preset percentile of the CPU utilization is found, such as P99 (99% percentile) or P90 (90% percentile), and determined as the historical CPU utilization of the tenant's virtual machine. When the historical CPU utilization of the tenant's virtual machine exceeds a preset threshold, it is determined to be a high-load business type, and a high-load business type label is added to the tenant through a labeling service.

[0086] Corresponding to the public cloud downscaling risk identification method in the above embodiment, Figure 5 This is a structural block diagram of a public cloud downscaling risk identification device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 5 The public cloud frequency reduction risk identification device 500 includes: a CPU frequency fluctuation collection unit 501, a CPU utilization collection unit 502, and an identification unit 503.

[0087] The CPU frequency fluctuation collection unit 501 is used to collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores;

[0088] A CPU utilization collection unit 502 is used to collect the CPU utilization of each tenant virtual machine in the host machine;

[0089] The identification unit 503 is used to screen out risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilizations of the tenant virtual machines.

[0090] In one or more embodiments of the present disclosure, when screening risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization of the tenant virtual machines, the identification unit 503 is used to:

[0091] If the frequency fluctuation of any target CPU unit downclocking exceeds a preset fluctuation threshold, a tenant virtual machine whose CPU utilization is greater than a preset CPU utilization threshold is screened from the tenant virtual machines and determined as the risky virtual machine.

[0092] In one or more embodiments of the present disclosure, after screening out risky virtual machines, the identification unit 503 is further configured to:

[0093] According to a preset detection rule, it is detected whether the risky virtual machine is a target virtual machine affected by frequency reduction.

[0094] In one or more embodiments of the present disclosure, when the identification unit 503 detects whether the risky virtual machine is a target virtual machine affected by frequency reduction according to a preset detection rule, it is configured to:

[0095] Determine whether the tenant corresponding to the risky virtual machine belongs to a preset tenant set, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0096] Determine whether the risky virtual machine exclusively occupies the host machine, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0097] According to the number of cores of the target CPU unit used by the risk virtual machine, it is detected whether the risk virtual machine is a target virtual machine affected by frequency reduction.

[0098] In one or more embodiments of the present disclosure, when the identification unit 503 detects whether the risky virtual machine is a target virtual machine affected by frequency reduction according to the number of cores of the target CPU unit used by the risky virtual machine, it is configured to:

[0099] If the number of cores of the target CPU unit used by the risky virtual machine is not 0 and is less than a preset core number threshold, determining that the risky virtual machine is a target virtual machine affected by frequency reduction; or

[0100] sorting the risk virtual machines whose core numbers using the target CPU unit are not 0 according to the core numbers using the target CPU unit, and determining one or more risk virtual machines with the least core numbers using the target CPU unit in the sorting as target virtual machines affected by frequency reduction; or

[0101] If the number of cores of the target CPU unit used by the risky virtual machine is 0, it is determined that the risky virtual machine is not a target virtual machine affected by frequency reduction.

[0102] In one or more embodiments of the present disclosure, the device further includes a scheduling unit 504504, configured to migrate the target virtual machine after determining that the risky virtual machine is a target virtual machine affected by frequency reduction.

[0103] In one or more embodiments of the present disclosure, when migrating the target virtual machine, the scheduling unit 504 is used to:

[0104] Migrate one or more target virtual machines whose number of cores using the target CPU unit is not 0 and whose number of cores using the target CPU unit is the least.

[0105] In one or more embodiments of the present disclosure, when migrating the target virtual machine, the scheduling unit 504 is used to:

[0106] Determine whether the target virtual machine is allowed to be migrated;

[0107] If it is determined that the target virtual machine is allowed to be migrated, the target virtual machine is migrated.

[0108] In one or more embodiments of the present disclosure, when determining whether the target virtual machine is allowed to be migrated, the scheduling unit 504 is configured to:

[0109] If the target virtual machine is preset with a tag allowing migration, and / or the protection level of the target virtual machine meets the protection level allowing migration, it is determined that the target virtual machine is allowed to be migrated.

[0110] In one or more embodiments of the present disclosure, when collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment, the CPU utilization collection unit 502 is used to:

[0111] The frequency fluctuation of each CPU unit in the host machine is collected at a first preset time interval and added to a message queue. The frequency fluctuation of each CPU unit is consumed from the message queue by a stream data processing engine, and the frequency fluctuation of the same CPU unit is filtered to filter out abnormal frequency fluctuations.

[0112] In one or more embodiments of the present disclosure, when collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment, the CPU frequency fluctuation collection unit 501 is used to:

[0113] For any CPU unit, obtain the frequency difference between the actual operating frequency and the expected operating frequency of each core of the CPU unit;

[0114] The frequency difference of each core of the CPU unit is aggregated to obtain the frequency fluctuation of the CPU unit.

[0115] In one or more embodiments of the present disclosure, the CPU frequency fluctuation collection unit 501 is further used to obtain the historical CPU usage of each tenant virtual machine;

[0116] The scheduling unit 504 is also used to add labels to each of the tenants according to the historical CPU usage, and the labels include high-load business type labels and low-load business type labels; after receiving a virtual machine creation request from any of the tenants, determine the host machine and / or CPU unit used to create the tenant's virtual machine according to the tenant's label, and create the tenant virtual machine according to the virtual machine creation request.

[0117] In one or more embodiments of the present disclosure, when acquiring the historical CPU usage of each tenant virtual machine, the CPU frequency fluctuation collection unit 501 is used to:

[0118] The CPU utilization of each tenant's virtual machine is collected at a second preset time interval and stored in the analytical database;

[0119] The analytical database is used to determine the CPU utilization corresponding to the preset quantiles of the CPU utilization of the same tenant virtual machine at different times, and determine it as the historical CPU utilization of the tenant virtual machine.

[0120] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0121] refer to Figure 6, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure, and the electronic device 600 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0122] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0123] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0124] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0125] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0126] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0127] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0128] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0130] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0131] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0132] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0133] In a first aspect, according to one or more embodiments of the present disclosure, a method for identifying a risk of downscaling in a public cloud is provided, comprising:

[0134] Collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores;

[0135] Collecting the CPU utilization of each tenant virtual machine in the host machine;

[0136] According to the frequency fluctuation of each CPU unit and the CPU utilization rate of each tenant virtual machine, risky virtual machines are screened out from the tenant virtual machines.

[0137] According to one or more embodiments of the present disclosure, screening risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization of the tenant virtual machines includes:

[0138] If the frequency fluctuation of any target CPU unit downclocking exceeds a preset fluctuation threshold, a tenant virtual machine whose CPU utilization is greater than a preset CPU utilization threshold is screened from the tenant virtual machines and determined as the risky virtual machine.

[0139] According to one or more embodiments of the present disclosure, after screening out risky virtual machines, the method further includes:

[0140] According to a preset detection rule, it is detected whether the risky virtual machine is a target virtual machine affected by frequency reduction.

[0141] According to one or more embodiments of the present disclosure, the detecting, according to a preset detection rule, whether the risky virtual machine is a target virtual machine affected by frequency reduction includes:

[0142] Determine whether the tenant corresponding to the risky virtual machine belongs to a preset tenant set, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0143] Determine whether the risky virtual machine exclusively occupies the host machine, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0144] According to the number of cores of the target CPU unit used by the risk virtual machine, it is detected whether the risk virtual machine is a target virtual machine affected by frequency reduction.

[0145] According to one or more embodiments of the present disclosure, the detecting, according to the number of cores of the target CPU unit used by the risk virtual machine, whether the risk virtual machine is a target virtual machine affected by frequency reduction includes:

[0146] If the number of cores of the target CPU unit used by the risky virtual machine is not 0 and is less than a preset core number threshold, determining that the risky virtual machine is a target virtual machine affected by frequency reduction; or

[0147] sorting the risk virtual machines whose core numbers using the target CPU unit are not 0 according to the core numbers using the target CPU unit, and determining one or more risk virtual machines with the least core numbers using the target CPU unit in the sorting as target virtual machines affected by frequency reduction; or

[0148] If the number of cores of the target CPU unit used by the risky virtual machine is 0, it is determined that the risky virtual machine is not a target virtual machine affected by frequency reduction.

[0149] According to one or more embodiments of the present disclosure, after determining that the risky virtual machine is a target virtual machine affected by frequency reduction, the method further includes:

[0150] The target virtual machine is migrated.

[0151] According to one or more embodiments of the present disclosure, migrating the target virtual machine includes:

[0152] Migrate one or more target virtual machines whose number of cores using the target CPU unit is not 0 and whose number of cores using the target CPU unit is the least.

[0153] According to one or more embodiments of the present disclosure, migrating the target virtual machine includes:

[0154] Determine whether the target virtual machine is allowed to be migrated;

[0155] If it is determined that the target virtual machine is allowed to be migrated, the target virtual machine is migrated.

[0156] According to one or more embodiments of the present disclosure, the determining whether the target virtual machine is allowed to be migrated includes:

[0157] If the target virtual machine is preset with a tag allowing migration, and / or the protection level of the target virtual machine meets the protection level allowing migration, it is determined that the target virtual machine is allowed to be migrated.

[0158] According to one or more embodiments of the present disclosure, collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment includes:

[0159] The frequency fluctuation of each CPU unit in the host machine is collected at a first preset time interval and added to a message queue. The frequency fluctuation of each CPU unit is consumed from the message queue by a stream data processing engine, and the frequency fluctuation of the same CPU unit is filtered to filter out abnormal frequency fluctuations.

[0160] According to one or more embodiments of the present disclosure, collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment includes:

[0161] For any CPU unit, obtain the frequency difference between the actual operating frequency and the expected operating frequency of each core of the CPU unit;

[0162] The frequency difference of each core of the CPU unit is aggregated to obtain the frequency fluctuation of the CPU unit.

[0163] According to one or more embodiments of the present disclosure, the method further includes:

[0164] Obtaining the historical CPU usage of each tenant virtual machine, and adding a label to each tenant according to the historical CPU usage, wherein the label includes a high-load business type label and a low-load business type label;

[0165] After receiving a virtual machine creation request from any tenant among the tenants, a host machine and / or CPU unit for creating the tenant virtual machine is determined according to the tenant's label, and the tenant virtual machine is created according to the virtual machine creation request.

[0166] According to one or more embodiments of the present disclosure, obtaining the historical CPU usage of each tenant virtual machine includes:

[0167] The CPU utilization of each tenant's virtual machine is collected at a second preset time interval and stored in the analytical database;

[0168] The analytical database is used to determine the CPU utilization corresponding to the preset quantiles of the CPU utilization of the same tenant virtual machine at different times, and determine it as the historical CPU utilization of the tenant virtual machine.

[0169] In a second aspect, according to one or more embodiments of the present disclosure, a public cloud downscaling risk identification device is provided, including:

[0170] A CPU frequency fluctuation collection unit is used to collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores;

[0171] A CPU utilization collection unit, used to collect the CPU utilization of each tenant virtual machine in the host machine;

[0172] The identification unit is used to screen out risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization rates of the tenant virtual machines.

[0173] According to one or more embodiments of the present disclosure, when screening risky virtual machines from the tenant virtual machines according to the frequency fluctuations of the CPU units and the CPU utilization of the tenant virtual machines, the identification unit is used to:

[0174] If the frequency fluctuation of any target CPU unit downclocking exceeds a preset fluctuation threshold, a tenant virtual machine whose CPU utilization is greater than a preset CPU utilization threshold is screened from the tenant virtual machines and determined as the risky virtual machine.

[0175] According to one or more embodiments of the present disclosure, after screening out risky virtual machines, the identification unit is further used to:

[0176] According to a preset detection rule, it is detected whether the risky virtual machine is a target virtual machine affected by frequency reduction.

[0177] According to one or more embodiments of the present disclosure, when the identification unit detects whether the risky virtual machine is a target virtual machine affected by frequency reduction according to a preset detection rule, it is configured to:

[0178] Determine whether the tenant corresponding to the risky virtual machine belongs to a preset tenant set, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0179] Determine whether the risky virtual machine exclusively occupies the host machine, and if so, determine that the risky virtual machine is not a target virtual machine affected by frequency reduction; and / or

[0180] According to the number of cores of the target CPU unit used by the risk virtual machine, it is detected whether the risk virtual machine is a target virtual machine affected by frequency reduction.

[0181] According to one or more embodiments of the present disclosure, when the identification unit detects whether the risky virtual machine is a target virtual machine affected by frequency reduction according to the number of cores of the target CPU unit used by the risky virtual machine, it is configured to:

[0182] If the number of cores of the target CPU unit used by the risky virtual machine is not 0 and is less than a preset core number threshold, determining that the risky virtual machine is a target virtual machine affected by frequency reduction; or

[0183] sorting the risk virtual machines whose core numbers using the target CPU unit are not 0 according to the core numbers using the target CPU unit, and determining one or more risk virtual machines with the least core numbers using the target CPU unit in the sorting as target virtual machines affected by frequency reduction; or

[0184] If the number of cores of the target CPU unit used by the risky virtual machine is 0, it is determined that the risky virtual machine is not a target virtual machine affected by frequency reduction.

[0185] According to one or more embodiments of the present disclosure, the device further includes a scheduling unit, configured to migrate the target virtual machine after determining that the risky virtual machine is a target virtual machine affected by frequency reduction.

[0186] According to one or more embodiments of the present disclosure, when migrating the target virtual machine, the scheduling unit is used to:

[0187] Migrate one or more target virtual machines whose number of cores using the target CPU unit is not 0 and whose number of cores using the target CPU unit is the least.

[0188] According to one or more embodiments of the present disclosure, when migrating the target virtual machine, the scheduling unit is used to:

[0189] Determine whether the target virtual machine is allowed to be migrated;

[0190] If it is determined that the target virtual machine is allowed to be migrated, the target virtual machine is migrated.

[0191] According to one or more embodiments of the present disclosure, when determining whether the target virtual machine is allowed to be migrated, the scheduling unit is configured to:

[0192] If the target virtual machine is preset with a tag allowing migration, and / or the protection level of the target virtual machine meets the protection level allowing migration, it is determined that the target virtual machine is allowed to be migrated.

[0193] According to one or more embodiments of the present disclosure, when collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment, the CPU utilization collection unit is used to:

[0194] The frequency fluctuation of each CPU unit in the host machine is collected at a first preset time interval and added to a message queue. The frequency fluctuation of each CPU unit is consumed from the message queue by a stream data processing engine, and the frequency fluctuation of the same CPU unit is filtered to filter out abnormal frequency fluctuations.

[0195] According to one or more embodiments of the present disclosure, when collecting frequency fluctuations of each CPU unit in a host machine in a public cloud environment, the CPU frequency fluctuation collection unit is used to:

[0196] For any CPU unit, obtain the frequency difference between the actual operating frequency and the expected operating frequency of each core of the CPU unit;

[0197] The frequency difference of each core of the CPU unit is aggregated to obtain the frequency fluctuation of the CPU unit.

[0198] According to one or more embodiments of the present disclosure, the CPU frequency fluctuation collection unit is further used to obtain the historical CPU usage rate of each tenant virtual machine;

[0199] The scheduling unit is also used to add labels to each of the tenants according to historical CPU usage, and the labels include high-load business type labels and low-load business type labels; after receiving a virtual machine creation request from any of the tenants, determine the host machine and / or CPU unit used to create the tenant's virtual machine according to the tenant's label, and create the tenant virtual machine according to the virtual machine creation request.

[0200] According to one or more embodiments of the present disclosure, when acquiring the historical CPU usage of each tenant virtual machine, the CPU frequency fluctuation collection unit is used to:

[0201] The CPU utilization of each tenant's virtual machine is collected at a second preset time interval and stored in the analytical database;

[0202] The analytical database is used to determine the CPU utilization corresponding to the preset quantiles of the CPU utilization of the same tenant virtual machine at different times, and determine it as the historical CPU utilization of the tenant virtual machine.

[0203] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0204] The memory stores computer-executable instructions;

[0205] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the public cloud frequency reduction risk identification method as described in the first aspect and various possible designs of the first aspect.

[0206] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the public cloud frequency reduction risk identification method described in the first aspect and various possible designs of the first aspect is implemented.

[0207] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including computer execution instructions. When a processor executes the computer execution instructions, the public cloud frequency reduction risk identification method described in the first aspect and various possible designs of the first aspect is implemented.

[0208] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0209] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0210] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for identifying the risk of downscaling in a public cloud, characterized in that: include: Collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; each CPU unit includes multiple cores; for any CPU unit, obtain the sum of frequency differences between an actual operating frequency and an expected operating frequency of each core of the CPU unit, and the sum of the expected operating frequencies of each core, and determine the frequency fluctuation of the CPU unit according to the ratio of the sum of the frequency differences to the sum of the expected operating frequencies; Collecting the CPU utilization of each tenant virtual machine in the host machine; According to the frequency fluctuation of each CPU unit and the CPU utilization of each tenant virtual machine, when the frequency fluctuation of any target CPU unit exceeds a preset fluctuation threshold, a tenant virtual machine whose CPU utilization is greater than a preset CPU utilization threshold is screened out from the tenant virtual machines and determined as a risky virtual machine; According to a preset detection rule, it is detected whether the risky virtual machine is a target virtual machine that is actually affected by the frequency reduction; wherein the preset detection rule is configured based on the deployment information of the tenant virtual machine.

2. The method according to claim 1, characterized in that The detecting, according to a preset detection rule, whether the risky virtual machine is a target virtual machine that is actually affected by the frequency reduction includes: Determine whether the tenant corresponding to the risky virtual machine belongs to a preset tenant set, and if so, determine that the risky virtual machine is not a target virtual machine that is actually affected by the frequency reduction; and / or Determine whether the risky virtual machine exclusively occupies the host machine, and if so, determine that the risky virtual machine is not a target virtual machine that is actually affected by the frequency reduction; and / or According to the number of cores of the target CPU unit used by the risky virtual machine, it is detected whether the risky virtual machine is a target virtual machine that is actually affected by the frequency reduction.

3. The method according to claim 2, characterized in that The detecting, according to the number of cores of the target CPU unit used by the risk virtual machine, whether the risk virtual machine is a target virtual machine that is actually affected by the frequency reduction comprises: If the number of cores of the target CPU unit used by the risky virtual machine is not 0 and is less than a preset core number threshold, then the risky virtual machine is determined to be a target virtual machine that is actually affected by the frequency reduction; or sorting the risk virtual machines whose core numbers using the target CPU unit are not 0 according to the core numbers using the target CPU unit, and determining one or more risk virtual machines with the least core numbers using the target CPU unit in the sorting as the target virtual machines that are actually affected by the frequency reduction; or If the number of cores of the target CPU unit used by the risky virtual machine is 0, it is determined that the risky virtual machine is not a target virtual machine that is actually affected by the frequency reduction.

4. The method according to any one of claims 1 to 3, characterized in that: After determining that the risky virtual machine is a target virtual machine that is actually affected by the frequency reduction, the method further includes: The target virtual machine is migrated.

5. The method according to claim 4, characterized in that The migrating the target virtual machine includes: Migrate one or more target virtual machines whose number of cores using the target CPU unit is not 0 and whose number of cores using the target CPU unit is the least.

6. The method according to claim 4, characterized in that The migrating the target virtual machine includes: Determine whether the target virtual machine is allowed to be migrated; If it is determined that the target virtual machine is allowed to be migrated, the target virtual machine is migrated.

7. The method according to claim 6, characterized in that The determining whether the target virtual machine is allowed to be migrated includes: If the target virtual machine is preset with a tag allowing migration, and / or the protection level of the target virtual machine meets the protection level allowing migration, it is determined that the target virtual machine is allowed to be migrated.

8. The method according to claim 1, characterized in that The collecting frequency fluctuations of each CPU unit in the host machine in the public cloud environment includes: The frequency fluctuation of each CPU unit in the host machine is collected at a first preset time interval and added to a message queue. The frequency fluctuation of each CPU unit is consumed from the message queue by a stream data processing engine, and the frequency fluctuation of the same CPU unit is filtered to filter out abnormal frequency fluctuations.

9. The method according to claim 1, characterized in that: The collecting frequency fluctuations of each CPU unit in the host machine in the public cloud environment includes: For any CPU unit, obtain the frequency difference between the actual operating frequency and the expected operating frequency of each core of the CPU unit; The frequency difference of each core of the CPU unit is aggregated to obtain the frequency fluctuation of the CPU unit.

10. The method according to claim 1, characterized in that The method further comprises: Obtaining the historical CPU usage of each tenant virtual machine, and adding a label to each tenant according to the historical CPU usage, wherein the label includes a high-load business type label and a low-load business type label; After receiving a virtual machine creation request from any tenant among the tenants, a host machine and / or CPU unit for creating the tenant virtual machine is determined according to the tenant's label, and the tenant virtual machine is created according to the virtual machine creation request.

11. The method according to claim 10, characterized in that The obtaining of the historical CPU usage of each tenant virtual machine includes: The CPU utilization of each tenant's virtual machine is collected at a second preset time interval and stored in the analytical database; The analytical database is used to determine the CPU utilization corresponding to the preset quantiles of the CPU utilization of the same tenant virtual machine at different times, and determine it as the historical CPU utilization of the tenant virtual machine.

12. A public cloud downscaling risk identification device, characterized in that: include: A CPU frequency fluctuation collection unit, used to collect frequency fluctuations of each CPU unit in a host machine in a public cloud environment; wherein each CPU unit includes multiple cores; wherein, for any CPU unit, the sum of the frequency differences between the actual operating frequency and the expected operating frequency of each core of the CPU unit and the sum of the expected operating frequencies of each core are obtained, and the frequency fluctuation of the CPU unit is determined according to the ratio of the sum of the frequency differences to the sum of the expected operating frequencies; A CPU utilization collection unit, used to collect the CPU utilization of each tenant virtual machine in the host machine; The identification unit is used to screen out tenant virtual machines whose CPU utilization is greater than a preset CPU utilization threshold from among the tenant virtual machines according to the frequency fluctuation of each CPU unit and the CPU utilization of each tenant virtual machine when the frequency fluctuation of any target CPU unit exceeds a preset fluctuation threshold, and determine them as risky virtual machines; according to preset detection rules, detect whether the risky virtual machine is a target virtual machine that is actually affected by frequency reduction; wherein the preset detection rules are configured based on the deployment information of the tenant virtual machine.

13. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 11 is implemented.

15. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Migrating virtual machines

    CN103827823A

  • Method for non-uniform I / O access of virtual machine resource migration in virtual multi-nuclear environment

    CN106095576A

  • An application-aware virtual machine scheduling method for load balancing in IaaS environment

    CN109343931A