Processor scheduling method and device, electronic equipment and storage medium

Through dynamic migration and processor binding technology, the problem of multi-VM resource contention in the virtualization platform is solved, more accurate resource utilization and stability of high-load tasks are achieved, and business continuity and efficient resource utilization of virtual machines in the event of host failure are ensured.

CN120508363APending Publication Date: 2025-08-19BEIJING SHOUYUN INTELLIGENT COMPUTING TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510583552.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

Under the virtualization platform, when multiple virtual machines perform high-load tasks at the same time, resource contention leads to performance fluctuations, and in severe cases, the host is unresponsive, and it is difficult for the existing technology to optimize resource utilization and ensure the stable performance of real-time high-load tasks.

Method used

By monitoring the host connection status, dynamically migrate virtual machines, processor binding and unbinding are performed based on virtual machine specification information and host resource status, resource allocation is optimized, and the exclusive binding between the virtual processor and the physical processor is ensured, load balancing and dynamic resource allocation are achieved.

Benefits of technology

The resource competition between multiple virtual machines is optimized, and more accurate shared resource utilization management is achieved, ensuring stable performance of real-time high-load tasks, and reducing business interruptions and resource waste caused by host failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508363A_ABST
    Figure CN120508363A_ABST
Patent Text Reader

Abstract

The invention provides a processor scheduling method and device, electronic equipment and a storage medium, relates to the technical field of computers, in particular to the field of virtualization and the like, and can be used for application scenes of data center virtualization, processor resource allocation and the like. According to the specific implementation scheme, the method comprises the following steps: determining initial information of an initial host machine according to a connection state and business data of each host machine; the business data comprises a host machine information table and a host machine architecture table; determining target information of a target host machine according to the business data and specification information of a virtual machine corresponding to the initial host machine; binding a virtual processor of the virtual machine with a physical processor of the target host machine according to the specification information and the target information; and according to the specification information and the initial information, unbinding the virtual processor of the virtual machine and the physical processor of the initial host machine. According to the scheme, resource contention among multiple virtual machines can be optimized, more accurate shared resource utilization rate management is realized, and stable performance of a real-time high-load task is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to fields such as virtualization, and can be used in application scenarios such as data center virtualization and processor resource allocation. Specifically, it relates to a processor scheduling method, device, electronic device, and storage medium. Background Art

[0002] Existing technologies on virtualization platforms generally use a shared processor approach, allowing for processor over-allocation. This allows multiple virtual machines to be created on a single host machine, with the combined virtual processor count exceeding the host machine's physical processor count, thereby improving resource utilization. However, while this current allocation approach improves resource utilization, it can also lead to resource contention when multiple virtual machines are simultaneously executing high-load tasks, causing performance fluctuations in the virtual machines and, in severe cases, host machine unresponsiveness. Summary of the Invention

[0003] The present disclosure provides a processor scheduling method, device, electronic device, and storage medium.

[0004] According to a first aspect of the present disclosure, a processor scheduling method is provided, the method comprising: determining initial information of an initial host machine based on the connection status and business data of each host machine; the business data comprising a host machine information table and a host machine architecture table; determining target information of a target host machine based on the business data and specification information of a virtual machine corresponding to the initial host machine; binding a virtual processor of the virtual machine to a physical processor of the target host machine based on the specification information and the target information; and unbinding the virtual processor of the virtual machine from the physical processor of the initial host machine based on the specification information and the initial information.

[0005] According to a second aspect of the present disclosure, a processor scheduling device is provided, which includes: an initial information determination module for determining the initial information of an initial host machine based on the connection status and business data of each host machine; the business data includes a host machine information table and a host machine architecture table; a target information determination module for determining the target information of a target host machine based on the business data and the specification information of the virtual machine corresponding to the initial host machine; a processor binding module for binding the virtual processor of the virtual machine to the physical processor of the target host machine based on the specification information and the target information; and a processor unbinding module for unbinding the virtual processor of the virtual machine from the physical processor of the initial host machine based on the specification information and the initial information.

[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0008] The solution disclosed in the present invention can optimize resource contention among multiple virtual machines, achieve more accurate shared resource utilization management, and ensure stable performance of real-time high-load tasks.

[0009] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is a flowchart of a processor scheduling method according to an embodiment of the present disclosure;

[0012] Figure 2 is another flowchart of a processor scheduling method according to an embodiment of the present disclosure;

[0013] Figure 3 is a schematic diagram of a process for determining a target host according to an embodiment of the present disclosure;

[0014] Figure 4 is a flowchart of processor binding according to an embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram of the structure of processor binding according to an embodiment of the present disclosure;

[0016] Figure 6 is a schematic diagram of a process of processor unbinding according to an embodiment of the present disclosure;

[0017] Figure 7 is another flowchart of a processor scheduling method according to an embodiment of the present disclosure;

[0018] Figure 8 is a structural diagram of a processor scheduling device according to an embodiment of the present disclosure;

[0019] Figure 9 is a schematic diagram of a scenario of a processor scheduling method according to an embodiment of the present disclosure;

[0020] Figure 10 4 is a structural diagram of an electronic device used to implement the processor scheduling method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0022] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this article refer to multiple similar technical terms and distinguish them, and do not mean to limit the order or to limit to only two. For example, the first feature and the second feature refer to two categories / two features. The first feature can be one or more, and the second feature can also be one or more.

[0023] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.

[0024] Before introducing the technical solutions of the embodiments of the present disclosure, the following technical terms that may be used in the present disclosure are further explained:

[0025] Virtual Machine: A computer program or system that simulates the hardware operating environment of a physical computer through software, enabling multiple operating systems to run simultaneously on the same physical machine. Virtual machines use virtualization technology to abstract physical resources into logical resources, providing each virtual machine with an independent computing environment. This isolates virtual machines from each other and allows them to run different operating systems and applications.

[0026] Processor: This can refer to either the central processing unit (CPU) or the core within a CPU. The CPU is the computing and control core of a computer system, the ultimate execution unit for information processing and program execution. The core, also known as the kernel, is the most important component of the CPU, performing all calculations, receiving / storing commands, and processing data.

