Resource scheduling method and device, electronic device, computer readable storage medium

By constructing a resource tag forest and optimizing path selection, the differentiated needs of resource scheduling in multi-tenant scenarios are addressed, enabling reasonable allocation and efficient utilization of resources and avoiding secondary scheduling.

CN113835823BActive Publication Date: 2025-10-17ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010584041.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-23
Publication Date
2025-10-17
Estimated Expiration
2040-06-23

AI Technical Summary

Technical Problem

Traditional resource scheduling methods cannot meet the differentiated needs of tenants and users in multi-tenant scenarios, which can easily lead to jitter after scheduling and trigger secondary scheduling.

Method used

By constructing a resource tag forest, the optimal path is selected for resource scheduling based on the relationship between tenants, physical resources, users, and virtual resources. Node weights are assigned to optimize path selection, and resource migration or cloning is performed before high load or tidal phenomena to avoid secondary scheduling.

Benefits of technology

It achieves rationality and efficiency in resource scheduling in multi-tenant scenarios, reduces resource waste and secondary scheduling, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835823B_ABST
    Figure CN113835823B_ABST
Patent Text Reader

Abstract

The application provides a resource scheduling method and device, electronic equipment and computer readable storage medium. The resource scheduling method comprises the following steps: selecting an optimal path from a resource label forest according to the weight of a path in a resource label tree in the resource label forest; wherein the resource label forest comprises at least one resource label tree, and each path of the resource label tree comprises a first node, a second node and a third node in sequence from a root node to a leaf node; the first node is a node corresponding to physical resources corresponding to a tenant; the second node is a node corresponding to a user belonging to the tenant; and the third node is a node corresponding to virtual resources deployed on the physical resources and managed by the user; and scheduling a task to the third node passed through by the optimal path.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and in particular, to a resource scheduling method and device, electronic device, and computer readable storage medium. BACKGROUND

[0002] Resource scheduling is a process of allocating and temporarily transferring resources from resource inviter to user. Optimizing resource scheduling management and dynamically reallocating resources can more efficiently utilize available resources in the data center and achieve the purpose of reducing energy consumption. Traditional resource scheduling methods cannot meet the differentiated needs of tenants and tasks in a multi-tenant scenario, and are prone to jitter after scheduling, triggering secondary scheduling. SUMMARY

[0003] Embodiments of the present application provide a resource scheduling method and device, electronic device, and computer readable storage medium.

[0004] In a first aspect, embodiments of the present application provide a resource scheduling method, comprising:

[0005] selecting an optimal path from the resource label forest according to the weight of the path in the resource label tree in the pre-constructed resource label forest; wherein the resource label forest comprises: at least one resource label tree, each path of the resource label tree comprises: a first node, a second node and a third node from root node to leaf node in sequence, the first node is a node corresponding to physical resources corresponding to a tenant, the second node is a node corresponding to a user belonging to the tenant, and the third node is a node corresponding to a virtual resource deployed on the physical resource and managed by the user;

[0006] scheduling the task to the third node passed through by the optimal path.

[0007] In a second aspect, embodiments of the present application provide an electronic device, comprising:

[0008] at least one processor;

[0009] a memory, the memory storing at least one program, when the at least one program is executed by the at least one processor, the at least one processor implements any of the above resource scheduling methods.

[0010] In a third aspect, embodiments of the present application provide a computer readable storage medium, the computer readable storage medium storing a computer program, when the computer program is executed by a processor, any of the above resource scheduling methods is implemented.

[0011] The resource scheduling method provided by the embodiments of the present application realizes resource scheduling based on a pre-constructed resource label forest. Different tenants correspond to different physical resources, users and virtual resources, and the resource label forest reflects the relationship between tenants, physical resources, users and virtual resources, that is, which physical resources correspond to a tenant, which users are under a tenant, and which virtual resources deployed on a physical resource are managed by a user under the tenant. Therefore, the differentiated needs of tenants in a multi-tenant scenario are realized, and the rationality of resource scheduling is improved. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 A flowchart of a resource scheduling method provided by the embodiments of the present application is shown in FIG. 1.

