Physical machine, resource scheduling method and storage medium

By running the virtualization manager on a physical machine, using time-sharing scheduling strategies and dynamic adjustment strategies, the problem of low scheduling efficiency of virtual GPU resource is solved, and the performance of virtual GPU and physical GPU resource utilization is improved.

CN120104262APending Publication Date: 2025-06-06HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311670338.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

How to reasonably schedule virtual GPU resources to improve the performance of virtual GPUs and the utilization of physical GPU resources.

Method used

By running the virtualization manager on a physical machine, the time-sharing scheduling strategy is used to schedule the virtual GPU resources, and the scheduling strategy is dynamically adjusted according to the operating status data to improve resource utilization and performance.

Benefits of technology

Reasonable scheduling of virtual GPU resources is realized, and the operation performance of virtual GPUs and the utilization rate of physical GPU resources are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104262A_ABST
    Figure CN120104262A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a physical machine, a resource scheduling method, equipment and a storage medium. In the embodiment of the invention, a physical computing resource object of a physical machine bears a virtual computing resource object required for running a virtualization instance, and different resource scheduling strategies are adopted to perform time-sharing scheduling on the virtual computing resource object; in the process of scheduling the virtual computing resources according to the currently used resource scheduling strategy, the running state data of the physical computing resource object and / or the currently borne virtual resource object is monitored, and the currently used resource scheduling strategy is dynamically adjusted according to the change condition of the running state data. Therefore, the resource scheduling strategy matched with the running state of the physical computing resource object and / or the virtual computing resource object is adopted, reasonable scheduling of the virtual computing resource object can be achieved, and the running performance of the virtual computing resource object and the resource utilization rate of the physical computing resource object are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a physical machine, a resource scheduling method, and a storage medium. Background Art

[0002] With the rapid development of deep learning technology, the requirements for computing resources are getting higher and higher. Graphics Processing Unit (GPU) is widely used due to its parallel computing capabilities. GPU has fast computing speed but high cost. In order to improve GPU utilization and reduce costs, virtual GPU technology has emerged.

[0003] The use of virtual GPU technology allows physical GPU resources to be divided into virtual GPU resources with resource specifications of 1 / 2, 1 / 4 or even smaller for use. Different virtual GPU resources are isolated from each other, and different tasks are completed by reusing physical GPU resources. However, how to reasonably schedule virtual GPU resources to improve the performance of virtual GPUs and the utilization of physical GPU resources has become a new problem that needs to be solved urgently. Summary of the invention

[0004] Multiple aspects of the present application provide a physical machine, a resource scheduling method and a storage medium for reasonably scheduling virtual computing resource objects carried on physical computing resource objects to improve the operating performance of the virtual computing resource objects and the resource utilization of the physical computing resource objects.

[0005] An embodiment of the present application provides a physical machine, and a virtualization manager runs on the hardware resources of the physical machine, the hardware resources include physical computing resource objects, which are used to carry virtual computing resource objects to run virtualized instances; the virtualization manager is used to: for a target physical computing resource object, according to a currently used resource scheduling policy, time-sharing schedule the virtual computing resource objects currently carried by the target physical computing resource object; and during the time-sharing scheduling process, monitor the operating status data of the target physical computing resource object and / or the virtual computing resource objects currently carried by the target physical computing resource object; according to changes in the operating status data, adjust the currently used resource scheduling policy, and according to the adjusted resource scheduling policy, continue to time-sharing schedule the virtual computing resource objects currently carried by the target physical computing resource object.

[0006] An embodiment of the present application also provides a resource scheduling method, comprising: for a target physical computing resource object on a physical machine, according to a currently used resource scheduling policy, time-sharing scheduling of a virtual computing resource object currently carried by the target physical computing resource object; during the time-sharing scheduling process, detecting the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object; according to changes in the operating status data, adjusting the currently used resource scheduling policy, and according to the adjusted resource scheduling policy, continuing to time-sharing scheduling of the virtual computing resource object currently carried by the target physical computing resource object.

[0007] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the steps in the above method.

[0008] In an embodiment of the present application, the virtual computing resource objects required for running the virtualized instance are carried on the physical computing resource objects of the physical machine, and different resource scheduling strategies are used to schedule the virtual computing resource objects in a time-sharing manner; in the process of scheduling the virtual computing resources according to the resource scheduling strategy currently used, the operating status data of the physical computing resource objects and / or the virtual resource objects currently carried by them are monitored, and the currently used resource scheduling strategy is dynamically adjusted according to the changes in the operating status data, so as to adopt a resource scheduling strategy that is adapted to the operating status of the physical computing resource objects and / or the virtual computing resource objects, so as to achieve reasonable scheduling of the virtual computing resource objects, improve the operating performance of the virtual computing resource objects and the resource utilization of the physical computing resource objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0010] Figure 1a A schematic diagram of the structure of a physical machine provided in an embodiment of the present application;

[0011] Figure 1b A schematic diagram of the internal architecture of a virtualization manager provided in an embodiment of the present application;

[0012] Figure 1c Another schematic diagram of the internal architecture of the virtualization manager provided in the embodiment of the present application;

[0013] Figure 1d A schematic diagram of a resource scheduling method provided in an embodiment of the present application;

[0014] Figure 2 A flowchart of another resource scheduling method provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of the structure of a resource scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0017] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0018] At present, the use of virtual GPU technology allows physical GPU resources to be divided into virtual GPU resources with resource specifications of 1 / 2, 1 / 4 or even smaller for use. Different virtual GPU resources are isolated from each other, and different tasks are completed by reusing physical GPU resources. This faces the problem of scheduling GPU resources. In view of this, in an embodiment of the present application, virtual GPUs are scheduled in a time slice rotation manner, allowing them to use physical GPU resources in a time-sharing manner, so as to achieve the purpose of reasonable scheduling of virtual GPUs and enable isolated virtual GPUs to complete related tasks.

[0019] Furthermore, in an embodiment of the present application, the virtual computing resource objects required for running the virtualized instance are carried on the physical computing resource objects of the physical machine, and different resource scheduling strategies are used to schedule the virtual computing resource objects in a time-sharing manner; in the process of scheduling the virtual computing resources according to the resource scheduling strategy currently used, the operating status data of the physical computing resource objects and / or the virtual resource objects currently carried by them are monitored, and the resource scheduling strategy currently used is dynamically adjusted according to the changes in the operating status data, so as to adopt a resource scheduling strategy that is adapted to the operating status of the physical computing resource objects and / or the virtual computing resource objects, thereby achieving reasonable scheduling of the virtual computing resource objects and improving the operating performance of the virtual computing resource objects and the resource utilization of the physical computing resource objects.

[0020] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0021] Figure 1a FIG. 1 is a schematic diagram of a physical machine 100 provided in an embodiment of the present application. Figure 1a As shown, the physical machine 100 includes hardware resources 10 and software resources 20 .

[0022] Among them, the hardware resources 10 at least include: a physical computing resource object 101. Further, the hardware resources 10 on the physical machine 100 may also include: other components such as memory, communication components, display, power supply components and audio components, which are not shown in the figure. Among them, the display and audio components are optional components, depending on the implementation form of the physical machine 100. For example, when the physical machine 100 is implemented as a traditional server, a cloud server or a server cluster, the display and audio components may not be included. In this embodiment, the type and quantity of the physical computing resource object 101 are not limited. The physical computing resource object 101 can be one or more. For example, the physical computing resource object 101 may include a graphics processor (Graphics Processing Unit, GPU), a central processing unit (Central Processing Unit, CPU), a data processor (Data Processing Unit, DPU), a tensor processor (Tensor Processing Unit, TPU), a cloud infrastructure processor (Cloud Infrastructure Processing Unit, CIPU) and an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC) and other physical resource objects with computing capabilities. In the embodiment of the present application, the physical computing resource object can be inserted into the physical machine in a pluggable manner, or it can be solidified or integrated physically, and there is no limitation on this.

[0023] The software resources 20 include kernel-mode software resources, which include at least: a virtualization manager 102 and an operating system (OS) of the physical machine 100; the virtualization manager 102 runs on the hardware resources 10 of the physical machine 100, and specifically, the virtualization manager 102 runs on the physical computing resource object 101. In addition to kernel-mode software resources, the software resources on the physical machine 100 also include user-mode software resources, which include: various application software that directly runs on the hardware resources of the physical machine 100, and virtualization instances created by the virtualization manager 102. Figure 1aAs shown in the figure, each virtualized instance has its own operating system. Relatively speaking, a physical machine can be used as a host, and its operating system can be called a host OS. A virtualized instance can be used as a client, and its operating system can also be called a guest OS. A virtualized instance can be a cloud host, an elastic computing service (ECS), a virtual machine (VM), or a container. Figure 1a In the figure, the virtualization instance is implemented as a VM as an example, but it is not limited to this.

[0024] In this embodiment, the virtualization manager 102 is not only used to create virtualized instances, but also responsible for managing virtualized instances. This embodiment does not limit the type of virtualization manager 102, and any virtualization manager that can create and manage virtualized instances is applicable to the embodiments of this application. For example, the virtualization manager can be a virtual monitor (Virtual Machine Monitor, VMM), which can also be called a Hypervisor. In this embodiment, the type and number of virtualized instances created by the virtualization manager 102 on the physical machine 100 are not limited, depending on the specific needs of the user. For example, a virtualized instance can create one or more virtualized instances. Each virtualized instance created by the virtualization manager 102 runs on the physical computing resource object 101, and each virtualized instance has an independent physical operating environment and resources.

[0025] In this embodiment, in order to provide each virtualized instance with an independent physical operating environment and resources, the virtualization manager 102 is also used to: during the initialization of the virtualized instance, create a virtual computing resource object 103 required for running the virtualized instance on the physical computing resource object 101. The virtual computing resource object is a virtualization of the physical computing resource object. For example, when the physical computing resource object is a physical GPU, the virtual computing resource object is a virtual GPU. When the physical computing resource object is a DPU, the virtual computing resource object is a virtual DPU, etc. The same physical computing resource object can carry multiple virtual computing resource objects of smaller granularity, or the same physical computing resource object can be divided into multiple virtual computing resource objects of smaller granularity, such as 1 / 2, 1 / 4, etc. Each virtual computing resource object evenly shares the video memory resources of the physical computing resource object, and shares various computing power resources of the physical computing resource object in a polling manner. The computing power resources of the physical computing resource object include, but are not limited to, graphics (Graphics) / computing (Compute) engine, 3D rendering engine, codec engine, etc.

[0026] Among them, the maximum number of virtual computing resource objects that a physical computing resource object can carry may be determined according to the resource specifications of the virtual computing resource objects supported by the physical computing resource object. For example, if the physical computing resource object supports virtual computing resource objects of 1 / 2 specification, then the physical computing resource object can carry a maximum of 2 virtual computing resource objects; if the physical computing resource object supports virtual computing resource objects of 1 / 4 specification, then the physical computing resource object can carry a maximum of 4 virtual computing resource objects; if the physical computing resource object supports virtual computing resource objects of 1 / 3 specification, then the physical computing resource object can carry a maximum of 3 virtual computing resource objects.