[0027] In the related art, virtual machine scheduling on the VMware platform generally uses a shared CPU approach, allowing CPU over-allocation. This means that a single host machine may create multiple virtual machines whose combined virtual central processing units (VCPUs) exceed the host machine's physical central processing units (PCPUs). However, while the current CPU allocation method improves resource utilization, if all virtual machines simultaneously perform high-load tasks under over-allocation, resource contention can lead to performance fluctuations and, in severe cases, host unresponsiveness. Therefore, the VMware platform, under current technology, is unsuitable for real-time-sensitive applications.

[0028] In order to at least partially address one or more of the above-mentioned problems and other potential problems, the present disclosure proposes a processor scheduling method that can optimize resource contention among multiple virtual machines, achieve more accurate shared resource utilization management, and ensure stable performance of real-time high-load tasks.

[0029] The present disclosure provides a processor scheduling method. Figure 1 It is a flow chart of a processor scheduling method according to an embodiment of the present disclosure, and the processor scheduling method can be applied to a processor scheduling device. The processor scheduling device is located in an electronic device. The electronic device includes but is not limited to fixed devices and / or mobile devices. For example, fixed devices include but are not limited to servers, and servers can be cloud servers or ordinary servers. For example, mobile devices include but are not limited to data center virtualization devices, processor resource allocation devices, etc., and data center virtualization devices and processor resource allocation devices can be mobile phones, tablet computers, vehicle-mounted terminals, etc. In some possible implementations, the processor scheduling method can also be implemented by the processor calling computer-readable instructions stored in the memory. For example Figure 1 As shown, the processor scheduling method includes:

[0030] S101 : Determine initial information of an initial host based on the connection status and service data of each host; the service data includes a host information table and a host architecture table.

[0031] S102: Determine target information of a target host machine according to the service data and specification information of the virtual machine corresponding to the initial host machine.

[0032] S103: Bind the virtual processor of the virtual machine to the physical processor of the target host machine according to the specification information and the target information.

[0033] S104: Unbind the virtual processor of the virtual machine from the physical processor of the initial host machine according to the specification information and the initial information.

[0034] The connection status refers to the connection status between the host machine and the virtualization platform, including the host machine's online / offline status, network availability, etc. The connection status can be used to determine whether the host machine is active and available.

[0035] Among them, business data refers to the relevant information of running businesses in the virtualization environment, which may include the current status of the host machine, the cluster information where the host machine is located, the CPU information of the host machine, the non-uniform memory access architecture (NUMA) information of the host machine, the current processor binding information of the host machine, the current available resources of the host machine, etc.

[0036] The initial host is the host with an abnormal connection status. If any host experiences an abnormal connection status, it will be deemed down and designated as the initial host. Furthermore, virtual machines running on the initial host will automatically migrate to other hosts.

[0037] The initial information refers to basic information related to the initial host machine, including the virtual machines deployed in the initial host machine, the CPU resources of the initial host machine, etc.

[0038] The host information table refers to a basic information table of the host, which may include the current status of the host, information about the cluster where the host is located, CPU information of the host, NUMA information of the host, etc. The host information table can be used to represent attribute information of the host.

[0039] The host architecture table refers to the architecture information table of the host, which may include the current CPU binding information of the host, the current available resources of the host, etc. The host architecture table can be used to represent the operation information of the host.

[0040] In the embodiment of the present disclosure, the connection status of each host machine can be obtained regularly. When the connection status of any host machine is detected to be abnormal, the abnormal host machine is determined to be the initial host machine. Furthermore, the relevant information of the initial host machine can be obtained according to the host machine information table, and the obtained information is used as the initial information. For example, the connection status of each host machine can be obtained regularly through a monitoring mechanism, or through a heartbeat mechanism or other existing technologies, and this application does not limit this. The above is only an exemplary explanation and is not intended to limit all possible situations for determining the initial information, but it is not exhaustive here.

[0041] Specifications refer to the detailed resource requirements and configuration parameters of a virtual machine. These include the number of CPUs, memory size, network bandwidth, and storage capacity required for the virtual machine to run. Furthermore, specifications can include the virtual machine's priority, workload characteristics, and any special requirements for the host architecture. Specifications describe the hardware resources and performance requirements required for the virtual machine to run.

[0042] The target host is the host that takes over the virtual machine running on the initial host if the initial host's connection status becomes abnormal. The target host must meet the virtual machine's specifications and have sufficient and available CPU resources.

[0043] Target information is detailed information about the target host, representing its resource status and current load. This information includes the target host's CPU resources, memory resources, network bandwidth, bound processor information, NUMA architecture characteristics, and whether the current host meets the requirements for virtual machine migration.

[0044] In the disclosed embodiment, eligible host machines can first be screened based on the virtual machine's specifications to ensure that the host machine has sufficient resources. Subsequently, the host machine with the best performance can be selected as the target host machine, taking into account other conditions such as NUMA architecture optimization. Finally, relevant information about the target host machine can be obtained based on the host machine information table, and the obtained information can be used as the target information. The above is merely an example and does not limit all possible scenarios for determining the target information, but this is not an exhaustive list.

[0045] The virtual processor (VPC) is the core computing component of a virtual machine, responsible for processing the VM's instructions and tasks. Virtual processors are generated by virtualization technology, and VMs use them to run tasks. Specifically, VPCs can be bound to physical processors on the host machine to ensure that the VM's computing tasks effectively utilize the host machine's hardware resources.

[0046] The physical processor is the actual hardware processor on the host machine. The physical processor is the computing core of the host machine and can run the tasks of the virtual machine.

[0047] In the disclosed embodiments, a suitable physical processor can first be selected on the target host machine based on the specification information and target information. Subsequently, the virtual processor of the virtual machine can be bound to the physical processor. The above description is merely illustrative and does not limit all possible scenarios of the binding process. This is not intended to be exhaustive.

[0048] In the disclosed embodiment, the virtual machine tasks can be stopped on the initial host machine based on the specification information and initial information, and the virtual processors of the virtual machine can be unbound from the physical processors of the initial host machine. The above is only an example and does not limit all possible scenarios of the unbinding process. This is not an exhaustive list.