[0013] Figure 2 An illustration of a resource label book in a resource label forest provided by the embodiments of the present application is shown in FIG. 2.

[0014] Figure 3 An illustration of assigning corresponding weights to the first node and the third node in the embodiments of the present application is shown in FIG. 3.

[0015] Figure 4 An illustration of selecting an optimal path in the embodiments of the present application is shown in FIG. 4.

[0016] Figure 5 A composition block diagram of a resource scheduling device provided by the embodiments of the present application is shown in FIG. 5.

[0017] Figure 6 An application illustration of a resource scheduling device provided by the embodiments of the present application is shown in FIG. 6. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solutions of the present application, the resource scheduling method and device, electronic equipment and computer readable storage medium provided by the present application are described in detail below with reference to the accompanying drawings.

[0019] In the following, example embodiments will be described more fully with reference to the accompanying drawings, in which example embodiments can be embodied in different forms and should not be construed as being limited to the embodiments set forth herein. Rather, the purpose of the embodiments is to enable a full and complete understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0020] In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

[0021] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.

[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0023] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present application, and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.

[0024] Figure 1 A flowchart of a resource scheduling method provided by an embodiment of the present application.

[0025] In a first aspect, referring to Figure 1 The embodiment of the present application provides a resource scheduling method, comprising:

[0026] Step 100, selecting an optimal path from a resource label forest according to the weight of a path in a resource label tree in the resource label forest; wherein the resource label forest comprises: at least one resource label tree, each path of the resource label tree comprises: a first node, a second node and a third node in sequence from a root node to a leaf node, the first node is a node corresponding to a physical resource corresponding to a tenant, the second node is a node corresponding to a user belonging to the tenant, and the third node is a node corresponding to a virtual resource deployed on the physical resource and managed by the user.

[0027] Step 101, scheduling a task to the third node passed through by the optimal path.

[0028] In some example embodiments, in order to meet the difference requirements of the task, the unscheduled task with the highest priority is scheduled to the third node passed through by the optimal path. Wherein the priority of the task is determined according to the importance of the task.

[0029] In some example embodiments, before selecting an optimal path from a resource label forest according to the weight of a path in a resource label tree in the resource label forest, the method further comprises: constructing a resource label forest according to the relationship among the tenant, the physical resource, the user and the virtual resource; and respectively assigning corresponding weights to each first node and third node in each resource label tree in the resource label forest.

[0030] The resource scheduling method provided in the embodiment of the present application implements resource scheduling based on a pre-constructed resource tag forest. Since different tenants correspond to different physical resources, users and virtual resources, and the resource tag forest reflects the relationship between tenants, physical resources, users and virtual resources, that is, which physical resources correspond to the tenants, which users are under the tenants, and which virtual resources deployed on the physical resources are managed by the users under the tenants. Therefore, the differentiated needs of tenants in multi-tenant scenarios are realized, thereby improving the rationality of resource scheduling.

[0031] It should be noted that each path in the resource tag tree reflects the relationship between tenants, physical resources, users, and virtual resources. The relationship here refers to which physical resources and virtual resources correspond to the tenant, that is, which physical resources and virtual resources belong to the tenant; which users are under the tenant, that is, which users belong to the tenant; which virtual resources are deployed on the physical resources; and which virtual resources are managed by which users.

[0032] The first node can be represented by a node with a hierarchical structure according to the hierarchical distribution of physical resources. Figure 2 As shown, physical resources have a two-tiered structure: racks and physical machines. Physical machines belong to racks. Therefore, two levels of first nodes can be set: the first node of the first level corresponds to the node of the rack, and the first node of the second level corresponds to the node of the physical machine. Physical resources can refer to racks, physical machines, etc., and virtual resources can refer to virtual machines, etc.

[0033] For example, Figure 2 As shown, the resource tag forest includes two resource tag trees, namely resource tag tree 1 and resource tag tree 2. Resource tag tree 1 corresponds to tenant 1, and resource tag tree 2 corresponds to tenant 2.