[0027] When creating a virtual computing resource object for a virtualized instance, a physical computing resource object with adapted resource specifications can be selected from the physical computing resource objects on the physical machine 100 based on the adaptation of the resource specifications required by the virtualized instance and the resource specifications of the virtual computing resource objects supported by the physical computing resource objects, and the virtual computing resource object can be created on the selected physical computing resource object. For example, assuming that the physical computing resource object supports a virtual computing resource object of 1 / 2 specification, the virtualization instance requires a virtual computing resource object of 1 / 2 specification, and the resource specifications of the virtual computing resource objects supported by the physical computing resource object are compatible with the resource specifications required by the virtualization instance. Then, when the number of virtual computing resource objects actually carried by the physical computing resource object does not reach the maximum number of virtual computing resource objects that it can carry, 2, the virtual computing resource objects required to run the virtualization instance can be created on the physical computing resource object; assuming that the physical computing resource object supports a virtual computing resource object of 1 / 4 specification, the virtualization instance requires a virtual computing resource object of 1 / 2 specification, the resource specifications of the virtual computing resource objects supported by the physical computing resource object are not compatible with the resource specifications required by the virtualization instance, and the virtual computing resource objects required to run the virtualization instance cannot be created on the physical computing resource object. In short, in the case of creating a virtualization instance, the virtualization manager 102 can also select a physical computing resource object whose supported resource specifications are compatible with the resource specifications required by the virtualization instance from the physical hardware resource object, and create the virtual computing resource object required to run the virtualization instance on the selected physical computing resource object. The virtualization manager 102 may select a physical computing resource object that matches the resource specification of the virtual computing resource object in any of the following ways:

[0028] Method 1: According to the principle of giving priority to creating virtual computing resource objects on different physical computing resource objects, create virtual computing resource objects on physical computing resource objects with adapted resource specifications. Specifically, according to the principle of giving priority to creating virtual computing resource objects on different physical computing resource objects, the physical computing resource objects on the physical machine can be traversed to obtain physical computing resource objects with adapted resource specifications, and virtual computing resource objects can be created on the obtained physical computing resource objects. In this method, the method of traversing the physical computing resource objects can be referred to as a breadth-first traversal method, which is used to try to minimize the number of virtual computing resource objects running on each physical computing resource object, that is, by traversing to give priority to obtaining physical computing resource objects with adapted resource specifications and the least number of virtual computing resource objects running thereon. In this method, all physical computing resource objects on the physical machine are required to support the creation of virtual computing resource objects with the same resource specifications. For example, taking the physical computing resource as a physical GPU, assuming that the physical machine includes 3 physical GPUs, then all 3 physical GPUs support a virtual GPU with 1 / 2 resource specifications, or all 3 physical GPUs support a virtual GPU with 1 / 4 resource specifications, or all 3 physical GPUs support a virtual GPU with 1 / 3 resource specifications. It is explained here that in the embodiments of the present application, for a physical computing resource object, before any virtual computing resource object is carried, various resource specifications are supported by default. After the first virtual computing resource object is created, the specification of the first virtual computing resource object is the resource specification supported by the physical computing resource object, and only virtual computing resource objects with this resource specification are allowed to be created subsequently.

[0029] Optionally, the process of traversing the physical computing resource objects on the physical machine using a breadth-first traversal method includes: traversing each physical computing resource object on the physical machine in turn according to a set traversal order; if the currently traversed physical computing resource object does not yet carry a virtual computing resource object, creating a virtual computing resource object required for running the virtualization instance on the currently traversed physical computing resource object; if the currently traversed physical computing resource object already carries a virtual computing resource object, continuing to traverse the next physical computing resource object until a physical computing resource object that does not yet carry a virtual computing resource object is traversed or all physical computing resource objects are traversed; after traversing all physical computing resource objects, if a physical computing resource object that does not yet carry a virtual computing resource object is not found, a physical computing resource object whose actual carrying quantity has not yet reached the maximum quantity can be selected from them, and the virtual computing resource object required for running the virtualization instance is created in the physical computing resource object. Optionally, a physical computing resource object with the smallest actual carrying quantity that has not reached the maximum quantity can be selected; or, a physical computing resource object with the smallest actual carrying quantity that has not reached the maximum quantity can be randomly selected, or, in the order of traversal, the first traversed physical computing resource object with the actual carrying quantity less than the maximum quantity can be selected, without limitation. Among them, the actual carrying quantity refers to the number of virtual computing resource objects that the physical computing resource object currently actually carries, including the case where no virtual computing resource objects have been carried, in which case the actual carrying quantity is 0; the maximum quantity refers to the number of virtual computing resource objects that the physical computing resource object can carry at most. For example, assuming that the physical computing resource object is a physical GPU, and it supports a virtual GPU with a resource specification of 1 / 4, the maximum quantity is 4. If 2 virtual GPUs have been created on the physical GPU, the actual carrying quantity is 2. Of course, as virtualized instances are continuously created, more virtual GPUs, such as 3 or 4, will be created on the physical GPU. In other words, the actual carrying quantity changes dynamically, but the actual carrying quantity is less than or equal to the maximum quantity.

[0030] In this method, the order of traversing the physical computing resource objects is not limited. The physical computing resource objects can be traversed in the order in which they are identified during the startup of the physical machine, or in the order from large to small or from small to large according to the numbers or other identifiers of the physical computing resource objects.

[0031] For ease of understanding, the above-mentioned method 1 is illustrated below. For example, the hardware resources of the physical machine include 4 physical computing resource objects that only support 1 / 4 of the resource specification, which are numbered 1, 2, 3 and 4 respectively. Then, the physical computing resource objects numbered 1, 2, 3 and 4 can be traversed in order from small to large according to the numbers of each physical computing resource object. Further, in one case, it is assumed that a virtual computing resource object with a 1 / 4 resource specification is created on each of the physical computing resource objects numbered 1, 2 and 3. Therefore, when traversing to the physical computing resource objects numbered 1, 2 and 3, the next physical computing resource object will continue to be traversed until the physical computing resource object numbered 4 is traversed, and the virtual computing resource object required to run the virtualized instance is created on the physical computing resource object numbered 4. In another case, it is assumed that two virtual computing resource objects with a resource specification of 1 / 4 are created on the physical computing resource objects numbered 1, 2, and 3, respectively, and one virtual computing resource object with a resource specification of 1 / 4 is created on the physical computing resource object numbered 4. In this way, after all the physical computing resource objects numbered 1, 2, 3, and 4 are traversed, the physical computing resource object numbered 2 can be randomly selected therefrom and the virtual computing resource object required for running the virtualized instance can be created on the physical computing resource object numbered 2, or the physical computing resource object with the smallest actual load quantity (i.e., the physical computing resource object numbered 4) can be selected therefrom and the virtual computing resource object required for running the virtualized instance can be created on the physical computing resource object numbered 4, or the first traversed physical computing resource object with an actual load quantity less than the maximum quantity (i.e., the physical computing resource object numbered 1) can be selected therefrom in order of numbering from small to large, and the virtual computing resource object required for running the virtualized instance can be created on the physical computing resource object numbered 1.

[0032] Method 2: According to the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object, create virtual computing resource objects on physical computing resource objects with matching resource specifications. Specifically, according to the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object, the physical computing resource objects on the physical machine can be traversed to obtain physical computing resource objects with matching resource specifications, and virtual computing resource objects can be created on the obtained physical computing resource objects. In this method, the method of traversing physical computing resource objects can be referred to as a depth-first traversal method. In this method, it is supported to create a variety of virtual computing resource objects with different resource specifications on different physical computing resource objects of a physical machine. Of course, it is only supported to create virtual computing resource objects with the same resource specification on the same physical computing resource object. This situation can be referred to as mixed deployment of virtual computing resource objects. Taking the physical computing resource object as a physical GPU as an example, on a physical machine containing multiple physical GPUs, with the physical GPU as the granularity, different physical GPUs are allowed to be split into virtual GPUs of multiple resource specifications, for example, some physical GPUs are allowed to be split into virtual GPUs of 1 / 2 resource specifications, some physical GPUs are allowed to be split into virtual GPUs of 1 / 3 resource specifications, and some physical GPUs are allowed to be split into virtual GPUs of 1 / 4 resource specifications, and so on. There is no limitation on the types of resource specifications of virtual GPUs that can be split from multiple physical GPUs on a physical machine, for example, there can be 2, 3, 4 or even more types. Among them, the use of mixed virtual computing resource objects is beneficial to the resource utilization of physical computing resource objects, and the use of depth-first traversal method is beneficial to improving the operating performance of virtual computing resource objects; and the depth-first traversal method and mixed virtual computing resource objects can coexist, and the combination of the two can simultaneously improve the resource utilization of physical computing resource objects and the operating performance of virtual computing resource objects.

[0033] Optionally, a process of traversing the physical computing resource objects on a physical machine using a depth-first traversal method includes: traversing each physical computing resource object on the physical machine in turn according to a set traversal order; if the actual carrying capacity of the currently traversed physical computing resource object has not reached the maximum number, and the resource specifications of the virtual computing resource objects it supports are compatible with the resource specifications required for the virtualization instance, then creating the virtual computing resource objects required to run the virtualization instance on the currently traversed physical computing resource object; if the actual carrying capacity of the currently traversed physical computing resource object has reached the maximum number, or the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object are not compatible with the resource specifications required for the virtualization instance, then continue to traverse the next physical computing resource object. Or

[0034] Optionally, another process of traversing the physical computing resource objects on the physical machine using a depth-first traversal method includes: traversing the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity in sequence according to the set traversal order; if the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object are compatible with the resource specifications required by the virtualization instance, creating the virtual computing resource objects required to run the virtualization instance on the currently traversed physical computing resource object; if the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object are not compatible with the resource specifications required by the virtualization instance, continuing to traverse the next physical computing resource object whose actual carrying quantity has not yet reached the maximum quantity. Among them, the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity include the case where no virtual computing resource objects have been carried, and also include the case where virtual computing resource objects have been carried but the number of virtual computing resource objects carried has not yet reached the maximum quantity. In this manner, physical computing resource objects whose actual carrying capacity has not yet reached the maximum number are traversed, and there is no need to traverse physical computing resource objects whose actual carrying capacity has reached the maximum number, which can save computing resources consumed in the traversal process and improve traversal efficiency.

[0035] Based on this, before traversing the physical computing resource object, the virtualization manager is also used to determine from multiple physical computing resource objects the physical computing resource objects whose carrying capacity of the virtual computing resource objects has not reached the maximum number, so as to traverse from the physical computing resource objects whose carrying capacity has not reached the maximum number to obtain physical computing resource objects that are adapted to the resource specifications required to create the virtual computing resource objects.