[0049] The technical solution of the disclosed embodiment monitors the host connection status in real time, and can migrate virtual machines in time when the host connection status is abnormal, thereby avoiding business interruption. Dynamic scheduling is performed through specification information and target information to ensure that the host computing resources can be optimally utilized and reduce resource waste. In addition, when the initial host crashes, the virtual machine can be automatically migrated to a suitable target host to ensure continuous business operation and reduce service interruptions caused by host failures. By dynamically binding virtual processors to physical processors, load balancing and dynamic resource allocation are supported to meet the needs of virtualization environments of different scales. By using processor binding technology to exclusively bind the VCPU and PCPU of a virtual machine, resource contention between multiple virtual machines can be optimized, achieving more accurate shared resource utilization management, ensuring that real-time high-load tasks obtain deterministic execution cycles, and thus avoiding performance jitter and virtual machine freezes caused by PCPU competition.

[0050] In some embodiments, the processor scheduling method also includes: generating host information and host architecture information based on host core information; updating the historical host information table based on the host information to obtain a host information table; updating the historical host architecture table based on the host architecture information to obtain a host architecture table; determining business data based on the host information table and the host architecture table.

[0051] The host core information is a collection of basic status and attribute information about the host's operation, used to describe the overall status of the host. For example, the host core information may include: connection status, i.e., whether the host is online, whether it maintains a normal connection with the virtualization platform, and whether the network is available; cluster information, i.e., the cluster or group information to which the host belongs, which can reflect the collaborative relationship between the host and other hosts; CPU core information, i.e., the number of processors in the actual hardware of the host, the number of cores of each processor, the main frequency, and other parameters; NUMA information, i.e., the NUMA structure of the host, including the distribution of processors and memory and access policies.

[0052] Host information is a description of host attributes generated based on the host core information, used to characterize the basic state of the host. For example, host information may include: the host's current status (e.g., online / offline), CPU resource usage, memory usage, etc.; information about the cluster to which the host belongs; information about the host's CPU cores; and the host's NUMA architecture characteristics. In particular, host information emphasizes the host's fundamental attributes.

[0053] Host architecture information refers to information related to the host's operating status, used to characterize the host's dynamic resource allocation and operational status. For example, this information may include: current CPU binding information, i.e., the binding relationship between PCPUs and VCPUs; the host's current resource usage, i.e., the utilization and remaining resources of resources such as CPU, memory, and network; the host's priority and task load, etc. In particular, host architecture information emphasizes the dynamic state of the host's operation.

[0054] In the embodiment of the present disclosure, the host core information can be first obtained and analyzed, and then the basic attributes of the host can be extracted from the host core information, and then these attributes can be organized into host information to characterize the static attributes of the host. Furthermore, dynamic operation-related data can be extracted from the host core information, and then these data can be organized into host architecture information to characterize the dynamic state of the host. The above is only an exemplary explanation and is not intended to limit all possible situations for generating host information and host architecture information. It is just not exhaustive here.

[0055] In the disclosed embodiment, the current host information can first be compared with the historical host information table. If a new host is found or the host status has changed, the historical host information table is updated and the latest information is written to the host information table to generate the latest host information table. If the host status has not changed, the historical host information table remains unchanged. The above is merely an example and does not limit all possible scenarios for generating a host information table. This is not intended to be exhaustive.

[0056] In the disclosed embodiment, the current host architecture information can first be compared with the historical host architecture table. If a new host is found or the dynamic resource allocation of the host is changed, the historical architecture table is updated and the latest information is written to the host architecture table to generate the latest host architecture table. If the host architecture status has not changed, the historical host architecture table is retained unchanged. The above is merely an example and does not limit all possible scenarios for generating a host architecture table. This is just not an exhaustive list.

[0057] In the disclosed embodiments, the host information table and the host architecture table can be integrated to extract key information. Business data can then be generated based on the integrated data for subsequent virtual machine scheduling and migration operations. The above is merely an example and does not limit all possible scenarios for determining business data. This is not intended to be exhaustive.

[0058] This approach records the host's static attributes and dynamic operating status as host information and host architecture information, respectively, making host management clearer and more comprehensive, and facilitating rapid problem location. By generating the latest host information and host architecture tables, we can monitor host status changes in real time, ensuring the accuracy of scheduling decisions. When generating service data, we comprehensively consider the host's static attributes and dynamic operating status, enabling virtual machine scheduling to make optimized decisions based on the latest resource status and performance data, reducing service latency.

[0059] In some embodiments, for the scheduling process under the VMware platform, the host CPU core information can be obtained through the virtualization management platform (vCenter) of the VMware platform, including the host's connection status, the cluster information where the host is located, the host's CPU core, NUMA information, etc., and a host information table (recorded as Host) and a host architecture table (recorded as Host_NUMA) are generated, and finally Host and Host_NUMA are recorded in the business layer database.

[0060] Figure 2 A flowchart of a processor scheduling method is shown in FIG. Figure 2 As shown, the edge service (edge_service) can first call the virtualization management platform service (vCenter Server) to obtain the host core information. Then, the center service (center_service) can be used to compare the host core information returned by the edge_service with the Host and Host_NUMA in the database. If the host status changes or a new host is added, the Host and Host_NUMA are updated in a timely manner.

[0061] Among them, vCenter Server can manage all hosts in a cluster, such as Figure 2 As shown, the first cluster (denoted as cluster 1) includes a first host machine (denoted as host 1) and a second host machine (denoted as host 2). Furthermore, host 1 and host 2 both include a first node (denoted as NUMA Node 1) and a second node (denoted as NUMA Node 2). Further, each NUMA Node 1 and NUMA Node 2 respectively includes a first processor (denoted as CPU 1), a second processor (denoted as CPU 2), a third processor (denoted as CPU 3) and a fourth processor (denoted as CPU 4). The vCenter platform can obtain the core information of the host machine by reading the above-mentioned architectural relationship and combining the status of each host machine. For example, a virtualization platform can be built based on the VMware virtualization environment architecture (VMware vSphere), and the management of underlying physical resources and the life cycle management of virtual machines can be achieved through the virtualization management platform service (vCenter Server).