[0034] Tenant 1's physical resources include rack 1, physical machine 1, and physical machine 2. Virtual machines 1 and 2 are deployed on physical machine 1, and virtual machine 3 is deployed on physical machine 2. Tenant 1 has users 1 and 2. User 1 manages virtual machines 1 and 2, and user 2 manages virtual machine 3.

[0035] Tenant 2's physical resources include rack 2, physical machine 3, and physical machine 4. Virtual machine 4 is deployed on physical machine 3, and virtual machines 5 and 6 are deployed on physical machine 4. Tenant 2 has users 3 and 4. User 3 manages virtual machine 4, and user 4 manages virtual machines 5 and 6.

[0036] So, the root node of the resource tag tree 1 is the node corresponding to the rack 1, and the leaf nodes include the node corresponding to the virtual machine 1 and the node corresponding to the virtual machine 2; the first node includes the node corresponding to the rack 1, the node corresponding to the physical machine 1 and the node corresponding to the physical machine 2; the second node includes the node corresponding to the user 1 and the node corresponding to the user 2; and the third node includes the node corresponding to the virtual machine 1 and the node corresponding to the virtual machine 2.

[0037] The root node of the resource tag tree 2 is the node corresponding to the rack 2, and the leaf nodes include the node corresponding to the virtual machine 4, the node corresponding to the virtual machine 5 and the node corresponding to the virtual machine 6; the first node includes the node corresponding to the rack 2, the node corresponding to the physical machine 3 and the node corresponding to the physical machine 4; the second node includes the node corresponding to the user 3 and the node corresponding to the user 4; and the third node includes the node corresponding to the virtual machine 4, the node corresponding to the virtual machine 5 and the node corresponding to the virtual machine 6.

[0038] In some example embodiments, the weight of the path is determined according to the weights of the first node and the third node through which the path passes.

[0039] In some example embodiments, the weight of the path is the sum of the weights of the first node and the third node through which the path passes. In other example embodiments, the weight of the path is the weighted average of the weights of the first node and the third node through which the path passes. Of course, the weight of the path can also be calculated in other ways, and the specific calculation method is not used to limit the protection scope of the embodiments of the present application.

[0040] It should be noted that if there are multiple levels of relationships between the nodes corresponding to the physical resources, the weight of the first node refers to the weight of the node at the lowest level. For example, Figure 2 In the example shown in FIG. 1, the node corresponding to the physical machine 1 and the node corresponding to the physical machine 2 belong to the next level of nodes of the node corresponding to the rack 1, so the weight of the first node refers to the weight of the node corresponding to the physical machine 1 and the weight of the node corresponding to the physical machine 2.

[0041] For example, as Figure 2 shown in FIG. 1, the weight of the path including the node corresponding to the rack 1, the node corresponding to the physical machine 1, the node corresponding to the user 1 and the node corresponding to the virtual machine 1 is the sum of the weight of the node corresponding to the physical machine 1 and the weight of the node corresponding to the virtual machine 1, and other paths are calculated in the same way.

[0042] In some example embodiments, the weight of the first node is determined according to the CPU occupancy rate, the memory occupancy rate and the storage occupancy rate of the first node within a specified time period; and the weight of the third node is determined according to the CPU occupancy rate, the memory occupancy rate and the storage occupancy rate of the third node within a specified time period.

[0043] In some example embodiments, the weight value of the first node is the sum of the CPU occupancy, the memory occupancy and the storage occupancy of the first node in the specified time period, and the weight value of the third node is the sum of the CPU occupancy, the memory occupancy and the storage occupancy of the third node in the specified time period.

[0044] In some other example embodiments, the weight value of the first node is the weighted average of the CPU occupancy, the memory occupancy and the storage occupancy of the first node in the specified time period, and the weight value of the third node is the weighted average of the CPU occupancy, the memory occupancy and the storage occupancy of the third node in the specified time period.

[0045] In some other example embodiments, the weight value of the first node is the sum of the first score corresponding to the CPU occupancy, the second score corresponding to the memory occupancy and the third score corresponding to the storage occupancy of the first node in the specified time period, and the weight value of the third node is the sum of the first score corresponding to the CPU occupancy, the second score corresponding to the memory occupancy and the third score corresponding to the storage occupancy of the third node in the specified time period.