[0036] Further optionally, in order to identify the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity, the virtualization manager 102 may maintain a resource management list, through which the resource management list records the resource carrying information of each physical computing resource object, the resource carrying information including but not limited to the resource specifications supported by each physical computing resource object, the maximum number of virtual computing resource objects that can be carried, the actual carrying quantity, and the remaining carrying quantity, etc. Based on this, the virtualization manager 102 may first query the resource management list to determine the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity (or the remaining carrying quantity is not 0), and then traverse these physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity according to the set traversal order.

[0037] In this method, the order of traversing the physical computing resource objects is also not limited. Each physical computing resource object can be traversed according to the order in which each physical computing resource object is identified during the physical machine startup process, or can be traversed in order from large to small or from small to large according to the number or other identification of each physical computing resource object.

[0038] For ease of understanding, the second method is described below with an example. Assume that the hardware resources of the physical machine include four physical computing resource objects, numbered 1, 2, 3, and 4; among them, the physical computing resource object numbered 1 supports the creation of a virtual computing resource object with a 1 / 2 resource specification and already carries one virtual computing resource object, the physical computing resource object numbered 2 does not yet carry any virtual computing resource object, the physical computing resource object numbered 3 does not yet carry any virtual computing resource object, and the physical computing resource object numbered 4 does not yet carry any virtual computing resource object. Based on this, when creating a virtualized instance of a virtual computing resource object that requires a 1 / 4 resource specification, the virtualization manager 102 can traverse the physical computing resource objects numbered 1, 2, 3, and 4 in order from small to large according to the numbers of the physical computing resource objects. When traversing to the physical computing resource object numbered 1, since the resource specification is not compatible with the resource specification required by the virtualization instance, it is necessary to continue traversing the physical computing resource object numbered 2. Since the physical computing resource object numbered 2 does not yet carry any virtual computing resource objects, a virtual computing resource object with a 1 / 4 resource specification can be created on the physical computing resource object numbered 2. Subsequently, only virtual computing resource objects with a 1 / 4 resource specification can be created on the physical computing resource object numbered 2, and the traversal ends.

[0039] Regardless of which of the above methods the virtualization manager 102 adopts to select physical computing resource objects with resource specifications adapted to create virtual computing resource objects, in order for each virtual computing resource object to be reasonably scheduled, obtain sufficient computing resources, and achieve fairness in resource scheduling to a certain extent, the virtualization manager 102 is also used to: with the physical computing resource object as the granularity, for any physical computing resource object, in a time slice rotation manner, time-sharing scheduling of the virtual computing resource objects currently carried by any physical computing resource object. Among them, time-sharing scheduling refers to a scheduling method that allows different virtual computing resource objects on the same physical computing resource object to use the resources of the physical computing resource object in time periods. Specifically, the running time of the physical computing resource object can be divided into time slices, and each virtual computing resource object carried on the physical computing resource object can be scheduled in different time slices, so that the virtual computing resource objects use the resources of the physical computing resource object in their respective corresponding time slices. Among them, for the virtual computing resource object, it monopolizes the shared resources of the physical computing resource object in the allocated time slice, and other virtual computing resource objects will wait until their own time slices arrive. The shared resources here refer to the resources on the physical computing resource object that can be reused by multiple virtual computing resource objects in a time-sharing manner. The shared resource objects will vary depending on the physical computing resource objects. If the physical computing resource object is a physical GPU, the shared resources can be computing resources such as the graphics / computing engine of the physical GPU. For a virtual computing resource object, in the time slice allocated to it, the processes running on the virtual computing resource object can run serially. Among them, the fairness of resource scheduling can be achieved to a certain extent through time-sharing scheduling.

[0040] In this embodiment, when the virtualization manager 102 schedules each virtual computing resource object carried on any physical computing resource object, it can schedule each virtual computing resource object in order, but the specific order is not limited, for example, it can be in the order in which each virtual computing resource object is created. In addition, each physical computing resource object can maintain a physical run list (runlist), and each virtual computing resource object also maintains a virtual runlist; wherein the virtual runlist is used to store the tasks that the virtual computing resource object needs to run, which are the tasks that the virtual computing resource object needs to execute and submitted by the virtualization instance corresponding to the virtual computing resource object; accordingly, the physical runlist is used to store the tasks stored in the virtual runlist of the virtual computing resource object that is scheduled. The virtualization manager 102 schedules each virtual computing resource object in sequence. For the currently scheduled virtual computing resource object, the virtualization manager 102 adds the tasks stored in the virtual runlist to the physical runlist maintained by the physical computing resource object that carries the scheduled virtual computing resource object by writing to the register. In this way, within the time slice of the scheduled virtual computing resource object, the physical computing resource object will execute the tasks added to the physical runlist, and so on.

[0041] Further, the embodiments of the present application provide a variety of different resource scheduling strategies, and different resource scheduling strategies are used to time-share schedule virtual computing resource objects, but the methods or logics of time-share scheduling virtual computing resource objects during the time-share scheduling process are different. For example, the resource scheduling strategies provided in the embodiments of the present application include but are not limited to: best effort scheduling strategy, equal share scheduling strategy, and fixed share scheduling strategy. Among them, the best effort scheduling strategy refers to a scheduling strategy that balances the performance between virtual computing resource objects as much as possible, allowing a virtual computing resource object on the same physical computing resource object to use time slices not used by other virtual computing resource objects. The best effort scheduling strategy allows tasks running on virtual computing resource objects to use the resources of physical computing resource objects as much as possible, including preempting the time slices of virtual computing resource objects that are not running tasks. Taking the physical GPU and the virtual GPU as an example, the virtual GPU running graphics-intensive tasks can preempt the time slices allocated to the virtual GPU running graphics-light tasks.

[0042] The Equal share scheduling strategy is a scheduling strategy that evenly distributes the running time of a physical computing resource object to each virtual computing resource object currently carried by it. For the Equal share scheduling strategy, the running time of the physical computing resource object will be divided into time slices according to the default time slice length it supports, and the virtual computing resource objects currently carried by the physical computing resource object will be scheduled in turn. The scheduled virtual computing resource objects will monopolize the shared resources of the physical computing resource object within a time slice. This strategy can fully utilize the resources of the physical computing resource object while ensuring that the created virtual computing resource objects are fairly scheduled, which is conducive to improving the performance of the virtual computing resource object. It should be noted that the frequency of virtual computing resource objects being scheduled will change with the startup or shutdown of the virtualization instance, or with the change in the number of virtual computing resource objects, which will cause the running performance of the virtual computing resource objects to change. For the sake of distinction, the default time slice length supported by the Equal share scheduling strategy is called the first time slice length. The first time slice length can be flexibly set according to application requirements, for example, it can be 2ms, 3ms, etc. Taking the first time slice length of 2ms as an example, assuming that the maximum number of virtual computing resource objects that a physical computing resource object can carry is 4, and the number of virtual computing resource objects currently carried is 2, recorded as virtual computing resource objects a1 and a2, when using Equal When the share scheduling strategy is used, the virtual computing resource objects a1 and a2 can be scheduled in turn according to the time slice of 2ms, that is, the virtual computing resource object a1 is scheduled within the first 2ms, the virtual computing resource object a2 is scheduled within the second 2ms, the virtual computing resource object a1 is scheduled again within the third 2ms, and the virtual computing resource object a2 is scheduled again within the fourth 2ms, and they are scheduled in turn in sequence; when a new virtual computing resource object a3 is added to the physical computing resource object, the virtual computing resource objects a1, a2 and a3 can be scheduled in turn according to the time slice of 2ms, that is, the virtual computing resource object a1 is scheduled within the first 2ms, the virtual computing resource object a2 is scheduled within the second 2ms, the virtual computing resource object a3 is scheduled within the third 2ms, the virtual computing resource object a1 is scheduled again within the fourth 2ms, the virtual computing resource object a2 is scheduled again within the fifth 2ms, and the virtual computing resource object a3 is scheduled again within the sixth 2ms, and they are scheduled in turn in sequence. It can be seen that as the number of virtual computing resource objects increases, taking the increase from 2 to 3 as an example, a single virtual computing resource object is scheduled once every 4ms instead of once every 6ms. Since the time the physical computing resource objects are occupied is reduced, the operating performance will decrease.On the contrary, as the number of virtual computing resource objects decreases, for example, from 3 to 2, a single virtual computing resource object is scheduled once every 6ms instead of once every 4ms. As the time occupied by the physical computing resource object increases, the operating performance will be improved.

[0043] The Fixed share scheduling strategy is a scheduling strategy that allocates the running time of a physical computing resource object to the maximum number of virtual computing resource objects that it can carry. For the Fixed share scheduling strategy, the running time of the physical computing resource object is divided into time slices according to the default time slice length it supports. According to the maximum number of virtual computing resource objects that the physical computing resource object can carry, a relatively fixed time slice is allocated to the virtual computing resource objects currently carried by the physical computing resource object, and the virtual computing resource objects are scheduled when the allocated time slice arrives. The Fixed share scheduling strategy can ensure the fairness of scheduling of each virtual computing resource object, and prevent the virtual computing resource objects running high-priority tasks (such as graphics-intensive tasks) from preempting the running time of virtual computing resource objects running low-priority tasks (such as graphics-light tasks). However, when some virtual computing resource objects are idle or not created, it is easy to cause waste of physical computing resource objects, resulting in low overall resource utilization of physical computing resource objects. For the sake of distinction, the default time slice length supported by the Fixed share scheduling strategy is called the second time slice length. The second time slice length can be flexibly set according to application requirements, for example, it can be 2ms, 3ms, etc. Taking the second time slice length of 2ms as an example, assuming that the maximum number of virtual computing resource objects that a physical computing resource object can carry is 4, and the number of virtual computing resource objects currently carried is 2, recorded as virtual computing resource objects b1 and b2, when using Fixed When the share scheduling strategy is used, with 4 time slices as one round of scheduling, the first and second time slices in a single round of scheduling can be allocated to virtual computing resource objects b1 and b2, and the third and fourth time slices are reserved for subsequently created virtual computing resource objects, that is, in the first round of scheduling, the virtual computing resource object b1 is scheduled within the first 2ms, the virtual computing resource object b2 is scheduled within the second 2ms, and the third 2ms and the fourth 2ms are idle; then enter the second round of scheduling, in which the virtual computing resource object b1 is scheduled within the first 2ms (i.e., the fifth 2ms in the overall scheduling), the virtual computing resource object b2 is scheduled within the second 2ms (i.e., the sixth 2ms in the overall scheduling), the third 2ms (i.e., the seventh 2ms in the overall scheduling) and the fourth 2ms (i.e., the eighth 2ms in the overall scheduling) are idle, and so on for subsequent rounds of scheduling.