[0062] In some embodiments, target information of the target host is determined based on business data and specification information of the virtual machine corresponding to the initial host, including: determining the current host and the host type corresponding to the current host based on business data and specification information; determining the target host based on the specification information and the host type; and determining the target information of the target host based on the target host.

[0063] The host type categorizes the role or function of a host within the virtualization platform, determining its purpose and its role within the system. In the disclosed embodiments, distinguishing between host types can help select the most appropriate target host during virtual machine migration, resource allocation, and troubleshooting, improving system efficiency and resource utilization.

[0064] In the embodiment of the present disclosure, in the VMware platform, when it is determined that the initial host machine is down, virtual machine migration can be automatically performed, that is, the virtual machine can be migrated from the initial host machine to the current host machine. Therefore, the host machine information table in the business data can be queried according to the specification information to determine the host machine where the virtual machine is currently located, and the host machine can be used as the current host machine. Furthermore, the host machine type of the current host machine can be determined by querying the host machine information table in the business data. The above is only an exemplary explanation and is not intended to limit all possible situations for determining the current host machine and the host machine type. It is just that this is not an exhaustive list.

[0065] In the embodiment of the present disclosure, it is possible to determine whether the current host can be used as the target host based on the virtual machine specification information and the host type of the current host. The above is only an example and does not limit all possible situations for determining the target host. It is just not exhaustive here.

[0066] In the embodiment of the present disclosure, the target host information table can be queried according to the target host, thereby obtaining the target information. The above is only an example and is not intended to limit all possible situations for determining the target information. It is just not exhaustive here.

[0067] This system, based on host type classification and resource status screening, can quickly identify the most suitable target host for virtual machine tasks, reducing delays and resource waste during migration. In downtime scenarios, quickly selecting the target host and migrating the virtual machine can reduce service interruption and minimize the impact of the failure on the user experience. This host type classification and screening mechanism enables the system to adapt to virtualization environments of varying sizes, supporting dynamic expansion and resource scheduling.

[0068] In some embodiments, the target host is determined based on the specification information and the host type, including: when the host type is a normal host, querying the business data based on the specification information to determine whether the current host meets the operating conditions; if the current host meets the operating conditions, using the current host as the target host; if the current host does not meet the operating conditions, querying the business data based on the specification information to obtain the target host.

[0069] Among them, the host type includes a normal host. A normal host is the main computing node in the virtualization platform, playing the core role of running virtual machines and carrying business tasks. In the embodiment of the present disclosure, a normal host is a host type used for normal business processing in the system.

[0070] In the disclosed embodiment, when the host type is a normal host, the host information table and the host architecture table can be queried first to check the current host status. Subsequently, the current host status can be compared with the specification information to determine whether the current host meets the operating conditions.

[0071] Exemplarily, the specification information may include the initial binding relationship between the virtual machine and the initial host machine. The host machine information table and host machine architecture table may be queried first to determine the PCPU idle information of the current host machine. Subsequently, based on the initial binding relationship, the PCPU binding information may be determined. This binding information may include the number of PCPUs, the logical location of the PCPUs, and so on. Next, the occupancy information and the binding information may be compared to determine whether the CPU required in the binding information is idle in the current host machine. If the CPU required in the binding information is idle in the current host machine, it can be determined that the current host machine meets the operating conditions; otherwise, it can be determined that the current host machine does not meet the operating conditions. The above is merely an example and does not limit all possible situations for determining whether the current host machine meets the operating conditions. This is not intended to be exhaustive.

[0072] In the embodiment of the present disclosure, if the judgment result is that the current host machine meets the operating conditions of the virtual machine, no further screening is required, and the current host machine can be directly used as the target host machine.

[0073] In the embodiment of the present disclosure, if the judgment result is that the current host machine does not meet the operating conditions of the virtual machine, it is necessary to reselect the host machine and use the reselected host machine as the target host machine.

[0074] This allows for rapid selection of target hosts by assessing operational conditions, reducing the complexity of migration decisions. If the current host meets the requirements, it is directly selected as the target host, reducing query and selection time and improving migration efficiency. If the current host fails to meet the requirements, the system dynamically queries business data to select target hosts, ensuring that the virtual machine is migrated to the host with the most suitable resources, thereby improving resource utilization.

[0075] In some embodiments, determining the target host machine based on the specification information and the host machine type further includes: when the host machine type is a hot standby machine, converting the host machine type of the current host machine to a normal host machine, and using the current host machine as the target host machine.

[0076] Among them, the host machine type also includes a hot standby machine. A hot standby machine is an online standby host machine in the virtualization platform, which can take over tasks at any time to deal with failures or sudden loads. In the embodiment of the present disclosure, a hot standby machine can be set in each host machine cluster, and virtual machines cannot be actively created on the hot standby machine. In particular, after the initial host machine goes down, the virtual machine will be migrated to the hot standby machine first. If there is no hot standby machine in the current cluster, the virtual machine will be migrated to the normal host machine. Exemplarily, cluster admission control can be turned on through vCenter settings, and the hot standby machine can be added to the list of fault-dedicated hosts to achieve the creation of a hot standby machine.

[0077] In the disclosed embodiments, the current host machine type can be converted to a normal host machine. For example, the host machine type field can be updated in the host machine information table within the service data, changing it from a hot standby machine to a normal host machine. This updates the current host machine type to a normal host machine, allowing it to officially participate in virtual machine tasks. Simultaneously, the hot standby machine can be changed to a normal host machine through the vCenter platform, thereby achieving the current host machine type conversion.

[0078] This allows the hot standby machine to quickly take over virtual machine tasks when the initial host fails or cannot meet the needs of the virtual machine. The hot standby machine's online status and rapid response capabilities can reduce business interruption time. The hot standby machine is always on standby, ensuring that even if the normal host machine encounters a problem, the system still has backup resources to take over virtual machine tasks, thereby improving system reliability and disaster recovery capabilities. The hot standby machine's role transition mechanism supports dynamic system expansion. As the load changes or a failure occurs, the hot standby machine can flexibly transform into a normal host machine, providing additional computing power to the system, allowing the virtualization platform to adapt to resource requirements of varying scales. The hot standby machine's rapid response and role transition ensure business continuity, maintaining the normal operation of virtual machine tasks even in failure scenarios.