[0046] In some other example embodiments, the weight value of the first node is the weighted average of the first score corresponding to the CPU occupancy, the second score corresponding to the memory occupancy and the third score corresponding to the storage occupancy of the first node in the specified time period, and the weight value of the third node is the weighted average of the first score corresponding to the CPU occupancy, the second score corresponding to the memory occupancy and the third score corresponding to the storage occupancy of the third node in the specified time period.

[0047] Of course, other ways can also be used to calculate the weight value of the first node and the weight value of the third node, and the specific calculation method does not limit the protection scope of the embodiments of the present application.

[0048] For example, if the CPU occupancy is between 0% and 20%, the first score is 1; if the CPU occupancy is between 20% and 40%, the first score is 2; if the CPU occupancy is between 40% and 60%, the first score is 3; if the CPU occupancy is between 60% and 80%, the first score is 4; and if the CPU occupancy is between 80% and 100%, the first score is 5. Of course, the CPU occupancy and the first score can also have other corresponding relationships, and the specific corresponding relationship does not limit the protection scope of the embodiments of the present application.

[0049] For example, if the memory usage is between 0% and 20%, the second score is 1; if the memory usage is between 20% and 40%, the second score is 2; if the memory usage is between 40% and 60%, the second score is 3; if the memory usage is between 60% and 80%, the second score is 4; if the memory usage is between 80% and 100%, the second score is 5. Of course, the memory usage and the second score can also have other corresponding relationships, and the specific corresponding relationship is not intended to limit the scope of protection of the embodiments of the present application.

[0050] For example, if the storage occupancy rate is between 0% and 20%, the third score is 1; if the storage occupancy rate is between 20% and 40%, the third score is 2; if the storage occupancy rate is between 40% and 60%, the third score is 3; if the storage occupancy rate is between 60% and 80%, the third score is 4; and if the storage occupancy rate is between 80% and 100%, the third score is 5. Of course, the storage occupancy rate and the third score may also have other corresponding relationships, and the specific corresponding relationship is not intended to limit the scope of protection of the embodiments of the present application.

[0051] For example, Figure 3 As shown, the first score corresponding to the CPU occupancy of the node corresponding to physical machine 1 in the specified time period is 1, the second score corresponding to the memory occupancy is 3, and the third score corresponding to the storage occupancy is 4. Then the weight of the node corresponding to physical machine 1 is 8; the same applies to other nodes, which will not be repeated here.

[0052] In some exemplary embodiments, selecting the optimal path from a resource tag forest based on the weight of the path in a resource tag tree in a pre-constructed resource tag forest includes: traversing each path in each resource tag tree in the resource tag forest, and selecting the path with the smallest weight as the optimal path; wherein the weight of the path is determined based on the resource occupancy rate of the nodes through which the path passes.

[0053] For example, Figure 4 As shown, the weight of the path shown by the dotted line, including the node corresponding to rack 2, the node corresponding to physical machine 4, the node corresponding to user 4, and the node corresponding to virtual machine 5, is: 5+6=11. It is the path with the smallest weight among all paths, and the task can be scheduled to this path.

[0054] Of course, other methods can also be used to select the optimal path. The specific method of selecting the optimal path is not used to limit the protection scope of the embodiments of this application. The embodiments of this application emphasize that the resource scheduling method of the embodiments of this application is based on the resource tag forest. The resource tag forest reflects the relationship between tenants, physical resources, users and virtual resources, and realizes resource scheduling based on tenant differentiation.

[0055] The resource scheduling method of the present application determines the weight value of the path based on the resource occupancy rate of the nodes passed by the path, selects the path with the minimum weight value as the optimal path, and the minimum weight value of the path means the minimum resource occupancy rate of the nodes passed by the path. The path with the minimum weight value is selected as the optimal path, and then the task is scheduled to the third node passed by the optimal path, thereby improving the utilization rate of resources.

[0056] In some example embodiments, there can be a case where the resource occupancy rate of a physical resource is high, but the resource occupancy rate of a virtual resource on the physical resource is low. In this case, when performing resource scheduling, a secondary scheduling can be triggered due to the physical resource being unable to meet the service demand. In order to avoid performing secondary scheduling, the method further includes:

[0057] The target user and the virtual resources managed by the target user on the physical resource corresponding to the first node with at least one of the CPU occupancy rate, the memory occupancy rate and the storage occupancy rate being greater than the preset threshold are migrated to the physical resource corresponding to the first node with the minimum weight value, and a resource label forest is reconstructed according to the relationship between the migrated tenants, physical resources, users and virtual resources; wherein the target user is the user with the maximum weight value or the second maximum weight value.

[0058] In some example embodiments, the preset threshold can be selected according to actual conditions, for example, the preset threshold is selected as 80%, that is, at least one of the CPU occupancy rate, the memory occupancy rate and the storage occupancy rate is greater than 80%.

[0059] In some example embodiments, the target user is preferentially selected as the user with the maximum weight value, and if the physical resource corresponding to the first node with the minimum weight value is insufficient to support the virtual resources managed by the user with the maximum weight value, the user with the second maximum weight value is selected as the target user.

[0060] In some example embodiments, the weight value of a user is determined according to the weight values of the nodes corresponding to the virtual resources managed by the user.

[0061] In some example embodiments, the weight value of a user is the sum of the weight values of the nodes corresponding to the virtual resources managed by the user. In other example embodiments, the weight value of a user is the weighted average of the weight values of the nodes corresponding to the virtual resources managed by the user. Of course, other ways of calculating the weight value of a user can also be used, and the specific calculation method is not used to limit the protection scope of the embodiments of the present application.

[0062] The resource scheduling method of the application, when the weight of the first node is greater than the preset threshold, migrates the target user and the virtual resource managed by the target user on the physical resource corresponding to the first node to the physical resource corresponding to the first node with the smallest weight, so that the resource occupancy rate of the first node is reduced, and the resource occupancy rates between different first nodes are more balanced, so that when the resource scheduling is performed, the secondary scheduling is not triggered due to the fact that the physical resource cannot meet the business demand, that is, the secondary scheduling of the resource is reduced or avoided.

[0063] In some example embodiments, there can be a case that the resource occupancy rate of the physical resource is not high, the resource occupancy rate of the virtual resource on the physical resource is also not high, but the load of the virtual resource has a tide characteristic, that is, the resource occupancy rate of the virtual resource may be very high at a certain time point, resulting in that the virtual resource may not be able to meet the business demand when the tide phenomenon occurs, thereby triggering the secondary scheduling of the resource. In order to avoid the secondary scheduling, the method further includes:

[0064] Before the tide phenomenon of the virtual resource with the tide characteristic occurs, cloning the same virtual resource as the virtual resource with the tide characteristic on the physical resource where the virtual resource with the tide characteristic is located; wherein the communication address of the cloned virtual resource is different from that of the virtual resource with the tide characteristic; the cloned virtual resource and the virtual resource with the tide characteristic jointly undertake tasks; after the tide phenomenon of the virtual resource with the tide characteristic ends, the cloned virtual resource is recycled.

[0065] In some example embodiments, the communication address includes at least one of the following: an Internet Protocol (IP) address, a Media Access Control (MAC) address.

[0066] In some example embodiments, the time period when the tide phenomenon of the virtual resource occurs can be obtained by analyzing historical operation and maintenance data, and the peak value of the physical resource required by the virtual resource in the tide scenario is calculated.

[0067] The resource scheduling method of the embodiment of the application, for the virtual resource with the tide characteristic, clones the same virtual resource before the tide phenomenon occurs, and the cloned virtual resource and the original virtual resource jointly undertake the tasks scheduled to the virtual resource, thereby avoiding the secondary scheduling triggered when the virtual resource cannot meet the business demand due to the tide phenomenon, that is, avoiding the secondary scheduling of the resource; after the tide phenomenon ends, the cloned virtual resource is recycled, thereby avoiding the waste of resource occupancy.

[0068] In a second aspect, an electronic device is provided, including:

[0069] at least one processor;