[0044] Regardless of the resource scheduling strategy, the process of scheduling all the maximum number of time slices once is recorded as a round of time-sharing scheduling. For example, assuming that the maximum number of virtual computing resource objects that a physical computing resource object can support is 4, regardless of whether the number of virtual computing resource objects actually carried by the physical computing resource object is 4, the process of scheduling all 4 time slices once is called a round of time-sharing scheduling. It should be noted that the length of the time slice may be different in different resource scheduling strategies, and there is no limitation on this.

[0045] In an embodiment of the present application, the virtualization manager 102 may use a resource scheduling strategy with a physical computing resource object as the granularity to perform time-sharing scheduling on the virtual computing resource objects currently carried by any physical computing resource object. Among them, the method or logic of time-sharing scheduling may be determined by the resource scheduling strategy currently used. Different resource scheduling strategies have different methods or logics for time-sharing scheduling, or different resource scheduling strategies correspond to different methods of allocating time slices for virtual computing resource objects. The following is an exemplary description of the process in which the virtualization manager 102 uses a physical computing resource object as the granularity and adopts different resource scheduling strategies to perform time-sharing scheduling on the virtual computing resource objects currently carried by any physical computing resource object. For the sake of ease of description, any physical computing resource object is recorded as a target physical computing resource object.

[0046] Case 1: The number of virtual computing objects currently carried by the target physical computing resource object has reached the maximum number. In this case, no matter which resource scheduling strategy is adopted, the time-sharing scheduling method is the same. Assume that the target physical computing resource object can carry a maximum of 4 virtual computing resource objects with 1 / 4 resource specifications, and currently carries 4 virtual computing resource objects with 1 / 4 resource specifications, namely virtual computing resource objects c1, c2, c3 and c4. Assume that the length of the time slice is 2ms, no matter which resource scheduling strategy is adopted, virtual computing resource objects c1-c4 are scheduled in turn according to the time slice of 2ms, that is, virtual computing resource object c1 is scheduled within the first 2ms, virtual computing resource object c2 is scheduled within the second 2ms, virtual computing resource object c3 is scheduled within the third 2ms, and virtual computing resource object c4 is scheduled within the fourth 2ms, and they are scheduled in turn.

[0047] Case 2: The number of virtual computing resource objects currently carried by the target physical computing resource object (i.e., the actual number of carried objects) has not reached the maximum number. In this case, the process of time-sharing scheduling of virtual computing resource objects using different resource scheduling strategies is different. Assume that the target physical computing resource object can carry up to 4 virtual computing resource objects with 1 / 4 resource specifications, and currently carries 3 virtual computing resource objects with 1 / 4 resource specifications, namely virtual computing resource objects d1, d2, and d3, and assume that the length of the time slice is 2ms. Optionally, when the Equal share scheduling strategy is used, virtual computing resource objects d1, d2, and d3 are scheduled in turn, that is, virtual computing resource object d1 is scheduled within the first 2ms, virtual computing resource object d2 is scheduled within the second 2ms, virtual computing resource object d3 is scheduled within the third 2ms, virtual computing resource object d1 is scheduled within the fourth 2ms, virtual computing resource object d2 is scheduled within the fifth 2ms, virtual computing resource object d3 is scheduled within the sixth 2ms, and so on. Optionally, when the Fixed share scheduling strategy is used, with 4 time slices as one round of scheduling, the first time slice, the second time slice and the third time slice in a single round of scheduling can be allocated to the virtual computing resource objects d1, d2 and d3, and the fourth time slice is reserved for the subsequently created virtual computing resource objects, that is, in the first round of scheduling, the virtual computing resource object d1 is scheduled within the first 2ms, the virtual computing resource object d2 is scheduled within the second 2ms, the virtual computing resource object d3 is scheduled within the third 2ms, and the fourth 2ms is idle; then the second round of scheduling is entered, in which the virtual computing resource object d1 is scheduled within the first 2ms (i.e., the fifth 2ms in the overall scheduling), the virtual computing resource object d2 is scheduled within the second 2ms (i.e., the sixth 2ms in the overall scheduling), the virtual computing resource object d3 is scheduled within the third 2ms (i.e., the seventh 2ms in the overall scheduling), and the fourth 2ms (i.e., the eighth 2ms in the overall scheduling) is idle, and so on for subsequent rounds of scheduling.

[0048] In this embodiment, in order to improve the operation performance of virtual computing resource objects and the resource utilization rate of physical computing resource objects while performing fair scheduling on virtual computing resource objects, the virtualization manager 102 monitors the operation status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling of the virtual computing resource object currently carried by the target physical computing resource object using the current resource scheduling policy; dynamically adjusts the currently used resource scheduling policy according to the monitored changes in the operation status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object, and continues to perform time-sharing scheduling on the virtual computing resource object currently carried by the target physical computing resource object according to the adjusted resource scheduling policy. It should be noted that, with the change of time, the number of virtual computing resource objects carried by the target physical computing resource object may change, and the change in the number may cause the change in the operation status of the target physical computing resource object and / or the virtual computing resource object carried by the target physical computing resource object. Among them, according to the changes in the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object, the resource scheduling strategy used is dynamically adjusted, and the resource scheduling strategy adapted to the operating status of the target physical computing resource object and / or the virtual computing resource object is used as much as possible. This can improve the operating performance of the virtual computing resource object and the resource utilization of the physical computing resource object while fairly scheduling the virtual computing resource object.

[0049] In this embodiment, the virtualization manager monitors the operating status data of the target physical computing resource object and / or the virtual computing resource object during the time-sharing scheduling process, and dynamically adjusts the currently used resource scheduling strategy according to the changes in the monitored operating status data, which can be divided into the following three implementation methods:

[0050] Implementation method 1: The virtualization manager monitors the running status data of the target physical computing resource object, and dynamically adjusts the currently used resource scheduling strategy according to the change of the running status data of the target physical computing resource object.

[0051] The operation status data of the target physical computing resource object includes: at least one of power consumption, temperature, resource utilization, and the number of virtual computing resource objects actually carried. Accordingly, the virtualization manager monitors the operation status data of the target physical computing resource object, including: monitoring at least one of the power consumption, temperature, resource utilization, and the number of virtual computing resource objects actually carried by the target physical computing resource object as the operation status data of the target physical computing resource object; and dynamically adjusting the currently used resource scheduling strategy according to at least one of the power consumption, temperature, resource utilization, and the number of virtual computing resource objects actually carried by the target physical computing resource object.

[0052] In actual applications, an application programming interface (API) required for obtaining the various types of operating status parameters listed above can be provided in the driver of the physical computing resource object. The virtualization manager can call the API for obtaining power consumption provided in the driver of the target physical computing resource object to obtain the power consumption data of the target physical computing resource object, call the API for obtaining temperature to obtain the temperature data of the target physical computing resource object, call the API for obtaining resource utilization to obtain the resource utilization of the target physical computing resource object, and call the API for obtaining the number of virtual computing resource objects actually carried to obtain the number of virtual computing resource objects actually carried by the target physical computing resource object. Of course, the virtualization manager can also obtain the number of virtual computing resource objects actually carried by the target physical computing resource object from the resource management list it maintains.

[0053] Accordingly, when the virtualization manager dynamically adjusts the currently used resource scheduling policy according to at least one of the power consumption, temperature, resource utilization rate of the target physical computing resource object and the number of virtual computing resource objects actually carried, it is specifically used to: when operating status data that changes from a first data range to a second data range appears in at least one operating status data of the target physical computing resource object, adjust the currently used first scheduling policy to the second scheduling policy; when operating status data that changes from the second data range to the first data range appears in the operating status data, adjust the currently used second scheduling policy to the first scheduling policy; wherein the first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

[0054] For example, when the power consumption data of the target physical computing resource object is in the range of [A, B], the first scheduling strategy is used, and when the power consumption data is in the range of [C, D], the second scheduling strategy is used, wherein A, B, C, and D are numerical values, and C is greater than B. When the power consumption data changes from being in the range of [A, B] to being in the range of [C, D], the first scheduling strategy currently in use is adjusted to the second scheduling strategy; when the power consumption data changes from being in the range of [C, D] to being in the range of [A, B], the second scheduling strategy currently in use is adjusted to the first scheduling strategy. For another example, when the temperature of the target physical computing resource object is in the range of [E, F], the first scheduling strategy is used, and when the temperature is in the range of [G, H], the second scheduling strategy is used, wherein E, F, G, and H are numerical values, and G is greater than F. When the temperature changes from being in the range of [E, F] to being in the range of [G, H], the first scheduling strategy currently in use is adjusted to the second scheduling strategy; when the temperature changes from being in the range of [G, H] to being in the range of [E, F], the second scheduling strategy currently in use is adjusted to the first scheduling strategy. The adjustment relationship between other operating status data of the target physical computing resource object and the resource scheduling strategy can be found in the above description related to power consumption or temperature, and no further examples are given here. It should be noted that the above examples of the first data range and the second data range are given with the numerical range of the closed interval, but are not limited to this. The corresponding state threshold can also be set to regard the situation less than the corresponding state threshold as the first data range, and the situation greater than or equal to the corresponding state threshold as the second data range.

[0055] Implementation method 2: The virtualization manager monitors the operating status data of the virtual computing resource object currently carried by the target physical computing resource object, and dynamically adjusts the currently used resource scheduling strategy according to the changes in the operating status data of the virtual computing resource object currently carried by the target physical computing resource object.

[0056] Among them, the running status data of the virtual computing resource object includes: at least one of the resource utilization of the virtual computing resource object and the resource utilization of the sub-resource objects contained in the target physical computing resource object. Relative to the resource utilization of the sub-resource objects contained in the target physical computing resource object, the resource utilization of the virtual computing resource object refers to the overall resource utilization of the virtual computing resource object for the physical computing resource object, including its resource utilization of each sub-resource object contained in the target physical computing resource object. The sub-resources contained in the target physical computing resource object include but are not limited to: computing / graphics engine, codec engine, 3D rendering engine, graphics card memory, etc. Correspondingly, the virtualization manager monitors the running status data of the virtual computing resource object, including: monitoring the resource utilization of the virtual computing resource object and at least one of the resource utilization of the sub-resource objects contained in the target physical computing resource object of the virtual computing resource object as the running status data of the virtual computing resource object.

[0057] Optionally, for any virtual computing resource object, the virtualization manager may monitor the resource utilization of the virtual computing resource object as the running status data of the virtual computing resource object; and / or monitor the resource utilization of the virtual computing resource object for the computing / graphics engine contained in the target physical computing resource object as the running status data of the virtual computing resource object; and / or monitor the resource utilization of the virtual computing resource object for the 3D rendering engine contained in the target physical computing resource object as the running status data of the virtual computing resource object; and / or monitor the resource utilization of the virtual computing resource object for the graphics card memory contained in the target physical computing resource object as the running status data of the virtual computing resource object; and / or monitor the resource utilization of the virtual computing resource object for the codec engine contained in the target physical computing resource object as the running status data of the virtual computing resource object; etc. In actual applications, the driver of the physical computing resource object may provide an API required for obtaining the various types of running status parameters listed above, based on which the virtualization manager may call the corresponding API provided by the driver of the target physical computing resource object to obtain the corresponding running status data. For example, the resource utilization of the virtual computing resource object is obtained by calling an API for obtaining the resource utilization of the virtual computing resource object; the resource utilization of the virtual computing resource object for the computing / graphics engine, codec engine, 3D rendering engine and / or graphics card memory contained in the target physical computing resource object is obtained by calling an API for obtaining the resource utilization of the virtual computing resource object for sub-resource objects such as the computing / graphics engine, codec engine, 3D rendering engine and / or graphics card memory.