[0079] In some embodiments, the host machine type also includes a cold standby machine. A cold standby machine is a backup host machine in the virtualization platform. It is typically offline or in a low-power state to reduce energy consumption, but can be awakened and used as a host machine in special scenarios. In the disclosed embodiments, a cold standby machine can be set in each host machine cluster, and virtual machines cannot be actively created on the cold standby machine. For example, the cold standby machine can be set to maintenance mode through vCenter to achieve the creation of a cold standby machine.

[0080] Furthermore, when the hot standby machine is converted to a normal host machine to officially participate in virtual machine tasks, the cold standby machine can be converted to a hot standby machine, thereby ensuring the disaster recovery capability of the system.

[0081] In some embodiments, if the current host machine does not meet the operating conditions, the business data is queried based on the specification information to obtain the target host machine, including: querying the host machine information table based on the specification information to obtain a set of candidate host machines; sorting each candidate host machine in the candidate host machine set based on the specification information and the host machine architecture table; and determining the target host machine based on the sorting result.

[0082] The candidate host set is a set of hosts that meet basic conditions and are selected from the host information table. These hosts all meet the hardware resource requirements of the virtual machine and are all online and can participate in the allocation of virtual machine tasks.

[0083] In the embodiment of the present disclosure, the host machines can be checked one by one from the host machine information table according to the specification information of the virtual machine, and the selected candidate host machines can be formed into a candidate host set. For example, the conditions that the candidate host machine needs to meet may include: the hardware requirements of the virtual machine, that is, the number of PCPUs is not less than the virtual machine specifications; the running state, that is, it must be online and able to participate in task scheduling; low resource utilization, that is, the resource utilization rate does not exceed the preset range to avoid overload. The above is only an exemplary explanation and does not limit all possible situations of the candidate host machine screening conditions, but it is not exhaustive here.

[0084] In the disclosed embodiment, the candidate hosts can be sorted according to different conditions based on the specification information and the host architecture table. For example, the candidate hosts can be sorted according to the number of virtual machines according to the host architecture table, and priority can be given to hosts with a small number of virtual machines to achieve load distribution and avoid the spread of single-point failures; the candidate hosts can also be sorted according to the degree of NUMA locality according to the host architecture table, and priority can be given to hosts whose PCPUs in the same NUMA node can meet the specification information requirements or hosts with the smallest access delay across NUMA nodes; the candidate hosts can also be sorted according to the load level according to the host architecture table, and priority can be given to hosts with sufficient resources and low load. In particular, the priorities of different conditions can be set, and sorting can be performed according to multiple conditions such as the number of virtual machines, the degree of NUMA locality, and the load level. The above is only an exemplary explanation and is not intended to limit all possible situations for sorting candidate hosts, but it is not exhaustive here.

[0085] In the disclosed embodiment, the host machine ranked first in the sorting results can be selected as the target host machine, or a host machine can be randomly selected from the first N host machines in the sorting results as the target host machine. The weight value of each host machine in the first N host machines in the sorting results can also be calculated according to a preset weight calculation rule, and the target host machine can be determined based on the weight value.

[0086] In this way, hosts are gradually screened from the host information table and host architecture table to ensure that the target host can meet the resource requirements of the virtual machine. Sorting optimization is used to achieve efficient allocation of host resources. Prioritize hosts with fewer virtual machines to reduce resource contention and performance bottlenecks, ensuring that virtual machines have stable resource support. Load distribution prevents the spread of single point failures and improves system operation stability. By prioritizing NUMA-localized hosts, cross-node memory access delays are avoided, improving the operating efficiency of virtual machines. If cross-NUMA node access is unavoidable, prioritize the host with the smallest cross-node access delay to minimize performance overhead. By dynamically screening and sorting candidate hosts, the system can adapt to different scenarios and ensure that virtual machine tasks can quickly find a suitable host. The screening and sorting mechanism within the candidate host set can achieve dynamic load balancing and avoid overloading a single host.

[0087] Figure 3 A schematic diagram of the process of determining the target host is shown in FIG. Figure 3 As shown, the following steps are included:

[0088] S301, determining virtual machine specifications;

[0089] S302, querying all candidate host machines that support virtual machine specifications;

[0090] S303, filtering and sorting the selected candidate host machines, giving priority to those that meet the following conditions: a small number of running virtual machines; can be bound on the same NUMA or most PCPUs are on the same NUMA;

[0091] S304: Determine the target host machine based on the filtering and sorting results.

[0092] In some embodiments, target information of the target host is determined based on business data and specification information of the virtual machine corresponding to the initial host, and also includes: based on the specification information, canceling the correspondence between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the current host; based on the specification information, updating the information corresponding to the current host in the host information table and the host architecture table.

[0093] In the disclosed embodiments, data related to the current host in the host information table can be updated based on the resource release status of the current host. For example, the PCPU unbound from the virtual machine VCPU can be recorded as the idle PCPU of the current host, and the NUMA node where the PCPU unbound from the virtual machine VCPU resides can be recorded. The binding record between the virtual machine and the current host can also be deleted, including the correspondence between the virtual machine VCPU and the current host PCPU, while the NUMA node allocation status of the current host can be updated. The above is merely an example and does not limit all possible scenarios for updating the information corresponding to the current host in the host information table and the host architecture table, but this is not intended to be exhaustive.

[0094] In the disclosed embodiments, a corresponding PCPU can be selected and unbound based on the virtual machine's VCPU and the current host's NUMA architecture. For example, the unbinding relationship can be performed in vCenter. Furthermore, the binding relationship between the virtual machine's VCPU and the current host's PCPU can be unbound in vCenter, while simultaneously updating the VMware virtualization manager's scheduling data to ensure that the corresponding PCPU is idle. The above is merely an example and does not limit all possible scenarios for unbinding the corresponding relationship, but this is not intended to be exhaustive.

[0095] In this way, when the current host machine is not used as the target host machine, it can be unbound in time, so that a suitable host machine can be selected for the virtual machine, and the resources of the current host machine can be released in time, providing a reliable basis for subsequent task scheduling and resource allocation. The unbinding record of the virtual processor and the physical processor enables the system to dynamically adjust resource allocation to ensure that no binding conflicts occur.