[0070] a memory, at least one program is stored on the memory, when the at least one program is executed by the at least one processor, the at least one processor implements any one of the above resource scheduling methods.

[0071] The processor is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH).

[0072] In some embodiments, the processor and the memory are connected to each other through a bus, and further connected to other components of the computing device.

[0073] In a third aspect, the embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, any one of the above resource scheduling methods is implemented.

[0074] Figure 5 A composition block diagram of a resource scheduling device provided by the embodiments of the present application.

[0075] In a fourth aspect, with reference to Figure 5 the embodiments of the present application provide a resource scheduling device, comprising:

[0076] An optimal path selection module 501 is configured to select an optimal path from a resource label forest according to a weight value of a path in a resource label tree in the resource label forest; the resource label forest comprises at least one resource label tree, and each path in the resource label tree comprises, from a root node to a leaf node, a first node, a second node and a third node in sequence, the first node is a node corresponding to a physical resource corresponding to a tenant, the second node is a node corresponding to a user belonging to the tenant, and the third node is a node corresponding to a virtual resource deployed on the physical resource and managed by the user;

[0077] A resource scheduling module 502 is configured to schedule a task to the third node passed through by the optimal path.

[0078] In some example embodiments, the optimal path selection module 501 is specifically configured to:

[0079] Each path in each resource label tree in the resource label forest is traversed, and a path with the minimum weight value is selected as the optimal path; wherein the weight value of the path is determined according to a resource occupancy rate of a node passed through by the path.

[0080] In some example embodiments, the weight of the path is determined according to the weights of the first node and the third node through which the path passes.

[0081] In some example embodiments, the weight of the first node is determined according to the CPU occupancy, the memory occupancy and the storage occupancy of the first node within a specified time period; and the weight of the third node is determined according to the CPU occupancy, the memory occupancy and the storage occupancy of the third node within the specified time period.

[0082] In some example embodiments, the method further comprises:

[0083] The resource tag forest construction module 503 is configured to migrate the target user and the virtual resource managed by the target user on the physical resource corresponding to the first node whose CPU occupancy, memory occupancy and storage occupancy are greater than a preset threshold to the physical resource corresponding to the first node with the smallest weight, and reconstruct the resource tag forest according to the relationship between the tenant, the physical resource, the user and the virtual resource after the migration; wherein the target user is the user with the largest weight or the second largest weight.

[0084] In some example embodiments, the weight of the user is determined according to the weight of the node corresponding to the virtual resource managed by the user.

[0085] In some example embodiments, the method further comprises:

[0086] The resource tag forest construction module 503 is configured to clone the same virtual resource as the virtual resource with the tide characteristic on the physical resource where the virtual resource with the tide characteristic is located before the tide phenomenon of the virtual resource with the tide characteristic occurs; wherein the cloned virtual resource has a different communication address from the virtual resource with the tide characteristic; the cloned virtual resource and the virtual resource with the tide characteristic jointly undertake tasks; and the cloned virtual resource is recycled after the tide phenomenon of the virtual resource with the tide characteristic ends.

[0087] In some example embodiments, the method further comprises:

[0088] The resource tag forest construction module 503 is configured to construct a resource tag forest according to the relationship between the tenant, the physical resource, the user and the virtual resource; and assign a corresponding weight to each first node and third node in each resource tag tree in the resource tag forest.

[0089] Figure 6 An application diagram of a resource scheduling device provided by an embodiment of the present application is shown in FIG. 1. Figure 6As shown, the system is divided into three layers, a cloud computing basic platform layer, a global resource scheduling layer and an application environment layer, the bottom layer is the cloud computing basic platform layer, including: physical machines and virtual machines thereon, the global resource scheduling layer includes the above resource scheduling device, and the application environment layer includes: a performance module, system applications, utility functions and application extensions.

[0090] The performance module is used for monitoring system performance indicators, such as input / output operations per second (IOPS), connection concurrency, etc.

[0091] The system application is a system global application, such as a network management application.

[0092] The utility function is a whole evaluation and scoring of application usage;

[0093] The application extension is to provide cache, load balancing and other components for application use.