[0058] Accordingly, the virtualization manager can dynamically adjust the currently used resource scheduling strategy based on the resource utilization of the virtual computing resource object and at least one of the resource utilizations of sub-resource objects such as the computing / graphics engine, codec engine, 3D rendering engine and / or graphics card memory contained in the target physical computing resource object.

[0059] Further optionally, when the virtualization manager dynamically adjusts the currently used resource scheduling policy based on the resource utilization of the virtual computing resource object and at least one of the resource utilizations of sub-resource objects such as the computing / graphics engine, the codec engine, the 3D rendering engine and / or the graphics card memory contained in the target physical computing resource object, it is specifically used to: when operating status data that changes from a first data range to a second data range appears in at least one operating status data of the target virtual computing resource object, adjust the currently used first scheduling policy to the second scheduling policy; when operating status data that changes from the second data range to the first data range appears in the operating status data, adjust the currently used second scheduling policy to the first scheduling policy; wherein the first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

[0060] For example, when the resource utilization of the virtual computing resource object is within the range of [a, b], the first scheduling strategy is used, and when the resource utilization is within the range of [c, d], the second scheduling strategy is used, wherein a, b, c, and d are numerical values, and c is greater than b. When the resource utilization of the virtual computing resource object changes from being within the range of [a, b] to being within the range of [c, d], the first scheduling strategy currently in use is adjusted to the second scheduling strategy; when the resource utilization changes from being within the range of [c, d] to being within the range of [a, b], the second scheduling strategy currently in use is adjusted to the first scheduling strategy. For another example, when the resource utilization of the virtual computing resource object for any sub-resource object is within the range of [e, f], the first scheduling strategy is used, and when the resource utilization for any sub-resource object is within the range of [g, h], the second scheduling strategy is used, wherein e, f, g, and h are numerical values, and g is greater than f. When the resource utilization of any sub-resource object changes from being in the range of [e, f] to being in the range of [g, h], the first scheduling strategy currently in use is adjusted to the second scheduling strategy; when the resource utilization of any sub-resource object changes from being in the range of [g, h] to being in the range of [e, f], the second scheduling strategy currently in use is adjusted to the first scheduling strategy. It should be noted that the above examples of the first data range and the second data range are given with closed interval numerical ranges, but are not limited to this. The corresponding state threshold can also be set so that the situation less than the corresponding state threshold is regarded as the first data range, and the situation greater than or equal to the corresponding state threshold is regarded as the second data range.

[0061] Implementation method three: The virtualization manager simultaneously monitors the operating status data of the target physical computing resource object and the operating status data of the virtual computing resource object currently carried by the target physical computing resource object, and dynamically adjusts the currently used resource scheduling strategy according to changes in the operating status data of the physical computing resource object and the operating status data of the virtual computing resource object.

[0062] Specifically, the virtualization manager can simultaneously monitor at least one of the power consumption, temperature, resource utilization rate of the target physical computing resource object, and the number of virtual computing resource objects actually carried as the operating status data of the target physical computing resource object, and monitor at least one of the resource utilization rate of the virtual computing resource object and the resource utilization rate of the sub-resource objects contained in the target physical computing resource object as the operating status data of the virtual computing resource object. The detailed implementation methods for monitoring the operating status data of the target physical computing resource object and the detailed implementation methods for monitoring the operating status data of the virtual computing resource object can be found in the description above, which will not be repeated here.

[0063] Accordingly, when the virtualization manager dynamically adjusts the currently used resource scheduling policy according to the changes in the operating status data of the physical computing resource object and the operating status data of the virtual computing resource object, when at least one operating status data of the target physical computing resource object and at least one operating status data of the virtual computing resource object changes from a first data range to a second data range, the currently used first scheduling policy is adjusted to a second scheduling policy; when operating status data changes from the second data range to the first data range, the currently used second scheduling policy is adjusted to the first scheduling policy; wherein the first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

[0064] In the above embodiment, the first scheduling policy and the second scheduling policy are not limited and may be any two resource scheduling policies that can be used by the virtualization manager 102. In an optional embodiment, the first scheduling policy may be an Equalshare scheduling policy, and correspondingly, the second scheduling policy may be a Fixed share scheduling policy. When the resource utilization rate of the target physical computing resource object is low, the temperature is low or the power consumption is low, or when the resource utilization rate of the virtual computing resource object is low, or when the resource utilization rate of the virtual computing resource object to the sub-resource object contained in the target physical computing resource object is low, the Equal share scheduling strategy is adopted, which can not only ensure the fair scheduling of the virtual computing resource object, but also make full use of the resource utilization rate of the physical computing resource object (the physical computing resource object is used in each time slice), which is conducive to improving the operation performance of the virtual computing resource object; when the resource utilization rate of the target physical computing resource object is high, the temperature is high or the power consumption is high, or when the resource utilization rate of the virtual computing resource object is high, or when the resource utilization rate of the virtual computing resource object to the sub-resource object contained in the target physical computing resource object is high, the Fixed share scheduling strategy is adopted, which can ensure that each virtual computing resource object is fairly scheduled and ensure the stable operation of the virtual computing resource object; in addition, compared with the Equal share scheduling strategy, it is also conducive to reducing the performance jitter caused by the change in the number of virtual computing resource objects. The various lower running status data listed above refer to the situations within the first data range, and correspondingly, the various higher running status data listed above refer to the situations within the second data range.

[0065] In this embodiment, before adjusting the resource scheduling policy, the virtualization manager performs time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the currently used resource scheduling policy. The time-sharing scheduling process will vary depending on the currently used resource scheduling policy, as illustrated below with an example.

[0066] For example, before the resource scheduling policy is adjusted, the resource scheduling policy currently used is the first scheduling policy, and the first scheduling policy is the Equal share scheduling policy. In this example, the time-sharing scheduling process includes: scheduling at least one virtual computing resource object currently carried on the target physical computing resource object in turn according to the default first time slice length of the Equal share scheduling policy, so as to evenly distribute the running time of the target physical computing resource object to each virtual computing resource object currently carried by it. For example, the target physical computing resource object currently carries 4 virtual computing resource objects with a resource specification of 1 / 4, and the length of the first time slice is 2ms, then the current 4 virtual computing resource objects are time-sharing scheduled in turn according to the time slice of 2ms. For another example, the target physical computing resource object currently carries 3 virtual computing resource objects with a resource specification of 1 / 4, and the length of the first time slice is 2ms, then the current 3 virtual computing resource objects are still time-sharing scheduled in turn according to the time slice of 2ms.

[0067] For another example, before the resource scheduling policy is adjusted, the resource scheduling policy currently used is the second scheduling policy, and the second scheduling policy is the Fixed share scheduling policy. In this example, the time-sharing scheduling process includes: according to the default second time slice length of the Fixedshare scheduling policy and the maximum number of virtual computing resource objects that the target physical computing resource object can carry, allocating fixed time slices to each virtual computing resource object currently carried by the target physical computing resource object, and scheduling the virtual computing resource objects within the allocated time slices, according to the maximum number of time slices that are scheduled once as a round of time-sharing scheduling; wherein the number of virtual computing resource objects currently carried on the target physical computing resource object is less than or equal to the maximum number. For example, the target physical computing resource object can carry up to 4 virtual computing resource objects with a resource specification of 1 / 4, and currently has carried 4 virtual computing resource objects with a resource specification of 1 / 4, and the second time slice length is 2ms, then the current 4 virtual computing resource objects are scheduled in turn according to 2ms. For another example, the target physical computing resource object can carry a maximum of 4 virtual computing resource objects with 1 / 4 resource specifications. It currently carries 3 virtual computing resource objects with 1 / 4 resource specifications (not reaching the maximum number). The length of the second time slice is 2ms. Then, in each round of time-sharing scheduling, these 3 virtual computing resource objects are scheduled within the allocated 3 time slices, and the remaining 1 time slice is idle.

[0068] Further optionally, no matter what kind of operating status data is used to dynamically adjust the resource scheduling policy currently in use, after dynamically adjusting the resource scheduling policy currently in use, the virtualization manager may continue to time-share schedule the virtual computing resource objects currently carried by the target physical computing resource objects according to the adjusted resource scheduling policy. Among them, the adjusted resource scheduling policy may be the first resource scheduling policy or the second resource scheduling policy, depending on the changes in the monitored operating status data. For example, if the monitored operating status data contains operating status data that changes from the first data range to the second data range, the adjusted resource scheduling policy is the second scheduling policy; if the monitored operating status data contains operating status data that changes from the second data range to the first data range, the adjusted resource scheduling policy is the first scheduling policy.

[0069] In this embodiment, for the same virtual computing resource object, the length of time it is scheduled in a round of time-sharing scheduling may change before and after the resource scheduling strategy is adjusted. In this embodiment, the length of time a single virtual computing resource object is scheduled in a round of time-sharing scheduling is called a single round scheduling duration, and a round of time-sharing scheduling refers to the process of scheduling all the maximum number of time slices once. For example, assuming that the target physical computing resource object can carry a maximum of 4 virtual computing resource objects with 1 / 4 resource specifications, and the default time slice length is 2ms, then the process of scheduling all two time slices once is called a round of time-sharing scheduling, that is, the duration of a round of time-sharing scheduling is 8ms. Assuming that the Equal share scheduling strategy is used before the resource scheduling strategy is adjusted, and the target physical computing resource object actually carries 2 virtual computing resource objects, each virtual computing resource object is scheduled twice in a round of time-sharing scheduling, and the corresponding single-round scheduling duration is 2 times * 2ms = 4ms; assuming that the Fixed share scheduling strategy is used after the resource scheduling strategy is adjusted, and the target physical computing resource object actually carries 3 virtual computing resource objects from 2, each virtual computing resource object is scheduled once in a round of time-sharing scheduling, and the corresponding single-round scheduling duration is 1 time * 2ms = 2ms. It can be seen that before and after the resource scheduling strategy is adjusted, the single-round scheduling duration of a single virtual computing resource object changes from 4ms to 2ms, which is a situation of changing from more to less, which will cause a certain degree of performance jitter of the virtual computing resource object. Of course, conversely, before and after the resource scheduling strategy is adjusted, the single-round scheduling duration of a single virtual computing resource object changes from 2ms to 4ms, which is a change from less to more, and will also cause a certain degree of performance jitter in the virtual computing resource object. Regardless of the change, the sudden change in the single-round scheduling duration of each virtual computing resource object before and after the resource scheduling strategy is adjusted will cause a certain degree of performance jitter in the virtual computing resource object.