[0096] In some embodiments, the virtual processor of the virtual machine is bound to the physical processor of the target host machine based on the specification information and target information, including: updating the information corresponding to the target host machine in the host machine information table and the host machine architecture table respectively based on the specification information and target information; establishing a correspondence between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the target host machine based on the specification information and target information.

[0097] In the disclosed embodiment, the data related to the target host in the host information table can be updated based on the resource allocation of the target host. For example, the PCPU bound to the virtual machine VCPU can be recorded as the PCPU already allocated to the target host, and the NUMA node where the PCPU bound to the virtual machine VCPU is located can be recorded. A binding record of the virtual machine and the target host can also be added, including the correspondence between the virtual machine's VCPU and the host's PCPU. The NUMA node allocation of the target host can also be updated, recording whether the virtual machine's VCPU is allocated on the same NUMA node or across NUMA nodes. The above is merely an example and does not limit all possible situations for updating the host information table and the host architecture table corresponding to the target host. This is not intended to be exhaustive.

[0098] In the embodiment of the present disclosure, a PCPU can be selected and a binding relationship can be established based on the number of VCPUs of the virtual machine and the NUMA architecture of the target host machine. Exemplarily, a binding relationship can be established in vCenter. In particular, if the PCPU of the target host machine can fully meet the NUMA localization requirements of the virtual machine, all PCPUs on the same NUMA node are preferred; if cross-NUMA nodes are required, the cross-node binding of the virtual machine's VCPU and PCPU is minimized, and the cross-node PCPU is biased towards the node as much as possible to reduce memory access latency. Furthermore, the binding relationship between the virtual machine's VCPU and the target host machine's PCPU can be recorded in vCenter, and the scheduling data of the VMware virtualization manager can be updated at the same time to ensure that the virtual machine tasks can be correctly assigned to the corresponding PCPU. The above is only an exemplary explanation and is not intended to limit all possible situations for establishing corresponding relationships. It is just that this is not an exhaustive list.

[0099] In this way, binding the virtual machine's VCPU to the target host's PCPU can optimize the virtual machine's computing performance. The binding relationship ensures that the virtual machine's tasks can run directly on the corresponding physical processor, reducing the overhead of virtualization scheduling. Updating the host information table and host architecture table makes resource allocation more transparent, helping to prevent multiple virtual machines from competing for the same physical CPU, thereby improving system stability. Updates to the host information table and host architecture table can reflect the resource allocation status of the target host in real time, providing reliable data support for subsequent resource scheduling and load balancing. During the resource binding process, the virtual machine's VCPU is ensured to be allocated to a PCPU with sufficient resources, reducing the risk of resource shortage or overload during virtual machine operation. Prioritizing NUMA localization reduces the latency of cross-node memory access and improves the virtual machine's efficient use of computing resources. By optimizing the binding logic and updating resource allocation records, the system can adapt to business needs of different scales and support dynamic expansion.

[0100] Figure 4 A schematic diagram of the process of processor binding is shown, as Figure 4 As shown, the following steps are included:

[0101] S401, update business data, occupy the host machine PCPU, and avoid repeated allocation of PCPU when concurrently creating virtual machines;

[0102] S402, creating the virtual machine on the host machine;

[0103] S403: Bind the VCPU of the virtual machine to the PCPU of the target host through vCenter

[0104] S404: After binding, the virtual machine is run. Each VCPU in the virtual machine can exclusively use the corresponding bound PCPU to ensure the performance of the virtual machine.

[0105] Figure 5 A schematic diagram of the processor binding structure is shown in FIG. Figure 5 As shown, the first cluster (cluster 1) includes the first host (host 1) and vCenter Server. Host 1 includes the first NUMA node (NUMANode 1) and the second NUMA node (NUMANode 2). NUMA Node 1 and NUMA Node 2 each include PCPUs 1 to 4. Host 1 runs the first virtual machine (vm 1) and the second virtual machine (vm 2). vm 1 includes vCPU 1. vm 2 includes vCPUs 1 to 6.

[0106] For example, when binding VM 1 to Host 1, since VM 1 only includes VCPU 1, VCPU 1 can be bound to PCPU 1 in NUMA Node 1, thus meeting the NUMA locality requirement. Furthermore, when binding VM 2 to Host 1, since VM 2 includes VCPUs 1 to 6, while PCPUs 2 to 4 are idle in NUMA Node 1 and PCPUs 1 to 4 are idle in NUMA Node 2, it is clear that all PCPUs on any NUMA node cannot meet VM 2's needs. Therefore, it is prioritized to bind most VCPUs to the same NUMA. That is, VCPUs 3 to 6 of VM 2 are bound to PCPUs 1 to 4 in NUMA Node 2, and the remaining VCPUs 1 to 2 are bound to PCPUs 2 to 3 in NUMA Node 1.

[0107] In some embodiments, the virtual processor of the virtual machine is untied from the physical processor of the initial host machine based on the specification information and the initial information, including: based on the specification information, canceling the correspondence between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the initial host machine; based on the specification information, updating the information corresponding to the initial host machine in the host machine information table and the host machine architecture table.

[0108] In the disclosed embodiments, data related to the initial host in the host information table can be updated based on the resource release status of the initial host. For example, the PCPU unbound from the virtual machine's VCPU can be recorded as an idle PCPU of the initial host, and the NUMA node where the PCPU unbound from the virtual machine's VCPU resides can be recorded. The binding record between the virtual machine and the initial host can also be deleted, including the correspondence between the virtual machine's VCPU and the host's PCPU, while the NUMA node allocation of the initial host can be updated. The above is merely an example and does not limit all possible scenarios for updating the information corresponding to the initial host in the host information table and the host architecture table, but this is not intended to be exhaustive.

[0109] In the disclosed embodiments, a corresponding PCPU can be selected and unbound based on the virtual machine's VCPU and the original host's NUMA architecture. For example, the unbinding relationship can be performed in vCenter. Furthermore, the virtual machine's VCPU can be unbound from the original host's PCPU in vCenter, while simultaneously updating the VMware virtualization manager's scheduling data to ensure that the corresponding PCPU is idle. The above is merely an example and does not limit all possible scenarios for unbinding the corresponding relationship, but this is not intended to be exhaustive.