[0094] In the specific resource scheduling, first, the resource tag forest construction module labels all resource nodes and user nodes under the tenant, and calculates the weight value for all resource nodes, then the resource tag forest traversal module traverses all resource tag forests, finds the path with the smallest weight value, and schedules the task to the corresponding physical machine and virtual machine on the path, finally the resource tag forest redistribution module evaluates the resource tag forest as a whole, and if it is found that there is at least one physical machine resource node with CPU occupancy rate, memory occupancy rate and storage occupancy rate greater than 80% or a virtual machine with tide characteristics, the scheduling is performed according to the redistribution rule.

[0095] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, it is common knowledge to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.

[0096] Example embodiments have been disclosed herein and, although the use of specific terms is expressly used herein, they are intended in a generic sense only and are not intended to limit the scope of the present application. In some instances, it will be apparent to those skilled in the art that features, aspects and / or elements described in connection with a particular embodiment can be used, combined, or eliminated for other embodiments, unless expressly stated otherwise. Thus, the present application is not intended to be limited to the embodiments described herein but is to be accorded the full scope consistent with the claims, appended hereto.

Claims

1. A resource scheduling method, comprising: An optimal path is selected from a pre-constructed resource tag forest according to the weight of a path in a resource tag tree in the resource tag forest; wherein the resource tag forest includes: at least one resource tag tree, each path of the resource tag tree includes, from a root node to a leaf node, a first node, a second node, and a third node, wherein the first node is a node corresponding to a physical resource corresponding to a tenant, the second node is a node corresponding to a user belonging to the tenant, and the third node is a node corresponding to a virtual resource deployed on the physical resource and managed by the user; Dispatching the task to the third node passed by the optimal path; Among them, the selecting the optimal path from the resource tag forest according to the weight of the path in the resource tag tree in the pre-constructed resource tag forest includes: traversing each path in each resource tag tree in the resource tag forest, and selecting the path with the smallest weight as the optimal path; wherein the weight of the path is determined according to the resource occupancy rate of the nodes passed by the path.

2. The method according to claim 1, wherein The weight of the path is determined according to the weights of the first node and the third node through which the path passes.

3. The method according to claim 2, wherein: The weight of the first node is determined based on the CPU occupancy, memory occupancy and storage occupancy of the first node within a specified time period; the weight of the third node is determined based on the CPU occupancy, memory occupancy and storage occupancy of the third node within the specified time period.

4. The method according to any one of claims 1 to 3, further comprising: Migrating the target user and the virtual resources managed by the target user from the physical resource corresponding to the first node whose CPU usage, memory usage, and storage usage are greater than a preset threshold to the physical resource corresponding to the first node whose weight is the smallest, and reconstructing the resource tag forest based on the relationship between the tenant, physical resources, user, and virtual resources after the migration; The target user is the user with the largest weight or the user with the second largest weight.

5. The method according to claim 4, wherein The weight of the user is determined according to the weight of the node corresponding to the virtual resource managed by the user.

6. The method according to any one of claims 1 to 3, further comprising: Before a tidal phenomenon occurs in a virtual resource with tidal characteristics, a virtual resource identical to the virtual resource with tidal characteristics is cloned on a physical resource where the virtual resource with tidal characteristics is located; wherein the cloned virtual resource and the virtual resource with tidal characteristics have different communication addresses; and the cloned virtual resource and the virtual resource with tidal characteristics jointly undertake the task; After the tidal phenomenon of the virtual resource with tidal characteristics ends, the cloned virtual resource is recovered.

7. The method according to any one of claims 1 to 3, before selecting the optimal path from the resource tag forest based on the weights of the paths in the resource tag tree in the pre-constructed resource tag forest, the method further comprises: Constructing the resource tag forest according to the relationship between the tenants, physical resources, users and virtual resources; A corresponding weight is assigned to each of the first nodes and the third nodes in each of the resource tag trees in the resource tag forest.

8. An electronic device comprising: at least one processor; A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the resource scheduling method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the resource scheduling method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-user cloud platform task scheduling method supporting bandwidth guarantee

    CN104270421A

  • Deployment method of software middleware of multi-tenant data centre

    CN105553725A