[0070] In an embodiment of the present application, in order to reduce the performance jitter of the virtual computing resource object before and after the resource scheduling policy is adjusted, the virtualization manager can be divided into two stages when continuing to perform time-sharing scheduling on the virtual computing resource object currently carried by the target physical computing resource object according to the adjusted resource scheduling policy, specifically: according to the adjusted resource scheduling policy, the virtual computing resource object currently carried by the target physical computing resource object is scheduled in the first stage using a time slice with a dynamically changing length; and after the length of the time slice reaches the default time slice length of the adjusted resource scheduling policy, the virtual computing resource object currently carried by the target physical computing resource object is scheduled in the second stage using the default time slice length. By performing time-sharing scheduling on the virtual computing resource object in the first stage with a time slice with a dynamically changing length, the single-round scheduling duration of the virtual computing resource object can be gradually transitioned from the value before the resource scheduling policy is adjusted to the value after the resource scheduling policy is adjusted, rather than suddenly changing, thereby reducing the performance jitter caused by the resource scheduling policy adjustment to the virtual computing resource object.

[0071] Further optionally, according to the adjusted resource scheduling strategy, the first stage of time-sharing scheduling is performed on the virtual computing resource objects currently carried by the target physical computing resource object using time slices with dynamically changing lengths, including: obtaining information on changes in the number of virtual computing resource objects carried by the target physical computing resource object before and after the resource scheduling strategy is adjusted; based on the quantity change information, determining the target adjustment step required for a single virtual computing resource object to smoothly transition from a single-round scheduling duration before the resource scheduling strategy is adjusted to a single-round scheduling duration after the resource scheduling strategy is adjusted; using the target adjustment step, performing at least one round of adjustment on the length of the time slice starting from the currently used time slice until the default time slice length of the adjusted resource scheduling strategy is reached; according to the adjusted resource scheduling strategy, using the length of the time slice obtained from at least one round of adjustment, performing at least one round of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object, so as to complete the first stage of time-sharing scheduling. The target adjustment step size can also be called the averaging factor. The averaging factor refers to the adjustment amplitude relative to the length of the time slice used in the previous round of time-sharing scheduling. The adjustment amplitude can be positive or negative, depending on the change in the single-round scheduling duration of a single virtual computing resource object before and after the resource scheduling strategy is adjusted. If it changes from small to large, the adjustment amplitude is positive; if it changes from large to small, the adjustment amplitude is negative.

[0072] In some embodiments, the virtualization manager may maintain a correspondence table in advance, in which at least the correspondence between the change in the number of virtual computing resource objects and the adjustment step length is included. For example, when the number of virtual computing resource objects changes from 1 to 2, the corresponding adjustment step length is k1ms, when the number of virtual computing resource objects changes from 2 to 3, the corresponding adjustment step length is k2ms, when the number of virtual computing resource objects changes from 3 to 4, the corresponding adjustment step length is k3ms, etc. Based on this, when the virtualization manager determines the target adjustment step length required for a single virtual computing resource object to smoothly transition from the single-round scheduling duration before the adjustment to the single-round scheduling duration after the adjustment based on the quantity change information, it is specifically used to: query the pre-configured correspondence table based on the quantity change information to obtain the target adjustment step length.

[0073] In some embodiments, the above correspondence table also includes the scheduling times corresponding to the adjustment step length, which can also be called the adjustment frequency (Scheduling frequency), which is used to indicate the number of times the virtual computing resource object should be scheduled in a unit time (for example, per second or per round). For example, when the virtual computing resource object changes from 1 to 2, the corresponding adjustment step length is k1ms, and the corresponding scheduling times are w1 times; when the virtual computing resource object changes from 2 to 3, the corresponding adjustment step length is k2ms, and the corresponding scheduling times are w2 times; when the virtual computing resource object changes from 3 to 4, the corresponding adjustment step length is k3ms, and the corresponding scheduling times are w3 times, etc. k1, k2, k3, w1, w2 and w3 are all known values, which are calculated based on the change direction of the first scheduling strategy and the second scheduling strategy, the default time slice length and other related data. Among them, the adjustment step length can be used to determine the number of compensation times for the accumulated overshoot time slice length of a single virtual computing resource object, and the compensation number is the scheduling number; the overshoot time slice length means that the virtual computing resource object is scheduled according to the non-default time slice length. Based on this, the target scheduling number can also be determined from the corresponding relationship table according to the above quantity change information. The target scheduling number indicates the number of times the virtual computing resource objects currently carried by the target physical computing resource objects are time-sharing scheduled in the first stage, that is, the rounds of adjusting the length of the time slice. In other words, in the first stage, it is necessary to adjust the length of the time slice N times using the target adjustment step starting from the currently used time slice, where N indicates the target scheduling number, and N is a positive integer. And each time the length of the time slice is adjusted once, the virtual computing resource objects currently carried by the target physical computing resource objects are time-sharing scheduled once using the adjusted time slice, until the length of the time slice reaches the default time slice length of the adjusted resource scheduling strategy.

[0074] In the above embodiment of the present application, the length of the time slice used in each round of time-sharing scheduling is adjusted through the target scheduling number and the target adjustment step, and the scheduling frequency of the virtual computing resource object is adjusted to compensate for the cumulative overshoot time caused to the virtual computing resource object due to the adjustment of the resource scheduling strategy, thereby achieving a smooth transition of the cumulative overshoot time and reducing the performance jitter of the virtual computing resource object.

[0075] In the embodiments of the present application, the internal implementation structure of the virtualization manager is not limited. In the following embodiments, two internal implementation structures of the virtualization manager are exemplarily given.

[0076] Figure 1b Figure 1 is a schematic diagram of the internal implementation structure of a virtualization manager. Figure 1b As shown, the virtualization manager 102 includes: a virtualization management component 1021 located in kernel state, a scheduling policy component 1022 and a resource monitoring component 1023 .

[0077] Among them, the virtualization management component 1021 is used to create and manage virtualization instances, and create virtual computing resource objects required to run virtualization instances on physical computing resource objects adapted to the virtualization instances; on the other hand, it is responsible for time-sharing scheduling of the virtual computing resource objects currently carried by the target physical computing resource objects according to the currently used resource scheduling policy for the target physical computing resource objects.

[0078] The resource monitoring component 1022 is used to monitor the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling of the virtual computing resource object by the virtualization management component 1021, and provide the monitored operating status data to the scheduling strategy component 1023.

[0079] The scheduling strategy component 1023 is used to dynamically adjust the currently used resource scheduling strategy according to the changes in the running status data provided by the resource monitoring component 1022, and synchronize the adjusted resource scheduling strategy to the virtualization management component 1021. Accordingly, the virtualization management component 1021 is also used to continue to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource objects according to the adjusted resource scheduling strategy.

[0080] Figure 1c Figure 1 is a schematic diagram of the internal implementation structure of another virtualization manager. Figure 1c As shown, the virtualization manager 102 includes: a virtualization management component 1024 and a resource monitoring component 1025 located in kernel state.

[0081] Among them, the virtualization management component 1024 is used to create and manage virtualization instances, and create virtual computing resource objects required to run virtualization instances on physical computing resource objects adapted to the virtualization instances; on the other hand, for the target physical computing resource object, according to the currently used resource scheduling policy, the virtual computing resource objects currently carried by the target physical computing resource object are time-sharing scheduled.

[0082] The resource monitoring component 1025 is used to monitor the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling of the virtual computing resource object by the virtualization management component 1021, and provide the operating status data to the virtualization management component 1024.

[0083] The virtualization management component 1024 is also used to dynamically adjust the currently used resource scheduling strategy according to the changes in the operating status data provided by the resource monitoring component 1025, and continue to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource objects according to the adjusted resource scheduling strategy.

[0084] about Figure 1b and Figure 1c For the detailed functional description and beneficial effects of each component in the illustrated embodiment, reference can be made to the detailed description of the same or corresponding contents in the above embodiments, which will not be elaborated here.

[0085] In order to facilitate understanding of the above technical solutions provided in the embodiments of the present application, Figure 1b The physical machine architecture diagram shown in the figure takes the physical computing resource as a physical GPU, the virtual computing resource object as a virtual GPU, and the virtualization instance as a VM as an example. Figure 1d The flowchart shown describes the technical solution of the embodiment of the present application in detail.

[0086] like Figure 1d As shown in step 21, after the physical machine is started, various components in the virtualization manager can be run. First, the virtualization management component 1021 creates a new VM according to the user's request to create a VM. For example, Figure 1c VM4 shown in . Figure 1c In the example, VM1, VM2, and VM3 are also running on the physical machine. VM1 and VM3 are located on the first physical GPU, and VM2 and VM4 are located on the second physical GPU. The first physical GPU supports the creation of a virtual GPU with a first resource specification, such as 1 / 2 resource specification; the second physical GPU supports the creation of a virtual GPU with a second resource specification, such as 1 / 4 resource specification. The first resource specification and the second resource specification are different, that is, they are compatible with virtual GPU colocation to improve the availability of the physical GPU.

[0087] Referring to step 22, during the initialization of VM4, the virtualization management component 1021 uses a depth-first traversal method to traverse multiple physical GPUs on the physical machine, and determines a second physical GPU whose resource specifications match the resource specifications required by VM4, and creates a virtual GPU required to run VM4 on the second physical GPU.

[0088] As VMs are created, the physical GPU is divided into multiple virtual GPU slices, and then the virtual GPUs on the physical GPU are allocated to different VMs based on the resource scheduling policy. Figure 1c As shown, applications can be deployed in VM1-VM4, and each VM has its own client OS, which includes a driver for a virtual GPU for allowing applications in the VM to directly access the corresponding virtual GPU through the driver.

[0089] Referring to step 23, when VM4 starts running, the virtualization management component 1021 time-schedules the virtual GPUs on the second physical GPU according to the currently used resource scheduling policy, so that these virtual GPUs use various engine resources of the physical GPU in turn in a time-sliced ​​manner, such as the Graphics / Compute engine, 3D rendering engine, codec engine, etc.

[0090] Referring to step 24, the resource monitoring component 1022 is responsible for monitoring the running status of the virtual GPU on the second physical GPU and collecting the utilization of each virtual GPU during the time-sharing scheduling of the virtual GPU on the second physical GPU by the virtualization management component 1021. In this embodiment, the resource monitoring component 1022 is mainly responsible for monitoring work, and the content of the monitoring work includes: (1) monitoring the running status of the virtual GPU on each physical GPU, and collecting the utilization of the virtual GPU on each physical GPU in real time; (2) calculating the overall utilization of the virtual GPU in units of physical GPUs, and comparing it with the set threshold, so as to dynamically adjust the resource scheduling strategy according to the comparison result of the overall utilization of the virtual GPU and the set threshold. In this embodiment, the overall utilization of the virtual GPU on the second physical GPU is taken as an example.