[0110] In this way, the real-time updates of the host information table and the host architecture table reflect the latest resource status of the initial host, providing a reliable basis for subsequent task scheduling and resource allocation. The unbinding records of virtual processors and physical processors enable the system to dynamically adjust resource allocation to ensure that no binding conflicts occur.

[0111] In some embodiments, after unbinding the virtual processors of the virtual machine from the physical processors of the original host machine, the process further includes updating the host machine information table and marking the original host machine as unavailable. Specifically, since the original host machine has been determined to be down, timely marking the original host machine as unavailable can provide a reliable basis for subsequent task scheduling and resource allocation.

[0112] Figure 6 A schematic diagram of the process of processor unbinding is shown, as shown in Figure 6 As shown, the following steps are included:

[0113] S601, unbinding the VCPU of the virtual machine and the PCPU of the initial host machine through vCenter;

[0114] S602: Update the host information table and the host architecture table, and release the PCPU of the initial host.

[0115] Figure 7 A flowchart of a processor scheduling method is shown in FIG. Figure 7 As shown, the following steps are included:

[0116] S701. Obtain the connection status of each host through vCenter;

[0117] S702, determine whether the connection status of any host machine is normal, if not, go to S703, if normal, go to S717;

[0118] S703, determine the current host through vCenter;

[0119] S704, determine whether the current host machine is a hot standby machine; if so, go to S705; if not, go to S708;

[0120] S705: Update the host information table and host architecture table in the service data, thereby occupying the PCPU of the current host;

[0121] S706. Use vCenter to switch the current host from a hot standby host to a normal host.

[0122] S707: Use vCenter to convert the cold standby machine to a hot standby machine, and then switch to S715.

[0123] S708, judging whether the PCPU of the current host machine is occupied according to the host machine information table and the host machine architecture table; if not, go to S709; if so, go to S710;

[0124] S709, update the host information table and the host architecture table, occupy the PCPU of the current host, and then go to S715;

[0125] S710, reselect the target host;

[0126] S711. Update the host information table and host architecture table, and occupy the PCPU of the target host.

[0127] S712. Unbind the VCPU of the virtual machine from the PCPU of the current host machine through vCenter;

[0128] S713. Migrate the virtual machine to the target host through vCenter;

[0129] S714. Bind the VCPU of the virtual machine to the PCPU corresponding to the target host machine through vCenter;

[0130] S715, unbinding the VCPU of the virtual machine from the PCPU of the initial host machine;

[0131] S716: Mark the initial host as unavailable.

[0132] S717: Complete the processor scheduling process.

[0133] It should be understood that Figures 2 to 7 The schematic diagram shown is only exemplary and not restrictive, and it is scalable, and those skilled in the art can Figures 2 to 7 Various obvious changes and / or substitutions can be made to the examples, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.

[0134] The embodiment of the present disclosure provides a processor scheduling device, such as Figure 8 As shown, the device may include: an initial information determination module 801, used to determine the initial information of the initial host machine based on the connection status and business data of each host machine; the business data includes a host machine information table and a host machine architecture table; a target information determination module 802, used to determine the target information of the target host machine based on the business data and the specification information of the virtual machine corresponding to the initial host machine; a processor binding module 803, used to bind the virtual processor of the virtual machine to the physical processor of the target host machine based on the specification information and the target information; a processor unbinding module 804, used to unbind the virtual processor of the virtual machine from the physical processor of the initial host machine based on the specification information and the initial information.

[0135] In some embodiments, the processor scheduling device further includes: an information generation module 805 ( Figure 8 ), used to generate host information and host architecture information according to the host core information; the first update module 806 ( Figure 8 ), used to update the historical host information table according to the host information to obtain the host information table; the second update module 807 ( Figure 8 ), which is used to update the historical host architecture table according to the host architecture information to obtain the host architecture table; a data determination module 808 ( Figure 8 (not shown) is used to determine business data according to the host information table and the host architecture table.

[0136] In some embodiments, the target information determination module 802 includes: a type determination submodule, which is used to determine the current host machine and the host machine type corresponding to the current host machine based on the specification information; a target host determination submodule, which is used to determine the target host machine based on the host machine type; and a target information determination submodule, which is used to determine the target information of the target host machine based on the target host machine.

[0137] In some embodiments, the target host determination submodule is used to: when the host type is a normal host, determine whether the current host meets the operating conditions based on the specification information; if the current host meets the operating conditions, use the current host as the target host; if the current host does not meet the operating conditions, query the business data based on the specification information to obtain the target host.

[0138] In some embodiments, the target host determination submodule is further configured to: when the host type is a hot standby host, convert the host type of the current host to a normal host, and use the current host as the target host.

[0139] In some embodiments, the target host determination submodule is also used to: query the host information table based on the specification information to obtain a set of available hosts; query the host architecture table based on the specification information and the available host set to obtain a set of candidate hosts; sort each candidate host in the candidate host set based on the specification information; and determine the target host based on the sorting result.

[0140] In some embodiments, the processor binding module 803 includes: a binding information update sub-module, which is used to update the information corresponding to the target host in the host information table and the host architecture table according to the specification information and the target information; and a correspondence establishment sub-module, which is used to establish a correspondence between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the target host according to the specification information and the target information.

[0141] In some embodiments, the processor unbinding module 804 includes: an unbinding information update sub-module, which is used to update the information corresponding to the initial host machine in the host machine information table and the host machine architecture table according to the specification information; and a correspondence release sub-module, which is used to release the correspondence between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the initial host machine according to the specification information.

[0142] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, please refer to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0143] The processor scheduling device in the embodiment of the present disclosure monitors the host machine connection status in real time. When the host machine fails, it can migrate the virtual machine in time to avoid business interruption. By dynamically scheduling according to the specification information of the virtual machine and the target information of the target host machine, it ensures that the host machine computing resources can be optimally utilized and reduces resource waste. In addition, when the initial host machine goes down, the virtual machine can be automatically migrated to the target host machine to ensure continuous business operation and reduce service interruptions caused by host machine failures. By dynamically binding virtual processors to physical processors, load balancing and dynamic resource allocation are supported to meet the needs of virtualization environments of different scales. By exclusively binding the VCPU and PCPU of the virtual machine through processor binding technology, it can optimize resource contention between multiple virtual machines, achieve more accurate shared resource utilization management, ensure that real-time high-load tasks obtain deterministic execution cycles, and thus avoid performance jitter and virtual machine freezes caused by PCPU competition.

