Virtual machine scheduling method, electronic device and storage medium
By filtering and sorting physical machines, virtual machines are ensured to run in a stable environment that meets the specifications, thus resolving the impact of physical machine anomalies on virtual machine performance and achieving more efficient virtual machine scheduling.
Patent Information
- Application Number
- CN202210429417.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-04-22
AI Technical Summary
Anomalies in physical machines on cloud platforms can affect virtual machine performance, and existing technologies struggle to effectively screen and avoid these anomalies from impacting virtual machine performance.
By defining the specifications of the virtual machine, physical machines that meet the specifications are filtered out, physical machines with abnormal tags that do not match the application type are deleted, and target physical machines are selected according to the set rules to ensure that the virtual machine runs in a stable environment.
It effectively reduces the impact of physical machine anomalies on virtual machine performance, and improves the stability and performance of virtual machine operation.
Smart Images

Figure CN114924832B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a virtual machine scheduling method, an electronic device, and a storage medium. Background Technology
[0002] With the development of cloud computing, cloud platforms have hundreds of thousands or even millions of physical servers. The large number of physical servers inevitably leads to some hardware and software vulnerabilities and anomalies during operation. However, these vulnerabilities and anomalies may not be fatal, will not cause server downtime, and are not within the scope of server shutdown for maintenance. But these vulnerabilities may affect the performance and failure rate of some customers' virtual machines.
[0003] For example, some physical machines may have memory hardware that generates Correctable Error (CE) exceptions, which have no impact on most virtual machines. However, some customers may have deployed memory-sensitive applications on virtual machines, and CE exceptions may cause performance impacts on the virtual machines. Summary of the Invention
[0004] This application provides a virtual machine scheduling method to reduce the impact of physical machine malfunctions on virtual machine performance.
[0005] Accordingly, embodiments of this application also provide an electronic device and a storage medium to ensure the implementation and application of the above system.
[0006] To address the aforementioned problems, this application discloses a virtual machine scheduling method, the method comprising:
[0007] Determine the virtual machine's specification definition information;
[0008] Based on the specification definition information, physical machines are screened to determine at least one physical machine that meets the specification conditions;
[0009] According to the application type of the virtual machine, the at least one physical machine that meets the specification conditions is filtered, and physical machines with abnormal tags that match the application type are deleted.
[0010] The remaining physical machines are sorted according to the set rules, and the target physical machine is selected based on the corresponding sorting information.
[0011] Optionally, the step of filtering the at least one physical machine that meets the specification conditions according to the application type of the virtual machine, and deleting physical machines whose abnormal tags match the application type, includes:
[0012] Check whether the physical machines that meet the specifications have an abnormal label;
[0013] If an anomaly tag is present, then obtain the anomaly tag of the physical machine that meets the specification conditions;
[0014] Matching is performed using the aforementioned anomaly tags and application types;
[0015] If the anomaly label and application type are specified, then the physical machine corresponding to the anomaly label is deleted.
[0016] Optionally, the anomaly label includes at least one of the following: control plane anomaly label, computing performance anomaly label, memory performance anomaly label, network performance anomaly label, hardware anomaly label, and fatal anomaly label;
[0017] The application types include at least one of the following: compute-intensive, network-intensive, storage-intensive, and critical protection types.
[0018] Optionally, sorting the remaining physical machines according to a set rule includes:
[0019] Obtain constraint information, and determine the weight information of the remaining physical machines based on the constraint information;
[0020] The remaining physical machines are weighted according to the weight information to obtain the weight values of the remaining physical machines;
[0021] The remaining physical machines are sorted according to the weights.
[0022] Optionally, obtaining constraint information and determining the weight information of the remaining physical machines based on the constraint information includes:
[0023] Obtain resource constraint information, and determine the first weight of the remaining virtual machines according to the resource constraint information and specification definition information;
[0024] Obtain condition constraint information, and determine the second weight of the remaining virtual machines based on the condition constraint information;
[0025] The virtual machines with anomaly tags among the remaining virtual machines are assigned a third weight according to the anomaly tags.
[0026] Optional, also includes:
[0027] Collect runtime information of the physical machine and analyze whether the physical machine has any abnormalities based on the runtime information;
[0028] If the physical machine is abnormal, determine the abnormality type of the physical machine and set an abnormality label.
[0029] Optional, also includes:
[0030] Once the anomaly detected in a physical machine disappears, the anomaly label on that physical machine is removed.
[0031] Optionally, the specification definition information includes at least one of the following: CPU requirement information, memory requirement information, hard disk requirement information, and network requirement information;
[0032] Determining the virtual machine specification definition information includes at least one of the following steps:
[0033] Receive a virtual machine scheduling request and obtain specification definition information from the scheduling request;
[0034] When determining whether the application type of the virtual machine matches the anomaly tag of the physical machine, the specification definition information of the virtual machine is obtained;
[0035] When it is determined that a specified fault has occurred in the physical machine where the virtual machine is located, the specification definition information of the virtual machine is obtained.
[0036] Optionally, it may also include at least one step of determining the application type:
[0037] When the virtual machine runs for the first time, the application type is determined based on the user association information of the virtual machine.
[0038] After the virtual machine has been running for a set period of time, the running information of the virtual machine is obtained, and the application type of the virtual machine is analyzed based on the running information.
[0039] Optionally, the target physical machine can be selected based on the corresponding sorting information, including:
[0040] When the virtual machine has a malicious label, the physical machine that is already running the virtual machine with the malicious label is set as the target physical machine, or an idle physical machine is set as the target physical machine.
[0041] Optionally, the physical machines are screened based on the specification definition information to determine at least one physical machine that meets the specification conditions, including:
[0042] Obtain hardware resource information of the physical machine;
[0043] The hardware resource information of physical machines is filtered using specification definition information to determine at least one physical machine that meets the specification conditions.
[0044] This application also discloses an electronic device, including: a processor; and a memory storing executable code thereon, wherein when the executable code is executed by the processor, the method described in this application is performed.
[0045] This application also discloses one or more machine-readable media storing executable code thereon, which, when executed by a processor, performs the method described in this application.
[0046] Compared with the prior art, the embodiments of this application have the following advantages:
[0047] In this embodiment, the specification definition information of the virtual machine can be determined, and then the physical machines can be filtered according to the specification definition information to determine at least one physical machine that meets the specification conditions. Then, the at least one physical machine that meets the specification conditions can be filtered according to the application type of the virtual machine, and physical machines whose abnormal tags match the application type can be deleted, thereby filtering out abnormal physical machines and reducing the impact of physical machine abnormalities on virtual machine performance. Then, the remaining physical machines are sorted according to the set rules, and the target physical machine is selected according to the corresponding sorting information. The virtual machine is set on the target physical machine to ensure the performance of the virtual machine. Attached Figure Description
[0048] Figure 1 This is a schematic diagram illustrating an example of a cloud service system according to an embodiment of this application;
[0049] Figure 2 This is a flowchart illustrating the steps of an embodiment of a virtual machine scheduling method according to this application;
[0050] Figure 3 This is a schematic diagram illustrating a physical machine tag matching example according to an embodiment of this application;
[0051] Figure 4 This is a flowchart illustrating the steps of another embodiment of the virtual machine scheduling method of this application;
[0052] Figure 5 This is a flowchart illustrating the steps of another embodiment of the virtual machine scheduling method of this application;
[0053] Figure 6 This is a schematic diagram of the structure of an exemplary device provided in one embodiment of this application. Detailed Implementation
[0054] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] This application can be applied to cloud service systems, which contain hundreds of thousands or even millions of physical machine servers (hereinafter referred to as physical machines). One or more virtual machines (VMs) can run on these physical machines to provide corresponding cloud services. Therefore, various anomalies, such as software or hardware failures, of physical machines can affect the VMs running on them. This application can schedule the physical machines hosting the VMs to provide a more stable operating environment for them.
[0056] Reference Figure 1 The cloud service system shown includes: physical machines and a management terminal. The management terminal includes a scheduling component, a tagging component, a diagnostic component, and a data acquisition component. The physical machines include a data acquisition agent so that the data acquisition component can acquire the required data from the physical machines.
[0057] The acquisition component has an acquisition agent set up in each physical machine to collect runtime information of the physical machine, such as CPU, memory, network, processes, hardware, serial port and other information. The collected information will be reported to the diagnostic system.
[0058] The diagnostic component is used to diagnose and report anomalies in the physical machine. It analyzes the runtime information of the physical machine collected by the acquisition component to determine if there are any anomalies in the physical machine's data. The types of physical machine anomalies can include at least one of the following: control plane anomalies, computing performance anomalies, memory performance anomalies, network performance anomalies, hardware anomalies, and fatal anomalies. Specifically, runtime information can be used to analyze whether the physical machine is abnormal and the type of anomaly. For example, if runtime information detects that some virtual machines on the physical machine have failed to start / shut down, it can be identified as a control plane anomaly. If runtime information detects that the CPU performance of the physical machine is affected, such as LLC (Last Level Cache) contention, it can be identified as a computing performance anomaly. If runtime information detects that the memory performance of the physical machine is affected, such as memory CE anomalies, it can be identified as a memory performance anomaly. If runtime information detects that the network performance of the physical machine is affected, such as the physical machine's outbound traffic being full, it can be identified as a network performance anomaly. If runtime information detects that a component on the physical machine has suffered hardware damage, it can be identified as a hardware anomaly. If runtime information detects that the physical machine has crashed, it can be identified as a fatal anomaly. After diagnosing an anomaly in a physical machine, the diagnostic component can generate an anomaly tag for that physical machine and send it to the tagging system. If, after a period of time following the occurrence of the anomaly, the diagnostic system does not analyze and find that the physical machine continues to generate the corresponding anomaly, it will cancel the anomaly tag for that physical machine, such as by reporting the tagging component to delete the anomaly tag.
[0059] Therefore, in one optional embodiment, runtime information of the physical machine is collected, and the physical machine is analyzed based on the runtime information to determine whether there is an anomaly. If the physical machine has an anomaly, the anomaly type of the physical machine is determined and an anomaly label is set. When the anomaly corresponding to the detected physical machine disappears, the anomaly label of the physical machine is removed.
[0060] The tagging component is used to record abnormal information such as abnormal tags for each physical machine. For example, physical machine 1 has abnormal tags for control plane abnormality and computing performance abnormality, physical machine 2 has abnormal tags for network performance abnormality and storage performance abnormality, and physical machine 3 has no abnormality, etc. The abnormal tags include at least one of the following: control plane abnormality tag, computing performance abnormality tag, memory performance abnormality tag, network performance abnormality tag, hardware abnormality tag, and fatal abnormality tag.
[0061] The scheduling component analyzes virtual machine information and combines it with anomaly tags for virtual machine scheduling. For example, if a virtual machine belongs to a compute-intensive application, it will avoid being scheduled to a physical machine with abnormal computing performance. By selecting an appropriate physical machine, the risk of virtual machine performance degradation is reduced.
[0062] Based on the aforementioned cloud service system, this paper discusses methods for scheduling virtual machines, referring to... Figure 3 As shown:
[0063] Step 202: Determine the virtual machine's specification definition information.
[0064] When scheduling a virtual machine, the virtual machine's specification definition information can be determined first. This specification definition information corresponds to the virtual machine's requirements for software and hardware resources. The specification definition information includes at least one of the following: CPU requirements, memory requirements, hard disk requirements, and network requirements. Furthermore, M types of specification definition information can be pre-set, each type corresponding to the required software and hardware resources. The virtual machine can then directly respond with the corresponding specification identifier to determine the specification definition information.
[0065] In one example, a virtual machine can actively request to schedule a physical machine. For instance, when a virtual machine runs on a platform for the first time, it can issue a scheduling request to request a physical machine. Or, after a virtual machine has been running on a physical machine on the platform for a period of time, if the physical machine encounters an abnormality or failure, it can issue a scheduling request to request a physical machine so that the virtual machine can be replaced with a different physical machine.
[0066] In other examples, when the scheduling component detects a conflict between the virtual machine and the physical machine, it can also proactively adjust the physical machine of the virtual machine and schedule it when the virtual machine restarts or is under low load.
[0067] Step 204: Based on the specification definition information, the physical machines are screened to determine at least one physical machine that meets the specification conditions.
[0068] Each physical machine corresponds to hardware resource information, including CPU information, memory information, hard disk information, network bandwidth information, etc. The hardware resources of physical machines can be matched using specification definition information to filter physical machines and determine at least one physical machine that meets the specification conditions. In one optional embodiment, filtering physical machines based on the specification definition information to determine at least one physical machine that meets the specification conditions includes: obtaining the hardware resource information of the physical machine; filtering the hardware resource information of the physical machine using the specification definition information to determine at least one physical machine that meets the specification conditions. Obtaining the hardware resource information of the physical machine: If a virtual machine is running on the physical machine, the remaining unused hardware resources or allocable hardware resources of the physical machine can also be determined based on the hardware resource information, thereby filtering the hardware resource information of the physical machine using the specification definition information to determine at least one physical machine that meets the specification conditions.
[0069] Step 206: Filter the at least one physical machine that meets the specification conditions according to the application type of the virtual machine, and delete physical machines whose abnormal tags match the application type.
[0070] In this embodiment, the virtual machine may correspond to an application type, which is the type information of the virtual machine's application characteristics. The application type includes at least one of the following: compute-intensive, network-intensive, storage-intensive, and critical security type. Compute-intensive virtual machines have more computational tasks, requiring more computing resources; network-intensive virtual machines have more network transmission tasks, requiring more network resources; storage-intensive virtual machines have more storage tasks, requiring more storage resources; critical security type virtual machines are high-priority virtual machines, such as those corresponding to high-priority users, i.e., virtual machines for key users.
[0071] In this embodiment, when the virtual machine runs for the first time, the application type of the virtual machine can be analyzed based on the user-related information corresponding to the virtual machine, such as the user's industry characteristics and user level information. After the virtual machine has been running for a period of time, the application type of the virtual machine can be determined based on its runtime information. Specifically, the runtime information of the virtual machine can be analyzed, the resource consumption information of the virtual machine can be determined based on the runtime information, and the application type of the virtual machine can be determined based on the resource consumption information.
[0072] When scheduling physical machines for virtual machines, information such as the application type of the virtual machine and the abnormal tags of the physical machine must be considered. Therefore, the application type of the virtual machine can be obtained, and then the abnormal tags of the physical machine can be queried from the tag component. If the physical machine has an abnormal tag, the abnormal tag can be obtained; otherwise, an empty value is returned. Then, at least one physical machine that meets the specification conditions can be filtered according to the application type of the virtual machine. For physical machines with abnormal tags, the abnormal tag and application type can be matched. If the abnormal tag matches the application type, the physical machine is determined not to meet the application conditions, and the physical machine with the abnormal tag matching the application type is deleted. If the abnormal tag does not match the application type, or the physical machine does not have an abnormal tag, then the physical machine meets the application conditions. The remaining physical machines can be obtained after filtering by application type.
[0073] Among these, control plane anomaly tags and fatal anomaly tags match all application types, thus filtering out physical machines with control plane anomaly tags. Critical protection type virtual machines are important virtual machines and match all anomaly types of physical machines, therefore filtering out all physical machines with anomaly tags for critical protection type virtual machines. Computational performance anomaly tags match compute-intensive and critical protection types, filtering out physical machines with computational performance anomaly tags for compute-intensive and critical protection type virtual machines. Network performance anomaly tags match network-intensive and critical protection types, filtering out physical machines with network performance anomaly tags for network-intensive and critical protection type virtual machines. Memory performance anomaly tags match storage-intensive and critical protection types, filtering out physical machines with memory performance anomaly tags for storage-intensive and critical protection type virtual machines.
[0074] Step 208: Sort the remaining physical machines according to the set rules, and select the target physical machine based on the corresponding sorting information.
[0075] For the remaining physical machines after anomaly screening, they can be sorted according to rules to determine the sorting order. Then, target physical machines are selected based on the corresponding sorting information. The rules can be set as needed, such as setting corresponding constraints. Sorting the remaining physical machines according to the set rules includes: obtaining constraint information; determining the weight information of the remaining physical machines based on the constraint information; weighting the remaining physical machines according to the weight information to obtain the weight values of the remaining physical machines; and sorting the remaining physical machines according to the weight values. The constraint information can be obtained according to the set rules. This constraint information is relevant to the selection of physical machines, such as resource constraints and condition constraints. Resource constraints are related to physical resources, such as whether the total resources of each physical server in each dimension can meet the resource requirements of the virtual machines placed on that server. Condition constraints are physical machine-related constraints, such as constraints for balancing remaining physical machine resources and constraints for averaging power consumption. The weight information for each physical machine can be determined based on this constraint information. Then, the weight information is weighted to obtain the weight value of each physical machine. The physical machines are then sorted in descending or ascending order of their weight values. The physical machine can then be selected according to the sorting order, such as selecting the first-ranked physical machine as the target physical machine, and the virtual machine is scheduled to run on that physical machine.
[0076] The process of obtaining constraint information and determining the weight information of the remaining physical machines based on the constraint information includes: obtaining resource constraint information and determining the first weight of the remaining virtual machines according to the resource constraint information and specification definition information; obtaining condition constraint information and determining the second weight of the remaining virtual machines according to the condition constraint information; and setting a third weight for virtual machines with anomaly tags among the remaining virtual machines according to the anomaly tags. Resource constraint information can be obtained, and then, according to the resource constraint information and specification definition information, it can be determined whether the remaining resources of each remaining physical machine meet the resource requirements of the virtual machine, and the first weight of that virtual machine can be set. Condition constraint information, such as resource balancing and power consumption averaging, can also be obtained, and then it can be determined whether the physical machines can meet the condition constraint information, and the second weight of each physical machine can be set. If a virtual machine has anomaly tags, a third weight can be set based on the anomaly tags to reduce the scheduling weight of the physical machines with anomaly tags. Thus, the physical machines are weighted according to their respective weights.
[0077] In summary, the virtual machine's specification definition information can be determined. Then, physical machines are filtered based on this specification definition information to identify at least one physical machine that meets the specification conditions. Next, the at least one physical machine that meets the specification conditions is filtered according to the application type of the virtual machine, and physical machines whose abnormal tags match the application type are deleted. This filters out abnormal physical machines, reducing the impact of physical machine software or hardware abnormalities on virtual machine performance. The remaining physical machines are then sorted according to set rules, and a target physical machine is selected based on the corresponding sorting information. The virtual machine is then set on the target physical machine to ensure virtual machine performance.
[0078] Based on the above embodiments, this application also provides a step of physical machine tag matching, referring to... Figure 3 As shown:
[0079] Step 302: The acquisition component acquires runtime information of the physical machine through the acquisition agent.
[0080] Step 304: The acquisition component sends runtime information to the diagnostic component.
[0081] Step 306: The diagnostic component analyzes whether the physical machine has any abnormalities based on the runtime information.
[0082] Step 308: If the physical machine has an anomaly, determine the anomaly type of the physical machine and set an anomaly label.
[0083] Specifically, once the anomaly corresponding to the detected physical machine disappears, the anomaly label of the physical machine is removed.
[0084] Step 310: The diagnostic component sends the abnormality label to the label component.
[0085] Step 312: The scheduling component obtains the abnormal tags of the physical machine from the tag component.
[0086] The scheduling component can select appropriate physical machines to mitigate the risk of virtual machine performance degradation. For example, it prevents any virtual machine from being scheduled to a physical machine with a control plane anomaly. Similarly, it prevents critically protected virtual machines and computationally sensitive virtual machines from being scheduled to physical machines with computational performance anomalies. It also prevents critically protected virtual machines and computationally sensitive virtual machines from being scheduled to physical machines with memory performance anomalies, network performance anomalies, hardware anomalies, and fatal anomalies. Furthermore, it prevents any virtual machine from being scheduled to a virtual machine with a fatal anomaly, and requires other virtual machines on that physical machine to undergo hot migration or restart scheduling.
[0087] In this embodiment, when the virtual machine runs for the first time, the application type is determined based on the user association information of the virtual machine; after the virtual machine has run for a set time, the running information of the virtual machine is obtained, and the application type of the virtual machine is analyzed based on the running information. The scheduling component can schedule the virtual machine in the following situations:
[0088] Initial scheduling: This is the first time the virtual machine runs on the cloud platform. Based on user-related information, such as the user's industry history or customer level, the virtual machine can be classified into one or more application types, such as compute-intensive, network-intensive, storage-intensive, and critical protection types.
[0089] Restart Scheduling: A virtual machine has been running on the cloud platform for a period of time. Based on its runtime information, it can be categorized into one or more application types, such as compute-intensive, network-intensive, storage-intensive, and critical protection-intensive. When a customer restarts the virtual machine, if the current application type matches the physical machine's anomaly information, a new physical machine can be selected for the virtual machine.
[0090] Hot migration scheduling: After a virtual machine has been running on the cloud platform for a period of time, it can be categorized into one or more application types based on its runtime information, such as compute-intensive, network-intensive, storage-intensive, and critical protection-intensive. When the virtual machine is under low load, if the application type of the current virtual machine matches the anomaly information of the physical machine, the virtual machine can be migrated to a new physical machine.
[0091] Operation and maintenance scheduling: If a certain physical machine experiences a specified failure, such as a serious anomaly or a crash, all virtual machines on that physical machine will be hot-migrated and restarted.
[0092] The scheduling component can perform the following scheduling behaviors:
[0093] Hidden danger: Physical machine weight reduction. The scheduling component will reduce the scheduling weight of physical machines with abnormal labels, in order to avoid scheduling virtual machines to physical machines with abnormal labels as much as possible.
[0094] Avoidance of problematic physical machines: When the number of physical machines makes it impossible to avoid scheduling all virtual machines to physical machines with abnormal labels, avoid scheduling virtual machines with performance-sensitive labels to physical machines with the same type of abnormality.
[0095] Malicious Virtual Machine Isolation: Virtual machines with malicious tags are grouped onto the same physical machine or an idle physical machine where no other virtual machines are running, preventing them from affecting other normally functioning virtual machines. During virtual machine operation, runtime information can be collected and analyzed. If a virtual machine is detected to be continuously causing specified problems, such as contention for split_locks (cross-cache line locks) or other resource-grabbing issues, this type of virtual machine will affect the performance of other virtual machines on the same physical machine. Therefore, this virtual machine can be identified as malicious and a malicious tag can be added.
[0096] Resource creation risk avoidance: When creating a virtual machine for the first time, avoid creating it on a physical machine with control plane anomalies to avoid startup failures caused by hardware or software problems on the physical machine.
[0097] Based on the above embodiments, resource scheduling is performed in different situations.
[0098] The steps for the initial scheduling of a virtual machine are as follows: Figure 4 As shown:
[0099] Step 402: Receive the scheduling request for the first running virtual machine.
[0100] Step 404: Obtain specification definition information from the scheduling request.
[0101] Step 406: Obtain the hardware resource information of the physical machine.
[0102] Step 408: Use the specification definition information to filter the hardware resource information of the physical machine and determine at least one physical machine that meets the specification conditions.
[0103] Step 410: Query whether the physical machines that meet the specifications have an abnormal label.
[0104] If yes, proceed to step 412; otherwise, determine that it is a physical machine that meets the conditions.
[0105] Step 412: Obtain the anomaly tag of the physical machine that meets the specifications.
[0106] If an anomaly tag is present, then obtain the anomaly tag of the physical machine that meets the specification conditions.
[0107] Step 414: Determine whether the abnormal label and the application type match.
[0108] If yes, proceed to step 416; otherwise, determine that it is a physical machine that meets the conditions.
[0109] Step 416: Delete the physical machine corresponding to the abnormal label.
[0110] If the anomaly label and application type are specified, then the physical machine corresponding to the anomaly label is deleted.
[0111] Step 418: Obtain constraint information and determine the weight information of the remaining physical machines based on the constraint information.
[0112] The step of obtaining constraint information and determining the weight information of the remaining physical machines based on the constraint information includes: obtaining resource constraint information and determining the first weight of the remaining virtual machines according to the resource constraint information and specification definition information; obtaining condition constraint information and determining the second weight of the remaining virtual machines according to the condition constraint information; and setting a third weight for virtual machines with anomaly tags among the remaining virtual machines according to the anomaly tags.
[0113] Step 420: Weight the remaining physical machines according to the weight information to obtain the weight values of the remaining physical machines.
[0114] Step 422: Sort the remaining physical machines according to the weights.
[0115] Step 424: Select the target physical machine based on the corresponding sorting information.
[0116] The virtual machine can be scheduled to run on the target physical machine.
[0117] When a virtual machine restarts, it checks if there is a conflict between the virtual machine and its host physical machine. If a conflict occurs, the physical machine hosting the virtual machine can be rescheduled. This duplication can occur in various ways, such as the virtual machine's application type matching the anomaly tag of its host physical machine, in which case continuing to run the virtual machine on that physical machine would impact performance. Another example is a specified fault on the host physical machine, such as a serious anomaly or a system crash, which would also affect the operation of the virtual machines running on it. Scheduling can be initiated proactively by the scheduling component or by sending a message to the virtual machine. The virtual machine can proactively request scheduling based on its operating status; for example, if the virtual machine is under low load and the anomaly information of the current virtual machine and the physical machine do not match, the virtual machine can be migrated to a new physical machine. Furthermore, when a physical machine experiences a serious anomaly or a system crash, all virtual machines on that physical machine will undergo hot migration and restart scheduling.
[0118] The steps for virtual machine restart scheduling and hot migration scheduling are as follows: Figure 5 As shown:
[0119] Step 502: When it is determined that the virtual machine is in conflict with the physical machine, obtain the specification definition information of the virtual machine.
[0120] Step 504: Obtain the hardware resource information of the physical machine.
[0121] Step 506: Use the specification definition information to filter the hardware resource information of the physical machine and determine at least one physical machine that meets the specification conditions.
[0122] Step 508: Query whether the physical machines that meet the specifications have an abnormal label.
[0123] If yes, proceed to step 510; otherwise, determine that the physical machine meets the conditions.
[0124] Step 510: Obtain the anomaly tag of the physical machine that meets the specifications.
[0125] If an anomaly tag is present, then obtain the anomaly tag of the physical machine that meets the specification conditions.
[0126] Step 512: Determine whether the abnormal label and the application type match.
[0127] If yes, proceed to step 514; otherwise, determine that it is a physical machine that meets the conditions.
[0128] Step 514: Delete the physical machine corresponding to the abnormal label.
[0129] If the anomaly label and application type are specified, then the physical machine corresponding to the anomaly label is deleted.
[0130] Step 516: Obtain constraint information and determine the weight information of the remaining physical machines based on the constraint information.
[0131] The step of obtaining constraint information and determining the weight information of the remaining physical machines based on the constraint information includes: obtaining resource constraint information and determining the first weight of the remaining virtual machines according to the resource constraint information and specification definition information; obtaining condition constraint information and determining the second weight of the remaining virtual machines according to the condition constraint information; and setting a third weight for virtual machines with anomaly tags among the remaining virtual machines according to the anomaly tags.
[0132] Step 518: Weight the remaining physical machines according to the weight information to obtain the weight values of the remaining physical machines.
[0133] Step 520: Sort the remaining physical machines according to the weights.
[0134] Step 522: Select the target physical machine based on the corresponding sorting information.
[0135] The virtual machine can be scheduled to the target physical machine.
[0136] In summary, this application provides a cloud platform virtual machine scheduling scheme with server damage awareness. It collects runtime anomalies from each physical machine, categorizes and tags these anomalies, and integrates the tagged data into the system. The cloud platform's scheduling component detects various anomalies on physical machines by accessing the tagging component. Furthermore, by analyzing the application characteristics on the virtual machines, it uses various scheduling strategies, such as degrading potentially problematic physical machines, avoiding problematic physical machines, isolating malicious virtual machines, and mitigating resource creation risks, to schedule virtual machines to more suitable physical machines. This prevents anomalies on physical machines from impacting virtual machine performance and availability.
[0137] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0138] This embodiment also provides a virtual machine scheduling device, which is applied in a server-side electronic device.
[0139] The requirements definition module is used to determine the specification definition information of the virtual machine;
[0140] The hardware screening module is used to screen physical machines based on the specification definition information and determine at least one physical machine that meets the specification conditions.
[0141] An anomaly filtering module is used to filter the at least one physical machine that meets the specification conditions according to the application type of the virtual machine, and delete physical machines whose anomaly tags match the application type.
[0142] The selection module is used to sort the remaining physical machines according to the set rules and select the target physical machine based on the corresponding sorting information.
[0143] In summary, the virtual machine's specification definition information can be determined. Then, physical machines are filtered based on this specification definition information to identify at least one physical machine that meets the specification conditions. Next, the at least one physical machine that meets the specification conditions is filtered according to the application type of the virtual machine, and physical machines whose abnormal tags match the application type are deleted. This filters out abnormal physical machines, reducing the impact of physical machine abnormalities on virtual machine performance. The remaining physical machines are then sorted according to set rules, and a target physical machine is selected based on the corresponding sorting information. The virtual machine is then set on the target physical machine to ensure virtual machine performance.
[0144] Optionally, the anomaly filtering module is used to query whether the physical machines that meet the specification conditions have anomaly tags; if they have anomaly tags, the anomaly tags of the physical machines that meet the specification conditions are obtained; the anomaly tags are matched with the application type; if the anomaly tags and application types are not matched, the physical machines corresponding to the anomaly tags are deleted.
[0145] Optionally, the anomaly label includes at least one of the following: control plane anomaly label, computing performance anomaly label, memory performance anomaly label, network performance anomaly label, hardware anomaly label, and fatal anomaly label; the application type includes at least one of the following: compute-intensive type, network-intensive type, storage-intensive type, and critical protection type.
[0146] Optionally, the selection module is used to obtain constraint information, determine the weight information of the remaining physical machines based on the constraint information, weight the remaining physical machines according to the weight information to obtain the weight value of the remaining physical machines, and sort the remaining physical machines according to the weight value.
[0147] Optionally, the selection module is used to obtain resource constraint information, determine the first weight of the remaining virtual machines according to the resource constraint information and specification definition information; obtain condition constraint information, determine the second weight of the remaining virtual machines according to the condition constraint information; and set a third weight for virtual machines with anomaly tags among the remaining virtual machines according to the anomaly tags.
[0148] Optionally, it also includes: an anomaly acquisition module for acquiring runtime information of the physical machine; an anomaly analysis module for analyzing whether the physical machine has an anomaly based on the runtime information; if the physical machine has an anomaly, then determining the anomaly type of the physical machine and setting an anomaly tag.
[0149] Optionally, the anomaly analysis module is further configured to remove the anomaly label of the physical machine after the anomaly corresponding to the detected anomaly disappears.
[0150] Optionally, the specification definition information includes at least one of the following: CPU requirement information, memory requirement information, hard disk requirement information, and network requirement information; the requirement determination module is used to receive a virtual machine scheduling request and obtain the specification definition information from the scheduling request; when determining that the application type of the virtual machine matches the anomaly tag of the physical machine, the specification definition information of the virtual machine is obtained; when determining that the physical machine where the virtual machine is located has experienced a specified fault, the specification definition information of the virtual machine is obtained.
[0151] Optionally, it also includes: a virtual machine analysis module, used to determine the application type based on the user association information of the virtual machine when the virtual machine runs for the first time; and to obtain the running information of the virtual machine after the virtual machine has run for a set time, and to analyze the application type of the virtual machine based on the running information.
[0152] Optionally, the selection module is used to set the physical machine that is already running the virtual machine with the malicious label as the target physical machine when the virtual machine has a malicious label, or to set an idle physical machine as the target physical machine.
[0153] Optionally, the hardware screening module is used to obtain the hardware resource information of the physical machine; and to screen the hardware resource information of the physical machine using specification definition information to determine at least one physical machine that meets the specification conditions.
[0154] In summary, this application provides a cloud platform virtual machine scheduling scheme with server damage awareness. It collects runtime anomalies from each physical machine, categorizes and tags these anomalies, and integrates the tagged data into the system. The cloud platform's scheduling component detects various anomalies on physical machines by accessing the tagging component. Furthermore, by analyzing the application characteristics on the virtual machines, it uses various scheduling strategies, such as degrading potentially problematic physical machines, avoiding problematic physical machines, isolating malicious virtual machines, and mitigating resource creation risks, to schedule virtual machines to more suitable physical machines. This prevents anomalies on physical machines from impacting virtual machine performance and availability.
[0155] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0156] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes devices such as servers and terminal devices.
[0157] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired, and the apparatus may include electronic devices such as servers (clusters) and terminals. Figure 6 An exemplary apparatus 600 is schematically shown that can be used to implement the various embodiments described in this application.
[0158] In one embodiment, Figure 6An exemplary device 600 is shown, which includes one or more processors 602, a control module (chipset) 604 coupled to at least one of the processors 602, a memory 606 coupled to the control module 604, a non-volatile memory (NVM) / storage device 608 coupled to the control module 604, one or more input / output devices 610 coupled to the control module 604, and a network interface 612 coupled to the control module 604.
[0159] Processor 602 may include one or more single-core or multi-core processors, and processor 602 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 600 can serve as a server, terminal, or other device as described in the embodiments of this application.
[0160] In some embodiments, the apparatus 600 may include one or more computer-readable media (e.g., memory 606 or NVM / storage device 608) having instructions 614 and one or more processors 602 that are combined with the one or more computer-readable media and configured to execute the instructions 614 to implement the module and thus perform the actions described in this disclosure.
[0161] In one embodiment, the control module 604 may include any suitable interface controller to provide any suitable interface to at least one of the processors 602 and / or any suitable device or component communicating with the control module 604.
[0162] The control module 604 may include a memory controller module to provide an interface to the memory 606. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0163] Memory 606 may be used, for example, to load and store data and / or instructions 614 for device 600. In one embodiment, memory 606 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 606 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0164] In one embodiment, the control module 604 may include one or more input / output controllers to provide an interface to the NVM / storage device 608 and (one or more) input / output devices 610.
[0165] For example, NVM / storage device 608 may be used to store data and / or instructions 614. NVM / storage device 608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0166] NVM / storage device 608 may include storage resources that are part of a device on which device 600 is mounted, or that are accessible to the device but do not necessarily have to be part of the device. For example, NVM / storage device 608 may be accessed via a network through one or more input / output devices 610.
[0167] One or more input / output devices 610 may provide an interface for device 600 to communicate with any other suitable device. Input / output devices 610 may include communication components, audio components, sensor components, etc. A network interface 612 may provide an interface for device 600 to communicate via one or more networks. Device 600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0168] In one embodiment, at least one of the processors 602 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 604. In one embodiment, at least one of the processors 602 may be logically packaged with one or more controllers of the control module 604 to form a system-in-package (SiP). In one embodiment, at least one of the processors 602 may be integrated with the logic of one or more controllers of the control module 604 on the same die. In one embodiment, at least one of the processors 602 may be integrated with the logic of one or more controllers of the control module 604 on the same die to form a system-on-a-chip (SoC).
[0169] In various embodiments, device 600 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop, handheld computing device, tablet, netbook, etc.). In various embodiments, device 600 may have more or fewer components and / or different architectures. For example, in some embodiments, device 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0170] The detection device can use a main control chip as a processor or control module, and sensor data, position information, etc. can be stored in a memory or NVM / storage device. The sensor group can be used as an input / output device, and the communication interface can include a network interface.
[0171] This application also provides an electronic device, including: a processor; and a memory storing executable code thereon. When the executable code is executed, the processor performs one or more methods as described in this application embodiment. In this application embodiment, the memory can store various types of data, such as target files, file-application association data, and user behavior data, thereby providing a data foundation for various processing operations.
[0172] This application also provides one or more machine-readable media having executable code stored thereon, which, when executed, causes a processor to perform one or more of the methods described in this application.
[0173] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0174] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0175] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0176] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0178] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0179] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0180] The virtual machine scheduling method, electronic device, and storage medium provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A virtual machine scheduling method, characterized in that, The method includes: Determine the specification definition information of the virtual machine, which includes at least one of the following: CPU requirement information, memory requirement information, hard disk requirement information, and network requirement information; Based on the specification definition information, physical machines are screened to determine at least one physical machine that meets the specification conditions; Query whether the physical machine that meets the specifications has an anomaly tag. The anomaly tag includes at least one of the following: control plane anomaly tag, computing performance anomaly tag, memory performance anomaly tag, network performance anomaly tag, hardware anomaly tag, and fatal anomaly tag. If an anomaly tag is present, then obtain the anomaly tag of the physical machine that meets the specification conditions; The anomaly label is matched with the application type of the virtual machine. The application type is the type information of the application characteristics of the virtual machine. The application type includes at least one of the following: compute-intensive type, network-intensive type, storage-intensive type, and critical protection type. If the anomaly label matches the application type, then delete the physical machine corresponding to the anomaly label; Obtain constraint information, and determine the weight information of the remaining physical machines based on the constraint information. The constraint information includes: condition constraint information, which includes: resource balancing constraints and power consumption averaging constraints. The remaining physical machines are weighted according to the weight information to obtain the weight values of the remaining physical machines; The remaining physical machines are sorted according to the weights, and the target physical machine is selected based on the corresponding sorting information.
2. The method according to claim 1, characterized in that, The step of obtaining constraint information and determining the weight information of the remaining physical machines based on the constraint information includes: Obtain resource constraint information, and determine the first weight of the remaining virtual machines according to the resource constraint information and specification definition information; Obtain condition constraint information, and determine the second weight of the remaining virtual machines based on the condition constraint information; The virtual machines with anomaly tags among the remaining virtual machines are assigned a third weight according to the anomaly tags.
3. The method according to claim 1, characterized in that, Also includes: Collect runtime information of the physical machine and analyze whether the physical machine has any abnormalities based on the runtime information; If the physical machine is abnormal, determine the abnormality type of the physical machine and set an abnormality label.
4. The method according to claim 3, characterized in that, Also includes: Once the anomaly detected in a physical machine disappears, the anomaly label on that physical machine is removed.
5. The method according to claim 1, characterized in that, Determining the virtual machine specification definition information includes at least one of the following steps: Receive a virtual machine scheduling request and obtain specification definition information from the scheduling request; When determining whether the application type of the virtual machine matches the anomaly tag of the physical machine, the specification definition information of the virtual machine is obtained; When it is determined that a specified fault has occurred in the physical machine where the virtual machine is located, the specification definition information of the virtual machine is obtained.
6. The method according to claim 1, characterized in that, It also includes at least one step for determining the application type: When the virtual machine runs for the first time, the application type is determined based on the user association information of the virtual machine. After the virtual machine has been running for a set period of time, the running information of the virtual machine is obtained, and the application type of the virtual machine is analyzed based on the running information.
7. The method according to claim 1, characterized in that, The target physical machine is selected based on the corresponding sorting information, including: When the virtual machine has a malicious label, the physical machine that is already running the virtual machine with the malicious label is set as the target physical machine, or an idle physical machine is set as the target physical machine.
8. The method according to claim 1, characterized in that, Based on the specification definition information, physical machines are screened to determine at least one physical machine that meets the specification conditions, including: Obtain hardware resource information of the physical machine; The hardware resource information of physical machines is filtered using specification definition information to determine at least one physical machine that meets the specification conditions.
9. An electronic device, comprising: processor; and a memory having executable code stored thereon, which, when executed by a processor, performs the method as described in any one of claims 1-8.
10. One or more machine-readable media having executable code stored thereon, which, when executed by a processor, performs the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Cloud computing platform management method
CN105743696A
Resource scheduling method and device
CN106341496A
Label-based virtual machine scheduling method, system and device and readable storage medium
CN113626141A