[0091] Referring to step 25 , the resource monitoring component 1022 calculates the overall utilization of the virtual GPU for the second physical GPU according to the collected utilization of each virtual GPU on the second physical GPU, and provides the overall utilization of the virtual GPU to the scheduling strategy component 1023 .

[0092] Referring to step 26, the scheduling strategy component 1023 determines whether the overall utilization of the virtual GPU is greater than or equal to a set utilization threshold.

[0093] Referring to step 27, when the overall utilization of the virtual GPU is less than the set utilization threshold, the scheduling policy for the virtual GPU on the second physical GPU is set to the Equal share scheduling policy. It is noted that the Equal share scheduling policy is used by default when scheduling the virtual GPU on the second physical GPU.

[0094] Referring to step 28, when the overall utilization of the virtual GPU is greater than or equal to the set utilization threshold, the scheduling policy for the virtual GPU on the second physical GPU is set to the Fixed share scheduling policy.

[0095] Referring to step 29, following step 28, the virtual GPU on the second physical GPU is continued to be time-sharing scheduled according to the Fixed share scheduling strategy, and in the early stage of time-sharing scheduling, the length of the time slice is compensated through at least one round of time-sharing scheduling according to the pre-configured scheduling frequency (Schedulingfrequency) and average factor (Average factor) to avoid obvious performance jitter.

[0096] It is to be noted that in the above embodiment, the overall utilization rate of the virtual GPU is used as an example to determine whether the resource scheduling strategy needs to be adjusted, but it is not limited to this. For example, the video memory usage rate, the power consumption and temperature of the physical GPU, and the number of virtual GPUs created on the second physical GPU can also be collected, and it can be determined whether the video memory usage rate, the power consumption and temperature of the physical GPU have reached the preset corresponding thresholds, or whether the number of virtual GPUs created on the second physical GPU has reached the maximum number; and whether to adjust the resource scheduling strategy is determined based on the judgment result.

[0097] For detailed description of each step in the above method embodiment, reference can be made to the detailed description of the same or corresponding contents in the above embodiments, which will not be repeated here.

[0098] The resource monitoring component is used to monitor various status parameters such as the utilization of the virtual GPU, and the resource scheduling strategy for the virtual GPU is dynamically adjusted according to the monitored status parameters. An adaptive resource scheduling strategy is selected according to the situation. This can ensure that the virtual GPU is fairly scheduled while improving the operating performance of the virtual GPU and the utilization of physical GPU resources, as well as ensuring the stable operation of the virtual GPU.

[0099] Figure 2A schematic diagram of a resource scheduling method provided for an exemplary embodiment of the present application. The method is applied to a virtualization manager running on the hardware resources of a physical machine, the hardware resources of the physical machine include physical computing resource objects, and the physical computing resource objects are used to carry virtual computing resource objects to run virtualized instances. Figure 2 As shown, the method includes:

[0100] 201. For a target physical computing resource object on a physical machine, according to a currently used resource scheduling policy, time-sharing scheduling is performed on a virtual computing resource object currently carried by the target physical computing resource object;

[0101] 202. During the time-sharing scheduling process, monitoring the operation status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object; and,

[0102] 203. According to the change of the running status data, adjust the currently used resource scheduling strategy, and according to the adjusted resource scheduling strategy, continue to perform time-sharing scheduling on the virtual computing resource object currently carried by the target physical computing resource object.

[0103] In this embodiment, the target physical computing resource object is any physical computing resource object on the physical machine. For the implementation form of the physical computing resource object, reference may be made to the description of the aforementioned embodiment, which will not be repeated here.

[0104] In an optional embodiment, the method of this embodiment also includes: creating virtual computing resource objects on the physical computing resource objects contained in the physical machine in accordance with the principle of preferentially creating virtual computing resource objects on the same physical computing resource object; wherein, supporting the creation of multiple virtual computing resource objects with different resource specifications on different physical computing resource objects.

[0105] Further optionally, in accordance with the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object, creating virtual computing resource objects on physical computing resource objects included in the physical machine includes: in the case of creating a virtualized instance, in accordance with a set traversal order, sequentially traversing the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity, wherein the actual carrying quantity refers to the quantity of virtual computing resource objects currently actually carried by the physical computing resource object;

[0106] If the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object match the resource specifications required by the virtualized instance, a virtual computing resource object required to run the virtualized instance is created on the currently traversed physical computing resource object;

[0107] If the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object do not match the resource specifications required by the virtualization instance, continue to traverse the next physical computing resource object whose actual carrying quantity has not yet reached the maximum quantity.

[0108] In an optional embodiment, during the time-sharing scheduling process, monitoring the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object includes:

[0109] Monitoring at least one of power consumption, temperature, resource utilization rate, and number of virtual computing resource objects actually carried by the target physical computing resource object as operation status data of the target physical computing resource object;

[0110] and / or

[0111] The resource utilization rate of the virtual computing resource object and at least one of the resource utilization rates of the sub-resource objects included in the target physical computing resource object are monitored as the operation status data of the virtual computing resource object.

[0112] In an optional embodiment, the resource scheduling policy currently in use is adjusted according to the change of the operating status data, including: when the operating status data changes from the first data range to the second data range in the operating status data, the first scheduling policy currently in use is adjusted to the second scheduling policy; when the operating status data changes from the second data range to the first data range in the operating status data, the second scheduling policy currently in use is adjusted to the first scheduling policy; wherein the first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

[0113] Optionally, the first scheduling strategy is an equal sharing scheduling strategy that evenly distributes the running time of the target physical computing resource object to each virtual computing resource object it currently carries; the second scheduling strategy is a fixed sharing scheduling strategy that fixedly distributes the running time of the target physical computing resource object to the maximum number of virtual computing resource objects it can carry.

[0114] Optionally, according to the currently used resource scheduling policy, the virtual computing resource objects currently carried by the target physical computing resource object are time-sharing scheduled, including: if the currently used resource scheduling policy is the first scheduling policy, scheduling each virtual computing resource object currently carried by the target physical computing resource object in turn according to the first time slice length; if the currently used resource scheduling policy is the second scheduling policy, allocating a fixed time slice to each virtual computing resource object currently carried by the target physical computing resource object according to the second time slice length and the maximum number of virtual computing resource objects that the target physical computing resource object can carry, and scheduling the virtual computing resource objects within the allocated time slice; wherein the number of virtual computing resource objects currently carried by the target physical computing resource object is less than or equal to the maximum number.

[0115] Optionally, according to the adjusted resource scheduling strategy, continue to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object, including: according to the adjusted resource scheduling strategy, using time slices with dynamically changing lengths to perform a first stage of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object; and after the length of the time slice reaches the default time slice length of the adjusted resource scheduling strategy, using the default time slice length to perform a second stage of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object.

[0116] Optionally, in accordance with the adjusted resource scheduling strategy, a first phase of time-sharing scheduling is performed on the virtual computing resource objects currently carried by the target physical computing resource object using a time slice whose length changes dynamically, including: obtaining information on changes in the number of virtual computing resource objects carried by the target physical computing resource object before and after the resource scheduling strategy is adjusted; based on the quantity change information, determining a target adjustment step required for a single virtual computing resource object to smoothly transition from a single-round scheduling duration before the adjustment to a single-round scheduling duration after the adjustment; using the target adjustment step, performing at least one round of adjustment on the length of the time slice starting from the currently used time slice until the default time slice length of the adjusted resource scheduling strategy is reached; and in accordance with the adjusted resource scheduling strategy, using the length of the time slice obtained from at least one round of adjustment, performing at least one round of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object.

[0117] Optionally, based on the quantity change information, determining the target adjustment step required for a single virtual computing resource object to smoothly transition from a single-round scheduling duration before adjustment to a single-round scheduling duration after adjustment, including: querying a pre-configured correspondence table based on the quantity change information to obtain the target adjustment step and the target scheduling number; the correspondence table includes at least the correspondence between the quantity change of virtual computing resource objects, the adjustment step and the scheduling number; wherein the target scheduling number represents the number of time-sharing scheduling of the virtual computing resource objects currently carried by the target physical computing resource object in the first stage or the number of rounds of adjustment of the length of the time slice.

[0118] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0119] Figure 3 A schematic diagram of a resource scheduling device provided by an exemplary embodiment of the present application. The device can be applied to a virtualization manager running on the hardware resources of a physical machine. The hardware resources of the physical machine include physical computing resource objects, which are used to carry virtual computing resource objects to run virtualized instances. Figure 3 As shown, the device comprises:

[0120] The scheduling module 32 is used to schedule the virtual computing resource objects currently carried by the target physical computing resource object of the physical machine according to the resource scheduling policy currently used;

[0121] The status monitoring module 33 is used to monitor the operation status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling of the virtual computing resource object currently carried by the target physical computing resource object by the scheduling module 32;

[0122] The policy adjustment module 34 is used to adjust the currently used resource scheduling policy according to the change of the running status data monitored by the status detection module 33;

[0123] The scheduling module 32 is further used to continue to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the resource scheduling policy adjusted by the policy adjustment module 34 .

[0124] Further, if Figure 3As shown, the resource scheduling device of this embodiment also includes: a creation module 31, which is used to create virtual computing resource objects on the physical computing resource objects included in the physical machine according to the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object; wherein, it supports the creation of multiple virtual computing resource objects with different resource specifications on different physical computing resource objects.

[0125] In an optional embodiment, the creation module 31 is specifically used to: when creating a virtualization instance, traverse the physical computing resource objects whose actual carrying quantity has not yet reached the maximum quantity in sequence according to the set traversal order, and the actual carrying quantity refers to the number of virtual computing resource objects currently actually carried by the physical computing resource object; if the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object are compatible with the resource specifications required by the virtualization instance, create the virtual computing resource objects required to run the virtualization instance on the currently traversed physical computing resource object; if the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object are not compatible with the resource specifications required by the virtualization instance, continue to traverse the next physical computing resource object whose actual carrying quantity has not yet reached the maximum quantity.

[0126] In an optional embodiment, the status monitoring module 33 is specifically used to: monitor the power consumption, temperature, resource utilization and at least one of the number of virtual computing resource objects actually carried by the target physical computing resource object as the operating status data of the target physical computing resource object; and / or monitor the resource utilization of the virtual computing resource object and at least one of the resource utilization of sub-resource objects contained in the target physical computing resource object as the operating status data of the virtual computing resource object.

[0127] In an optional embodiment, the strategy adjustment module 34 is specifically used to: when the operating status data changes from the first data range to the second data range, the first scheduling strategy currently in use is adjusted to the second scheduling strategy; when the operating status data changes from the second data range to the first data range, the operating status data changes from the second data range to the first data range, the second scheduling strategy currently in use is adjusted to the first scheduling strategy; wherein, the first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