[0144] The embodiment of the present disclosure provides a scenario diagram of a processor scheduling method, such as Figure 9 shown.

[0145] As mentioned above, the processor scheduling method provided by the embodiments of the present disclosure is applied to electronic devices. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.

[0146] Specifically, the electronic device can perform the following operations:

[0147] Determine the initial information of the initial host machine based on the connection status and business data of each host machine; determine the target information of the target host machine based on the business data and the specification information of the virtual machine corresponding to the initial host machine; bind the virtual processor of the virtual machine to the physical processor of the target host machine based on the specification information and the target information; unbind the virtual processor of the virtual machine from the physical processor of the initial host machine based on the specification information and the initial information.

[0148] It should be understood that Figure 9 The scene diagram shown is only illustrative and not restrictive. Those skilled in the art can Figure 9 Various obvious changes and / or substitutions can be made to the examples, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.

[0149] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0150] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device and a readable storage medium.

[0151] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0152] like Figure 10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the device 600 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0153] Various components in device 600 are connected to I / O interface 1005, including: an input unit 1006, such as a keyboard, mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, optical disk, etc.; and a communication unit 1009, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1009 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0154] The computing unit 1001 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the processor scheduling method. For example, in some embodiments, the processor scheduling method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the processor scheduling method described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the processor scheduling method in any other appropriate manner (eg, by means of firmware).

[0155] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0156] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0157] 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. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a 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.

[0158] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0159] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0160] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0161] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0162] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A processor scheduling method, characterized in that: The method comprises: Determine the initial information of the initial host according to the connection status and service data of each host; the service data includes a host information table and a host architecture table; Determining target information of a target host machine based on the service data and specification information of a virtual machine corresponding to the initial host machine; Binding the virtual processor of the virtual machine to the physical processor of the target host machine according to the specification information and the target information; The virtual processor of the virtual machine is unbound from the physical processor of the initial host machine according to the specification information and the initial information.

2. The method according to claim 1, characterized in that The method further comprises: Generate host information and host architecture information based on host core information; According to the host information, update the historical host information table to obtain the host information table; According to the host architecture information, the historical host architecture table is updated to obtain the host architecture table; The service data is determined according to the host information table and the host architecture table.

3. The method according to claim 1, characterized in that The determining target information of the target host machine according to the service data and specification information of the virtual machine corresponding to the initial host machine includes: Determine a current host and a host type corresponding to the current host according to the service data and the specification information; Determining a target host machine based on the specification information and the host machine type; According to the target host, target information of the target host is determined.

4. The method according to claim 3, characterized in that The host machine type includes a normal host machine; The determining the target host machine according to the specification information and the host machine type includes: When the host machine type is the normal host machine, querying the service data according to the specification information to determine whether the current host machine meets the operating conditions; If the current host machine meets the operating conditions, the current host machine is used as the target host machine; If the current host machine does not meet the operating conditions, the business data is queried according to the specification information to obtain the target host machine.

5. The method according to claim 4, characterized in that The host machine type also includes a hot standby machine; The determining of the target host machine according to the specification information and the host machine type further includes: When the host machine type is the hot standby machine, the host machine type of the current host machine is converted to a normal host machine, and the current host machine is used as the target host machine.

6. The method according to claim 4, characterized in that If the current host machine does not meet the operating conditions, querying the service data according to the specification information to obtain the target host machine includes: According to the specification information, query the host information table to obtain a set of candidate hosts; sorting each candidate host in the candidate host set according to the specification information and the host architecture table; The target host machine is determined according to the sorting result.

7. The method according to claim 3, characterized in that The determining target information of the target host machine according to the business data and the specification information of the virtual machine corresponding to the initial host machine further includes: According to the specification information, the virtual processor corresponding to the virtual machine and the physical processor corresponding to the current host machine are released from the correspondence; According to the specification information, information corresponding to the current host in the host information table and the host architecture table is updated.

8. The method according to claim 1, characterized in that Binding the virtual processor of the virtual machine to the physical processor of the target host machine according to the specification information and the target information includes: According to the specification information and the target information, the host information table and the host architecture table are updated with information corresponding to the target host respectively; A correspondence is established between the virtual processor corresponding to the virtual machine and the physical processor corresponding to the target host machine according to the specification information and the target information.

9. The method according to claim 1, characterized in that The step of unbinding the virtual processor of the virtual machine from the physical processor of the initial host machine according to the specification information and the initial information includes: According to the specification information, the virtual processor corresponding to the virtual machine and the physical processor corresponding to the initial host machine are released from the correspondence; According to the specification information, information corresponding to the initial host in the host information table and the host architecture table is updated.

10. A processor scheduling device, characterized in that: The device comprises: An initial information determination module, configured to determine initial information of an initial host based on the connection status and service data of each host; the service data includes a host information table and a host architecture table; a target information determination module, configured to determine target information of a target host machine based on the service data and specification information of a virtual machine corresponding to the initial host machine; a processor binding module, configured to bind the virtual processor of the virtual machine to the physical processor of the target host machine according to the specification information and the target information; A processor unbinding module is used to unbind the virtual processor of the virtual machine from the physical processor of the initial host machine according to the specification information and the initial information.

11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are for causing a computer to execute the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Virtual machine migrating method and system based on NUMA architecture

    CN104123171A

  • Virtual machine scheduling method and device

    CN110362377A

  • Automatic migration method, system and device suitable for virtual machine and storage medium

    CN111190691A

  • Method and device for binding cloud host VCPU and host physical CPU

    CN112306627A

  • Virtual machine scheduling method, device and equipment and computer storage medium

    CN116932134A