[0128] Optionally, the first scheduling strategy is an equal sharing scheduling strategy that evenly distributes the running time of the target physical computing resource object to each virtual computing resource object it currently carries; the second scheduling strategy is a fixed sharing scheduling strategy that fixedly distributes the running time of the target physical computing resource object to the maximum number of virtual computing resource objects it can carry.

[0129] Optionally, the scheduling module 32 is specifically used for: if the resource scheduling strategy currently used is the first scheduling strategy, scheduling each virtual computing resource object currently carried by the target physical computing resource object in turn according to the first time slice length; if the resource scheduling strategy currently used is the second scheduling strategy, allocating a fixed time slice to each virtual computing resource object currently carried by the target physical computing resource object according to the second time slice length and the maximum number of virtual computing resource objects that the target physical computing resource object can carry, and scheduling the virtual computing resource objects within the allocated time slice.

[0130] Optionally, when the scheduling module 32 continues to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the adjusted resource scheduling policy, it is specifically used to: perform the first stage of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object using time slices with dynamically changing lengths according to the adjusted resource scheduling policy; and after the length of the time slice reaches the default time slice length of the adjusted resource scheduling policy, perform the second stage of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object using the default time slice length.

[0131] Further optionally, when the scheduling module 32 performs the first phase of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the adjusted resource scheduling strategy using the time slice with dynamically changing length, it is specifically used to: obtain the quantity change information of the virtual computing resource objects carried by the target physical computing resource object before and after the resource scheduling strategy is adjusted; determine the target adjustment step required for a single virtual computing resource object to smoothly transition from the single-round scheduling duration before the adjustment to the single-round scheduling duration after the adjustment based on the quantity change information; use the target adjustment step to perform at least one round of adjustment on the length of the time slice starting from the currently used time slice until the default time slice length of the adjusted resource scheduling strategy is reached; and perform at least one round of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the adjusted resource scheduling strategy using the length of the time slice obtained from at least one round of adjustment.

[0132] Further optionally, when the scheduling module 32 determines the target adjustment step required for a single virtual computing resource object to smoothly transition from a single-round scheduling duration before adjustment to a single-round scheduling duration after adjustment based on the quantity change information, it is specifically used to: query a pre-configured correspondence table based on the quantity change information to obtain the target adjustment step and the target scheduling number; the correspondence table includes at least the correspondence between the quantity change of virtual computing resource objects, the adjustment step and the scheduling number; wherein the target scheduling number represents the number of time-sharing scheduling of the virtual computing resource objects currently carried by the target physical computing resource object in the first stage or the number of rounds of adjustment of the length of the time slice.

[0133] The detailed implementation and beneficial effects of each module in the device of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0134] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement each step in the above method embodiment.

[0135] The memory in the above embodiments can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0136] The communication component in the above-mentioned embodiment is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0137] The display in the above-mentioned embodiment includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0138] The power supply assembly in the above embodiments provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.

[0139] The audio component in the above embodiments may be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0140] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) containing computer-usable program code.

[0141] The present application is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0142] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0144] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0145] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0146] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0147] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0148] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A resource scheduling method, It is characterized in that include: For a target physical computing resource object on a physical machine, according to a currently used resource scheduling policy, time-sharing scheduling is performed on the virtual computing resource object currently carried by the target physical computing resource object; During the time-sharing scheduling process, monitoring the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object; According to the change of the running status data, the resource scheduling strategy currently in use is adjusted, and according to the adjusted resource scheduling strategy, the virtual computing resource object currently carried by the target physical computing resource object continues to be time-sharingly scheduled.

2. The method according to claim 1, It is characterized in that Also includes: According to the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object, create virtual computing resource objects on the physical computing resource objects included in the physical machine; Among them, it supports the creation of multiple virtual computing resource objects with different resource specifications on different physical computing resource objects.

3. The method according to claim 2, It is characterized in that In accordance with the principle of giving priority to creating virtual computing resource objects on the same physical computing resource object, create virtual computing resource objects on the physical computing resource objects contained in the physical machine, including: When creating a virtualized instance, traverse the physical computing resource objects whose actual carrying quantity has not reached the maximum quantity in sequence according to the set traversal order, where the actual carrying quantity refers to the number of virtual computing resource objects currently actually carried by the physical computing resource object; If the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object match the resource specifications required by the virtualized instance, a virtual computing resource object required to run the virtualized instance is created on the currently traversed physical computing resource object; If the resource specifications of the virtual computing resource objects supported by the currently traversed physical computing resource object do not match the resource specifications required by the virtualization instance, continue to traverse the next physical computing resource object whose actual carrying quantity has not yet reached the maximum quantity.

4. The method according to claim 1, It is characterized in that During the time-sharing scheduling process, monitoring the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object includes: Monitoring at least one of power consumption, temperature, resource utilization rate, and number of virtual computing resource objects actually carried by the target physical computing resource object as operation status data of the target physical computing resource object; and / or The resource utilization rate of the virtual computing resource object and at least one of the resource utilization rates of the sub-resource objects included in the target physical computing resource object are monitored as the operation status data of the virtual computing resource object.

5. The method according to any one of claims 1 to 4, It is characterized in that According to the change of the running status data, the currently used resource scheduling strategy is adjusted, including: When running status data that changes from a first data range to a second data range appears in the running status data, adjusting the currently used first scheduling strategy to a second scheduling strategy; When running status data changing from the second data range to the first data range appears in the running status data, adjusting the currently used second scheduling strategy to the first scheduling strategy; The first data range and the second data range corresponding to different operating status data are different, and the lower limit value of the second data range is greater than the upper limit value of the first data range.

6. The method according to claim 5, It is characterized in that The first scheduling strategy is an equal-share scheduling strategy that evenly distributes the running time of the target physical computing resource object to each virtual computing resource object currently carried by it; The second scheduling strategy is a fixed shared scheduling strategy that allocates the running time of the target physical computing resource object to the maximum number of virtual computing resource objects that it can carry.

7. The method according to claim 6, It is characterized in that According to the currently used resource scheduling policy, time-sharing scheduling is performed on the virtual computing resource object currently carried by the target physical computing resource object, including: If the currently used resource scheduling strategy is the first scheduling strategy, scheduling each virtual computing resource object currently carried by the target physical computing resource object in turn according to the first time slice length; If the resource scheduling strategy currently used is the second scheduling strategy, a fixed time slice is allocated to each virtual computing resource object currently carried by the target physical computing resource object according to the second time slice length and the maximum number of virtual computing resource objects that the target physical computing resource object can carry, and the virtual computing resource objects are scheduled within the allocated time slice.

8. The method according to any one of claims 1 to 4, It is characterized in that According to the adjusted resource scheduling strategy, the virtual computing resource object currently carried by the target physical computing resource object is continuously scheduled in time-sharing manner, including: According to the adjusted resource scheduling strategy, using time slices with dynamically changing lengths to perform a first phase of time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource objects; and After the length of the time slice reaches the default time slice length of the adjusted resource scheduling policy, the default time slice length is used to perform a second phase of time-sharing scheduling on the virtual computing resource object currently carried by the target physical computing resource object.

9. The method according to claim 8, It is characterized in that According to the adjusted resource scheduling strategy, the first phase of time-sharing scheduling is performed on the virtual computing resource object currently carried by the target physical computing resource object using the time slice with dynamically changing length, including: Obtaining information on the change in the number of virtual computing resource objects carried by the target physical computing resource object before and after the resource scheduling strategy is adjusted; Determine, based on the quantity change information, a target adjustment step required for a single virtual computing resource object to smoothly transition from a single round scheduling duration before adjustment to a single round scheduling duration after adjustment; Using the target adjustment step, adjusting the length of the time slice for at least one round starting from the currently used time slice until the default time slice length of the adjusted resource scheduling policy is reached; and According to the adjusted resource scheduling strategy, at least one round of time-sharing scheduling is performed on the virtual computing resource objects currently carried by the target physical computing resource object using the length of the time slice obtained by at least one round of adjustment.

10. The method according to claim 9, It is characterized in that Determining, according to the quantity change information, a target adjustment step required for a single virtual computing resource object to smoothly transition from a single round scheduling duration before adjustment to a single round scheduling duration after adjustment, including: According to the quantity change information, query a pre-configured correspondence table to obtain the target adjustment step and the target scheduling number; the correspondence table at least includes the correspondence between the quantity change of virtual computing resource objects, the adjustment step and the scheduling number; The target scheduling number indicates the number of times the virtual computing resource object currently carried by the target physical computing resource object is time-shared scheduled or the number of rounds of adjusting the length of the time slice in the first stage.

11. A physical machine, It is characterized in that A virtualization manager is running on the hardware resources of the physical machine, and the hardware resources include physical computing resource objects for carrying virtual computing resource objects to run virtualized instances; The virtualization manager is used to: for a target physical computing resource object, according to a currently used resource scheduling policy, time-sharing schedule the virtual computing resource object currently carried by the target physical computing resource object; as well as During the time-sharing scheduling process, monitoring the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object; According to the change of the running status data, the resource scheduling strategy currently in use is adjusted, and according to the adjusted resource scheduling strategy, the virtual computing resource object currently carried by the target physical computing resource object continues to be time-sharingly scheduled.

12. The physical machine according to claim 11, It is characterized in that The virtualization manager is also used to: Creating a virtual computing resource object on the physical computing resource object included in the physical machine according to the principle of giving priority to creating a virtual computing resource object on the same physical computing resource object; Among them, it supports the creation of multiple virtual computing resource objects with different resource specifications on different physical computing resource objects.

13. The physical machine according to claim 11 or 12, It is characterized in that The virtualization manager includes: a virtualization management component, a scheduling strategy component and a resource monitoring component located in the kernel state; The virtualization management component is used to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource object according to the currently used resource scheduling policy; The resource monitoring component is used to monitor the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling process, and provide the operating status data to the scheduling strategy component; The scheduling policy component is used to adjust the currently used resource scheduling policy according to the change of the running status data, and synchronize the adjusted resource scheduling policy to the virtualization management component; The virtualization management component is also used to continue to perform time-sharing scheduling on the virtual computing resource objects currently carried by the target physical computing resource objects according to the adjusted resource scheduling policy.

14. The physical machine according to claim 11 or 12, It is characterized in that The virtualization manager includes: a virtualization management component and a resource monitoring component located in the kernel state; The virtualization management component is used to perform time-sharing scheduling on at least one virtual computing resource object currently carried by the target physical computing resource object according to the currently used resource scheduling policy; The resource monitoring component is used to monitor the operating status data of the target physical computing resource object and / or the virtual computing resource object currently carried by the target physical computing resource object during the time-sharing scheduling process, and provide the operating status data to the virtualization management component; The virtualization management component is also used to: adjust the currently used resource scheduling policy according to the changes in the running status data, and continue to time-share schedule the virtual computing resource objects currently carried by the target physical computing resource objects according to the adjusted resource scheduling policy.

15. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the processor is caused to implement the steps in the method according to any one of claims 1 to 10.

Citation Information

Cited By

  • GPU resource processing method and device

    CN121092328A