Resource management method and device, equipment and medium
By combining MILP and MFQ methods, the relationship table between the storage pool and tenant is used for dynamic resource scheduling and association relationship management, the complexity of resource allocation and binding relationship management in the storage system is solved, and efficient resource utilization and stability are achieved.
Patent Information
- Application Number
- CN202510061990.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-09
Smart Images

Figure CN119960994A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage systems, and in particular to a resource management method, device, equipment and medium. Background Art
[0002] Currently, in the storage system multi-tenant system, the binding relationship between storage pools and tenants is as follows:
[0003] A many-to-many flexible binding relationship is established between the storage pool and the tenants. This design enables resources to be efficiently shared among multiple tenants, while also ensuring that each tenant can obtain the required services from multiple resource pools. This solution realizes the many-to-many association between pools and tenants, and meets the related needs of resource isolation among tenants.
[0004] Although the relevant solutions have successfully realized the many-to-many association between pools and tenants and provided flexible binding relationship configuration, the following problems still exist at the business logic and data processing level:
[0005] Modifying the pool relationship table structure will affect other business functions that rely on the pool. In order to ensure the overall stability of the system, it is necessary to comprehensively investigate the potential impact of the change and conduct detailed tests to ensure that all related business functions can operate normally. At the same time, each operation on the binding relationship between the pool and the tenant requires the synchronous update of at least two tables, which increases the complexity of the operation and the risk of errors. When the underlying behavioral logic of the original instruction is changed to adapt to the tenant's capabilities, it will have a chain reaction on other business functions that rely on the pool.
[0006] To sum up, although the relevant solutions have achieved remarkable results at the architectural level, detailed processing and testing are still required at the business logic and data processing levels to ensure the overall stability and reliability of the system. Summary of the invention
[0007] In order to overcome the above technical defects, the purpose of the present application is to provide a resource management method, device, equipment and medium, the method comprising: receiving tenants to be allocated resources; creating a mixed integer linear programming model and a multi-level feedback queue scheduler; determining the resource allocation strategy of the tenants to be allocated resources through the mixed integer linear programming model; the multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenants to be allocated resources; creating a relationship table between a storage pool and a tenant; in response to binding, unbinding and deleting any one of the storage pool and the tenant, judging the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant; managing the relationship between the storage pool and the tenant according to the judgment result. The present application combines the global optimization capability of the mixed integer linear programming model (MILP) and the dynamic scheduling capability of the multi-level feedback queue (MFQ) to realize the reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization and stability, but also ensure the service quality of the tenants.
[0008] The specific technical solutions provided by the embodiments of this application are as follows:
[0009] In a first aspect, the present application provides a resource management method, which is applied to a resource management system, the system comprising a plurality of storage pools and a plurality of tenants, each storage pool adjusting resources for the plurality of tenants respectively, the method comprising:
[0010] Receive tenants to be allocated resources;
[0011] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0012] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0013] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0014] Create a relationship table between storage pools and tenants;
[0015] Setting an operation relationship table management instruction for the relationship table between the storage pool and the tenant;
[0016] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0017] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0018] In one of the embodiments, determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model includes:
[0019] Creating a resource allocation objective function for the tenant to be allocated resources by using the mixed integer linear programming model;
[0020] Adding constraint conditions to the resource allocation objective function, wherein the constraint conditions include resource capacity restriction requirements for the tenant to be resource allocated and tenant resource allocation service quality requirements;
[0021] The resource capacity restriction on the tenant to be allocated resources includes:
[0022] When the tenant to be allocated resources is bound to multiple storage pools, the total capacity of the storage pools corresponding to the tenant is compared with the quota capacity of the tenant, and the resources between the storage pool and the tenant are restricted according to the comparison result;
[0023] The limiting of resources between the storage pool and the tenant according to the comparison result includes:
[0024] In response to the total capacity of the storage pool corresponding to the associated tenant being less than the quota capacity of the tenant, the available capacity of the tenant is the total capacity of the storage pool corresponding to the associated tenant, and when the remaining total capacity of the storage pool corresponding to the associated tenant is distributed in different storage pools, a corresponding number of storage volumes are created according to the number of different storage pools, and resources are allocated to the tenant according to the corresponding number of storage volumes, wherein the capacity of the storage volume is the remaining capacity of the corresponding storage pool;
[0025] In response to the total capacity of the storage pool associated with the tenant being greater than the quota capacity of the tenant, the available capacity of the tenant is the quota capacity of the tenant;
[0026] The resource allocation objective function is calculated by an optimization solver to determine the target resource allocation strategy of the tenant to be allocated resources.
[0027] In one of the embodiments, the multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources, wherein the multi-level feedback queue scheduler includes a plurality of queues, each queue having a different resource allocation priority, including:
[0028] In response to determining the resource allocation strategy of the tenant to be allocated resources through the mixed integer linear programming model, setting the resource allocation priority of the tenant to be allocated resources to a first priority queue;
[0029] Execute a multi-level feedback queue scheduler, and traverse all queues of the multi-level feedback queue scheduler;
[0030] When the tenant to be allocated resources fails to complete resource allocation within the first time threshold, lowering the resource allocation priority of the tenant;
[0031] When the waiting time of the tenant to be allocated resources in all queues of the multi-level feedback queue scheduler is greater than a second time threshold, increasing the resource allocation priority of the tenant;
[0032] In response to the storage pool being bound to multiple tenants, the storage pool resources allocated to each tenant are isolated.
[0033] In one of the embodiments, after dynamically scheduling resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources, the method includes:
[0034] Monitor the multi-level feedback queue scheduler and dynamically adjust resource allocation priority and queue position according to the execution status and resource usage of dynamic resource scheduling of multiple tenants;
[0035] Use machine learning models to predict the resource requirements of multiple tenants, and optimize the multi-tenant resource scheduling strategy based on the prediction results and the current system resource allocation status;
[0036] Execute a multi-level feedback queue scheduler, allocate resources to the tenants according to the mixed integer linear programming model, and record an execution log of multi-tenant resource allocation through the multi-level feedback queue scheduler, wherein the log information is used to analyze and adjust the mixed integer linear programming model.
[0037] In one embodiment, the step of creating a relationship table between storage pools and tenants includes:
[0038] Setting fields in the relationship table between the storage pool and the tenant;
[0039] The field setting of the relationship table between the storage pool and the tenant includes:
[0040] Use the storage pool and tenant's associated ID information as the primary key;
[0041] Set the ID information of multiple storage pools and multiple tenants;
[0042] Other relevant fields are set for the relationship table between the storage pool and the tenant according to business requirements, wherein the relevant fields include at least one of a specific relationship field, a condition restriction field, and a timestamp field.
[0043] In one of the embodiments, the step of setting an operation relationship table management instruction for the relationship table between the storage pool and the tenant includes:
[0044] A query table instruction is set for the relationship table between the storage pool and the tenant, and the query table instruction is used for full query, paging query, specific row query, specific column query, row number statistics and sorting query of the relationship table between the storage pool and the tenant;
[0045] Setting a create pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the create pool tenant relationship instruction is used to add an association record between the storage pool and the tenant in the storage pool and tenant relationship table;
[0046] Setting a modify pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the modify pool tenant relationship instruction is used to update the storage pool and tenant association record in the storage pool and tenant relationship table;
[0047] An unbinding pool-tenant relationship instruction is set for the storage pool-tenant relationship table, and the unbinding pool-tenant relationship instruction is used to delete the storage pool-tenant association record in the storage pool-tenant relationship table.
[0048] In one embodiment, judging the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant, and managing the relationship between the storage pool and the tenant according to the judgment result, includes:
[0049] Configuring the binding relationship between the storage pool and the tenant includes:
[0050] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0051] In response to the association relationship between the storage pool and the tenant not existing, binding the storage pool and the tenant relationship;
[0052] Configuring the change relationship between the storage pool and the tenant includes:
[0053] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0054] In response to the existence of an association relationship between the storage pool and the tenant, unbinding the storage pool from the tenant;
[0055] Configuring a deletion operation of the storage pool includes:
[0056] Obtaining a relationship table between the storage pool and the tenant, and determining whether the storage pool is associated with the tenant;
[0057] In response to the storage pool not being associated with the tenant, deleting the storage pool;
[0058] Configure the deletion operation of the tenant, including:
[0059] Obtain a relationship table between the storage pool and the tenant, and determine whether the tenant is associated with the storage pool;
[0060] In response to the tenant not being associated with the storage pool, the tenant is deleted.
[0061] In one embodiment, the binding of the storage pool and the tenant relationship includes:
[0062] Get the storage pool relationship table and tenant relationship table;
[0063] Determining whether both the ID information of the storage pool and the ID information of the tenant exist according to the storage pool relationship table and the tenant relationship table;
[0064] In response to the existence of both the ID information of the storage pool and the ID information of the tenant, an association record log of the storage pool and the tenant is added to the relationship table between the storage pool and the tenant, the association ID information of the storage pool and the tenant is used as the primary key, and the ID information of the storage pool is associated with the ID information of the tenant.
[0065] In one embodiment, the unbinding the relationship between the storage pool and the tenant includes:
[0066] Determining whether the association relationship between the storage pool and the tenant is valid;
[0067] In response to the association relationship between the storage pool and the tenant being valid, a relationship table between the storage pool and the tenant is obtained, an association record log between the storage pool and the tenant is determined according to the relationship table between the storage pool and the tenant, and the association record log between the storage pool and the tenant is deleted.
[0068] In one embodiment, the method comprises:
[0069] When the relationship between the storage pool and the tenant is configured according to the relationship table between the storage pool and the tenant to manage the resources between the storage pool and the tenant, when a failure occurs, the relationship between the storage pool and the tenant is managed by synchronizing information to the storage pool relationship table and the tenant relationship table;
[0070] The managing the relationship between the storage pool and the tenant by synchronizing information to the storage pool relationship table and the tenant relationship table includes:
[0071] Adding a field for associating tenants in the storage pool relationship table;
[0072] Adding a field for associating a storage pool in the tenant relationship table;
[0073] When the storage pool is added or the storage pool is bound to a tenant, the storage pool addition and binding information is synchronized to the storage pool relationship table and the tenant relationship table;
[0074] When the attribute information of the storage pool and the tenant is changed, the attribute change information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0075] When the storage pool and the tenant are unbound, the unbinding information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0076] When any tenant uses resources outside the tenant quota, the system issues an error message and an alarm prompt.
[0077] In a second aspect, the present application further provides a resource management device, which is applied to a resource management system, wherein the resource management system includes multiple storage pools and multiple tenants, each storage pool adjusts resources for multiple tenants respectively, and the device includes:
[0078] A receiving module, used for receiving tenants to be allocated resources;
[0079] Create a module for creating a mixed integer linear programming model and a multi-level feedback queue scheduler; create a relationship table between storage pools and tenants;
[0080] A determination module, configured to determine a resource allocation strategy for the tenant to be allocated resources by using the mixed integer linear programming model;
[0081] A judgment module, configured to judge the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant in response to any operation of binding, unbinding and deleting the storage pool and the tenant;
[0082] The management module is used to dynamically schedule resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources; and manage the relationship between the storage pool and the tenant according to the judgment result.
[0083] In a third aspect, a resource management device is also provided, including:
[0084] one or more processors;
[0085] A storage device for storing one or more programs;
[0086] When the one or more programs are executed by the one or more processors, the one or more processors implement the resource management method as described in any one of the first aspects.
[0087] In a fourth aspect, the present application further provides a computer device, the device comprising:
[0088] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the resource management method as described in any one of the first aspects.
[0089] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any resource management method described in the first aspect.
[0090] In a sixth aspect, the present application further provides a computer storage medium, the medium comprising:
[0091] A computer program is stored thereon, and when the computer program is executed by a processor, the steps of any resource management method described in the first aspect are implemented.
[0092] Compared with the prior art, the method described in the technical solution provided by the embodiment of the present application includes: receiving tenants to be allocated resources; creating a mixed integer linear programming model and a multi-level feedback queue scheduler; determining the resource allocation strategy of the tenants to be allocated resources through the mixed integer linear programming model; the multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenants to be allocated resources; creating a relationship table between the storage pool and the tenant; in response to binding, unbinding and deleting any one of the operations between the storage pool and the tenant, judging the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant; managing the relationship between the storage pool and the tenant according to the judgment result. The present application combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to realize the reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization, but also ensure the service quality of tenants; at the same time, the present application can reduce the risks that may be encountered when synchronizing data tables, and avoid the uncertainty factors introduced by modifying the structure of the pool tenant relationship table, ensuring that the consistency and integrity of the data are not affected.
[0093] The technical solution provided in the embodiment of the present application carefully constructs a binding relationship system between the storage pool and the tenant, introduces a special pool tenant management table to handle this process, and specially establishes new management instructions for the pool tenant management table, which are implemented without changing the original table structure, thereby significantly reducing the risks that may be encountered when synchronizing data tables, aiming to avoid the uncertainty factors introduced by modifying the table structure and ensure that the consistency and integrity of the data are not affected; at the same time, strive to achieve minimal changes at the level of issuing instructions to maintain the stability and reliability of the system to the greatest extent, and ensure the continuity and efficiency of business operations.
[0094] The technical solution provided in the embodiment of the present application cleverly transforms the underlying architecture and explores a new path without affecting the stability of the upper-level business logic. It minimizes the risks that may be encountered during the implementation process. At the same time, by simplifying complex processes, the entire system is easier to understand and maintain, and it also provides great convenience and flexibility for subsequent expansion. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0096] Figure 1 A structural diagram of a resource management system provided in Example 1 of the present application;
[0097] Figure 2 A first flow chart of the resource management method provided in Embodiment 1 of the present application;
[0098] Figure 3 A second flow chart of the resource management method provided in Embodiment 2 of the present application;
[0099] Figure 4 A third flow chart of the resource management method provided in Embodiment 2 of the present application;
[0100] Figure 5 A fourth flow chart of the resource management method provided in Embodiment 2 of the present application;
[0101] Figure 6 A structural diagram of a resource management device provided in Embodiment 3 of the present application;
[0102] Figure 7 The exemplary system provided for Embodiment 7 of the present application can be used to implement the various embodiments described in the present application. DETAILED DESCRIPTION
[0103] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0104] It should be noted that, unless the context clearly requires otherwise, words such as “include”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “including but not limited to”.
[0105] Furthermore, in the description of the present application, unless otherwise specified, “plurality” means two or more.
[0106] In today's era when the Internet industry is booming at an unprecedented pace, the virtual system environment has firmly occupied a core position in software production activities and has become a key force in promoting technological innovation and efficiency improvement. Virtual system environment technology cleverly uses virtualization to effectively isolate resources within a real software system architecture, and then virtualizes multiple independent but fully functional "shadow environments". This design not only realizes flexible management from one-to-many to many-to-many, greatly broadens the boundaries of resource application, but also significantly improves the overall utilization of resources, allowing limited hardware resources to support more complex and changeable application requirements.
[0107] Multi-tenancy simulates multiple tenants through a virtual system environment. This resource allocation method ensures that resources can be adjusted instantly according to actual needs, thereby maximizing resource utilization efficiency. As an important technical architecture in the field of modern software development and deployment, the multi-tenant system is gradually showing its superiority and broad application prospects.
[0108] In storage systems, this advantage of multi-tenancy technology is particularly evident; the resources under each tenant, including storage space, data backup, access rights, etc., are relatively independent, and other tenants cannot see or use these resources; this strict resource isolation mechanism not only ensures the privacy and security of tenant data, but also manages and optimizes resource allocation more flexibly, improving resource utilization and overall system performance.
[0109] However, to achieve this efficient resource isolation, the relationship between partition pools and tenants becomes particularly important; pooling technology, as an important part of multi-tenant technology, realizes dynamic allocation and flexible scheduling of resources by abstracting physical resources into logical resource pools.
[0110] Embodiment 1
[0111] The present application embodiment provides a resource management method, such as Figure 1 , 2 As shown, the method is applied to a resource management system, the system includes multiple storage pools and multiple tenants, each storage pool adjusts resources for multiple tenants respectively, and the method includes:
[0112] Receive tenants to be allocated resources;
[0113] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0114] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0115] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0116] Create a relationship table between storage pools and tenants;
[0117] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0118] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0119] Specifically, the mixed integer linear programming (MILP) and multi-level feedback queue (MFQ) are combined to realize the resource allocation of storage pool to multiple tenants;
[0120] MILP is used to define the global optimization problem of resource allocation. In the MILP model, the decision variables represent the usage of storage resources by each tenant. The objective function is to minimize the total cost of resources or maximize the resource utilization. The constraints ensure that the resource allocation does not exceed the capacity of the storage pool and meets the tenant's service level agreement (SLA).
[0121] Create an MFQ scheduler to dynamically manage and schedule tasks. The MFQ scheduler contains multiple queues with different priorities. New tasks (tenants) first enter the highest priority queue. If a task is not completed within a time slice, its priority is lowered and moved to the next queue.
[0122] The MILP model is integrated with the MFQ scheduler. The MILP model is responsible for determining the resource allocation strategy for each tenant, while the MFQ scheduler is responsible for dynamically scheduling tasks according to these strategies. The MILP model can be run periodically to optimize resource allocation, while the MFQ scheduler responds to task arrival and completion in real time.
[0123] This application has developed the following implementation scheme, which aims to minimize the modification of the structure of the pool and tenant tables and reduce synchronization behavior to ensure the stability and reliability of the system:
[0124] 1. In order to fundamentally solve the risks that may be caused by modifying the table structure, this application adds a table specifically used to manage the relationship between pools and tenants, without making any modifications to the existing pool relationship table structure, thereby fundamentally avoiding possible adverse effects on other business functions that rely on the pool;
[0125] 2. In the process of changing the binding relationship between pools and tenants, since a dedicated pool-tenant management table is newly created, the objects of synchronization can be reduced to this table, avoiding synchronization of pool relationship tables and tenant relationship tables as much as possible, thus significantly reducing the risk of abnormalities during synchronization;
[0126] 3. In order to avoid making too many changes to the original pool operation and tenant operation instructions, it is necessary to set up another instruction or multi-table joint query mechanism; this mechanism will ensure that during the business processing, the binding relationship between the pool and the tenant can be accurately and efficiently obtained and managed, while reducing R&D costs and improving the overall performance and stability of the system.
[0127] In summary, by adding a dedicated pool-tenant management table, reducing synchronization behavior objects, and establishing another instruction or multi-table joint query mechanism, this application has developed an efficient and stable implementation plan to deal with current risks.
[0128] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0129] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0130] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0131] The technical solution provided in the embodiment of the present application carefully constructs a binding relationship system between the storage pool and the tenant, introduces a special pool tenant management table to handle this process, and specially establishes new management instructions for the pool tenant management table, which are implemented without changing the original table structure, thereby significantly reducing the risks that may be encountered when synchronizing data tables, aiming to avoid the uncertainty factors introduced by modifying the table structure and ensure that the consistency and integrity of the data are not affected; at the same time, strive to achieve minimal changes at the level of issuing instructions to maintain the stability and reliability of the system to the greatest extent, and ensure the continuity and efficiency of business operations.
[0132] Embodiment 2
[0133] The present application embodiment provides a resource management method, such as Figure 3 As shown, the method is applied to a resource management system, the system includes multiple storage pools and multiple tenants, each storage pool adjusts resources for multiple tenants respectively, and the method includes:
[0134] Step S01, receiving tenants to be allocated resources;
[0135] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0136] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0137] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources.
[0138] Step S011, creating a resource allocation objective function of the tenant to be allocated resources by using the mixed integer linear programming model;
[0139] Adding constraint conditions to the resource allocation objective function, wherein the constraint conditions include resource capacity restriction requirements for the tenant to be resource allocated and tenant resource allocation service quality requirements;
[0140] The resource capacity restriction on the tenant to be allocated resources includes:
[0141] When the tenant to be allocated resources is bound to multiple storage pools, the total capacity of the storage pools corresponding to the tenant is compared with the quota capacity of the tenant, and the resources between the storage pool and the tenant are restricted according to the comparison result;
[0142] The limiting of resources between the storage pool and the tenant according to the comparison result includes:
[0143] In response to the total capacity of the storage pool corresponding to the associated tenant being less than the quota capacity of the tenant, the available capacity of the tenant is the total capacity of the storage pool corresponding to the associated tenant, and when the remaining total capacity of the storage pool corresponding to the associated tenant is distributed in different storage pools, a corresponding number of storage volumes are created according to the number of different storage pools, and resources are allocated to the tenant according to the corresponding number of storage volumes, wherein the capacity of the storage volume is the remaining capacity of the corresponding storage pool;
[0144] In response to the total capacity of the storage pool associated with the tenant being greater than the quota capacity of the tenant, the available capacity of the tenant is the quota capacity of the tenant;
[0145] The resource allocation objective function is calculated by an optimization solver to determine the target resource allocation strategy of the tenant to be allocated resources.
[0146] Specifically, for each tenant and each resource, define a decision variable to represent the tenant's usage of the resource; these variables are usually integer or binary variables to ensure that the allocated resources are discrete; for example, if there are two tenants and two storage pool resources, you can define variables x1,1 and x1,2 to represent tenant 1's usage of resource 1 and resource 2, and x2,1 and x2,2 to represent tenant 2's usage;
[0147] Construct the objective function:
[0148] The objective function is usually to minimize the total cost of resources or to maximize the efficiency of resource utilization; it involves direct costs of resource allocation or costs related to service quality;
[0149] Add constraints:
[0150] Constraints ensure that resource allocation meets physical constraints (such as storage capacity), tenant needs, and service quality requirements; for example, the total amount of the same resource used by all tenants cannot exceed the total capacity of the resource; at the same time, each tenant's resource usage cannot exceed its allocated quota;
[0151] Consider tenant-specific constraints:
[0152] Some tenants may have specific service level agreements (SLAs) that need to be guaranteed by additional constraints; for example, for business-critical tenants, a higher priority can be set to ensure that their resource needs are met first;
[0153] Solve the MILP problem:
[0154] Use an optimization solver to solve the defined MILP problem and find the optimal resource allocation solution; for example, you can use the PuLP library to define and solve MILP problems. The PuLP library can be used to define linear problems, integer problems, and mixed integer problems, and call solvers to solve these problems;
[0155] The MILP model can achieve optimal allocation of resources in a multi-tenant environment, ensuring that resource utilization is maximized while meeting the specific needs and service quality requirements of tenants; this approach is particularly suitable for resource allocation problems where the decision variables are integers and the problem requires global optimization.
[0156] Here, the resource capacity restriction requirement for the tenant to be allocated resources is as follows: a volume is a resource created based on a storage pool. For example, a storage pool A has 5T space, but it cannot be used directly. Instead, a volume needs to be created based on the storage pool. Only resources based on the volume can be used directly.
[0157] Storage pool A has 5T of space. If a 500G (0.5T) volume is created, the remaining space in the storage pool is 4.5T.
[0158] When a storage pool is bound to multiple tenants (assuming that tenant A, tenant B, and tenant C are bound), and the storage pool has 5 TB of space, and tenant A creates two 0.5 TB volumes in this storage pool, the remaining storage pool space available to tenants A / B / C is 4 TB.
[0159] At this time, tenant B uses this storage pool again to create a 1TB volume. Then the remaining storage pool space available to tenants A / B / C is 3TB. Tenant A cannot use the volume created by tenant B, and tenant B cannot use the volume created by tenant A, thus achieving resource isolation.
[0160] When a tenant binds multiple storage pools (assuming that storage pool A, storage pool B, and storage pool C are bound), and storage pool A has 2T of space, storage pool B has 1T of space, and storage pool C has no space, the space available to the tenant is 3T;
[0161] If the tenant quota is set to 1.5T, the tenant can only use 1.5T of space;
[0162] If the tenant quota is set to 10 TB, because the total capacity of the storage pool bound to the tenant is only 3 TB, the tenant can only use 3 TB of space;
[0163] It can be understood that when the total available capacity of the pool associated with a tenant is less than the tenant's quota, the capacity available to the tenant is the total available capacity of the pool;
[0164] When the total available capacity of the pool associated with a tenant is greater than the tenant's quota, the tenant's available capacity is the tenant's quota;
[0165] At this time, if a 1.9T volume is created based on storage pool A, and a 0.9T volume is created based on storage pool B, the remaining available capacity space for the tenant is 0.2T (0.1T remaining in storage pool A + 0.1T remaining in storage pool B);
[0166] Although there is 0.2T of space left, the available space of each pool is 0.1T. Therefore, you cannot create a 0.2T volume here because the remaining 0.2T comes from different storage pools. However, you can create two 0.1T volumes.
[0167] Step S012, in response to determining the resource allocation strategy of the tenant to be allocated resources through the mixed integer linear programming model, setting the resource allocation priority of the tenant to be allocated resources to the first priority queue;
[0168] Execute a multi-level feedback queue scheduler, and traverse all queues of the multi-level feedback queue scheduler;
[0169] When the tenant to be allocated resources fails to complete resource allocation within the first time threshold, the resource allocation priority of the tenant is lowered; wherein the first time threshold corresponds to the time slice length of queues of different priorities;
[0170] When the waiting time of the tenant to be allocated resources in all queues of the multi-level feedback queue scheduler is greater than the second time threshold, the resource allocation priority of the tenant is increased; wherein the second time threshold may be 5 minutes;
[0171] In response to the storage pool being bound to multiple tenants, the storage pool resources allocated to each tenant are isolated.
[0172] Specifically, create an MFQ scheduler class that contains multiple queues, each queue represents a different priority. New tasks first enter the highest priority queue and are scheduled according to time slices.
[0173] Task status update and aging mechanism:
[0174] After each resource allocation task is executed, its remaining time will be updated; if the resource allocation task for the tenant is not completed, the priority will be lowered; if it is completed, its completion time will be recorded; at the same time, an aging mechanism can be added to regularly promote tenants who have been waiting for too long in the low-priority queue;
[0175] Dynamic load scheduling:
[0176] Dynamically schedule tasks between queues of different priorities based on the arrival and execution time of resource allocation tasks; helps balance the load, ensuring that high-priority tenants receive a quick response while avoiding starvation of low-priority tenants;
[0177] Through the above steps, the multi-level feedback queue (MFQ) can effectively implement resource allocation of the storage pool in a multi-tenant environment, ensuring that tasks are reasonably processed according to priority and waiting time, while avoiding tenant starvation.
[0178] Step S02, monitoring the multi-level feedback queue scheduler, and dynamically adjusting the resource allocation priority and queue position according to the execution status of dynamic resource scheduling of multiple tenants and resource usage;
[0179] Use machine learning models to predict the resource requirements of multiple tenants, and optimize the multi-tenant resource scheduling strategy based on the prediction results and the current system resource allocation status;
[0180] Execute a multi-level feedback queue scheduler, allocate resources to the tenants according to the mixed integer linear programming model, and record an execution log of multi-tenant resource allocation through the multi-level feedback queue scheduler, wherein the log information is used to analyze and adjust the mixed integer linear programming model.
[0181] Specifically, real-time monitoring is implemented in the MFQ scheduler to dynamically adjust tenants’ priorities and queue positions based on the execution of tenant resource allocation tasks and resource usage. This information can be fed back to the MILP model so that the latest system status can be considered in the next run;
[0182] Combining resource prediction and adaptive scheduling optimization strategies, using machine learning models to predict future resource requirements and automatically generate optimal scheduling decisions based on current system status;
[0183] Use tools such as the PuLP library to solve MILP problems and find the global optimal resource allocation solution; for example, you can define decision variables, objective functions, and constraints, and then call the solver to solve;
[0184] Execute the MFQ scheduler to allocate resources according to the MILP model and record the execution logs of the resource allocation tasks; these logs can be used to analyze and adjust the MILP model to improve future resource allocation strategies.
[0185] Step S03: Create a relationship table between storage pools and tenants.
[0186] Step S031, setting fields in the relationship table between the storage pool and the tenant;
[0187] The field setting of the relationship table between the storage pool and the tenant includes:
[0188] Use the storage pool and tenant's associated ID information as the primary key;
[0189] Set the ID information of multiple storage pools and multiple tenants;
[0190] Other relevant fields are set for the relationship table between the storage pool and the tenant according to business requirements, wherein the relevant fields include at least one of a specific relationship field, a condition restriction field, and a timestamp field.
[0191] Specifically, in order to effectively manage the complex relationship between storage pools and tenants, this application creates a pool-tenant relationship table named poolTenantTable. The field design of this table must meet the following key requirements:
[0192] 1. Set relation_id (pool-tenant relationship ID) as the primary key to ensure the uniqueness and traceability of each record;
[0193] 2. The required fields include pool_id and tenant_id. These two fields are the basis for establishing the association between the pool and the tenant;
[0194] 3. Based on specific business needs, other relevant fields can be added, such as pool-tenant specific relationships, condition restrictions, and timestamps, to provide richer information support.
[0195] Step S04: setting an operation relationship table management instruction for the relationship table between the storage pool and the tenant.
[0196] Step S041, setting a query table instruction for the relationship table between the storage pool and the tenant, the query table instruction is used for full query, paging query, specific row query, specific column query, row count and sort query of the relationship table between the storage pool and the tenant;
[0197] Setting a create pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the create pool tenant relationship instruction is used to add an association record between the storage pool and the tenant in the storage pool and tenant relationship table;
[0198] Setting a modify pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the modify pool tenant relationship instruction is used to update the storage pool and tenant association record in the storage pool and tenant relationship table;
[0199] An unbinding pool-tenant relationship instruction is set for the storage pool-tenant relationship table, and the unbinding pool-tenant relationship instruction is used to delete the storage pool-tenant association record in the storage pool-tenant relationship table.
[0200] Specifically, in order to achieve efficient management and operation of the storage pool and tenant relationship table (poolTenantTable), a set of instructions needs to be designed:
[0201] 1. catpooltenant: table query instruction, supporting full query, paging query, specific row query, specific column query, row count and sorting (including default sorting) to meet diverse query needs;
[0202] 2. creatpooltenant: Create a pool tenant relationship instruction, which is used to add a pool-tenant association record in poolTenantTable;
[0203] 3. changepooltenant: command to modify the pool tenant relationship, used to update the existing pool and tenant association records in poolTenantTable;
[0204] 4. deletepooltenant: unbind pool tenant relationship instruction, used to delete the pool and tenant association record specified in poolTenantTable.
[0205] Step S05, in response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0206] The relationship system between the storage pool and the tenants is configured according to the judgment result.
[0207] Step S051, configuring the binding relationship between the storage pool and the tenant, including:
[0208] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0209] In response to the association relationship between the storage pool and the tenant not existing, binding the storage pool and the tenant relationship;
[0210] Configuring the change relationship between the storage pool and the tenant includes:
[0211] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0212] In response to the existence of an association relationship between the storage pool and the tenant, unbinding the storage pool from the tenant;
[0213] Configuring a deletion operation of the storage pool includes:
[0214] Obtaining a relationship table between the storage pool and the tenant, and determining whether the storage pool is associated with the tenant;
[0215] In response to the storage pool not being associated with the tenant, deleting the storage pool;
[0216] Configure the deletion operation of the tenant, including:
[0217] Obtain a relationship table between the storage pool and the tenant, and determine whether the tenant is associated with the storage pool;
[0218] In response to the tenant not being associated with the storage pool, the tenant is deleted.
[0219] Specifically, in actual business scenarios, the use of the relationship table between the storage pool and the tenant must follow the following basic principles:
[0220] 1. Each time a pool-tenant relationship is bound, the relationship table between the storage pool and the tenant should be queried first to confirm whether the association between the pool and the tenant already exists; if not, the binding operation is performed;
[0221] 2. Every time you change the pool-tenant attribute, you should also query the relationship table between the storage pool and the tenant to confirm whether the original pool-tenant relationship already exists; if so, perform the change operation;
[0222] 3. Each time a pool-tenant relationship is deleted, the relationship table between the storage pool and the tenant must be queried to confirm whether the original pool-tenant relationship is still valid; if it is valid, the deletion operation is performed;
[0223] 4. Each time you delete a pool, you must first query the relationship table between the storage pool and the tenant to confirm whether the pool is still associated with the tenant; if so, the deletion operation should not be performed to avoid affecting the normal use of the tenant;
[0224] 5. Every time a tenant is deleted, the relationship table between the storage pool and the tenant must be queried to confirm whether the tenant is still associated with the pool; if so, the deletion operation should not be performed to ensure business continuity and stability.
[0225] Step S0511, obtaining a storage pool relationship table and a tenant relationship table;
[0226] Determining whether both the ID information of the storage pool and the ID information of the tenant exist according to the storage pool relationship table and the tenant relationship table;
[0227] In response to the existence of both the ID information of the storage pool and the ID information of the tenant, an association record log of the storage pool and the tenant is added to the relationship table between the storage pool and the tenant, the association ID information of the storage pool and the tenant is used as the primary key, and the ID information of the storage pool is associated with the ID information of the tenant.
[0228] Specifically, the system user first created two storage pools PA and PB, and two tenants TA and TB. These entities were given unique identifiers in the system for subsequent relationship binding and management;
[0229] The system user tries to bind the storage pool PA with the tenant TA. In this process, the system code first searches the pool relationship table and the tenant relationship table to obtain the IDs of PA and TA and other necessary data. Then, a new record is added to the poolTenantTable table, setting relation_id as the primary key and associating pool_id (i.e., PA's ID) and tenant_id (i.e., TA's ID). In this way, the binding relationship between PA and TA is completed.
[0230] If you try to bind PA to TA again at this time, the system will detect that the same pool_id and tenant_id combination already exists in the poolTenantTable table, so it will report an error message saying "Already bound";
[0231] Subsequently, the system user binds the storage pool PA to the tenant TB, and the storage pool PB to the tenant TA respectively; these two binding operations will also go through the steps of retrieval and adding records, and finally two new records will be added to the poolTenantTable table, respectively associating the IDs of PA and TB, and PB and TA.
[0232] Step S0512, determining whether the association relationship between the storage pool and the tenant is valid;
[0233] In response to the association relationship between the storage pool and the tenant being valid, a relationship table between the storage pool and the tenant is obtained, an association record log between the storage pool and the tenant is determined according to the relationship table between the storage pool and the tenant, and the association record log between the storage pool and the tenant is deleted.
[0234] Specifically, when it is necessary to unbind PA and TA, the system code will search the poolTenantTable table, find the corresponding PA and TA association record log, and delete it. In this way, the binding relationship between PA and TA is released;
[0235] When you try to delete the storage pool PA or tenant TB, the system will first search the poolTenantTable table to check whether there are records related to PA or TB. Since PA has been unbound and no related records exist, the operation of deleting PA will be successfully executed. However, TB is still bound to PB, so the operation of deleting TB will fail and a corresponding alarm will be given. This step ensures business continuity and data integrity.
[0236] To summarize, when operating storage pools, tenants, and pool-tenant relationships, the system of the present application has no impact on the behavior of synchronizing pools and tenants, and only adds a judgment on whether there is a pool-tenant binding relationship to the instructions for deleting pools and tenants, thereby significantly reducing the risks that may be encountered when synchronizing data tables.
[0237] Step S06, when the relationship system between the storage pool and the tenant is configured according to the relationship table between the storage pool and the tenant to manage the resources between the storage pool and the tenant, when a failure occurs, the relationship between the storage pool and the tenant is managed by synchronizing information to the storage pool relationship table and the tenant relationship table;
[0238] The managing the relationship between the storage pool and the tenant by synchronizing information to the storage pool relationship table and the tenant relationship table includes:
[0239] Adding a field for associating tenants in the storage pool relationship table;
[0240] Adding a field for associating a storage pool in the tenant relationship table;
[0241] When the storage pool is added or the storage pool is bound to a tenant, the storage pool addition and binding information is synchronized to the storage pool relationship table and the tenant relationship table;
[0242] When the attribute information of the storage pool and the tenant is changed, the attribute change information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0243] When the storage pool and the tenant are unbound, the unbinding information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0244] When any tenant uses resources outside the tenant quota, the system issues an error message and an alarm prompt.
[0245] Specifically, in a multi-tenant system, a many-to-many flexible binding relationship is established between the pool and the tenants. This design enables resources to be efficiently shared among multiple tenants, while also ensuring that each tenant can obtain the required services from multiple resource pools;
[0246] In order to maintain this complex binding relationship, a field for associated tenants is added to the pool relationship table, so that each resource pool can clearly record the tenant information it serves, which is convenient for management and query.
[0247] Similarly, a pool-related field is added to the tenant relationship table so that tenants can easily track the source of the resources they use and ensure the reasonable use and allocation of resources;
[0248] During the process of adding and binding storage pools, the system will automatically synchronize relevant information to the tenant relationship table and pool relationship table to ensure the timeliness and consistency of data;
[0249] When the storage pool and tenant-related properties change, the system must synchronize them to the relevant tenant relationship table and pool relationship table;
[0250] When the storage pool and tenant binding relationship is deleted, it is synchronized to the relevant tenant relationship table and pool relationship table;
[0251] If a tenant attempts to operate resources that do not belong to him / her, the system will return a corresponding error message.
[0252] In summary, this solution realizes the many-to-many association between pools and tenants, and meets the tenants' previous needs for resource isolation.
[0253] like Figure 4 , 5 As shown, the present application creates a relationship table between a storage pool and a tenant; sets an operation relationship table management instruction for the relationship table between the storage pool and the tenant; judges the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant; configures the relationship system between the storage pool and the tenant according to the judgment result; and manages the resources between the storage pool and the tenant according to the configured relationship system between the storage pool and the tenant. The present application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool-tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0254] In addition, the resource management method further includes:
[0255] Calculating the resource request priority of the tenant to be allocated resources by using a radial basis function neural network (RBFNN), and allocating resources to the tenant according to the calculated resource request priority;
[0256] The calculating the resource request priority of the tenant to be allocated resources by using a radial basis function neural network includes:
[0257] Use the newrb or newrbe function in MATLAB to create a radial basis function neural network; the newrb function is used to adaptively determine the number of hidden layer neurons based on the data set, and the newrbe function is used to create a network with a fixed number of hidden layer neurons;
[0258] Acquire a data set for training the radial basis function neural network, wherein the data set includes input data and target data, the input data includes characteristic data such as resource usage history, business importance, SLA requirements, etc. of the tenant; the target data includes the priority label of the tenant;
[0259] Training the radial basis function neural network using the input data and target data;
[0260] Calculate the corresponding resource request priority of the tenant to be allocated resources by using a trained radial basis function neural network;
[0261] The step of training the radial basis function neural network by using the input data and the target data comprises:
[0262] The radial basis function neural network is trained by selecting the RBF center method through self-organizing learning or selecting the RBF center method through the orthogonal least squares method;
[0263] After the radial basis function neural network is trained by the input data and the target data, the method comprises:
[0264] The performance of the radial basis function neural network is verified using a test data set to ensure that the radial basis function neural network can correctly predict the priority of new tenants.
[0265] Through the above steps, the radial basis function neural network (RBFNN) can be effectively used to calculate the resource request priority of the tenants to ensure the reasonable allocation and efficient utilization of the storage pool resources.
[0266] The resource management method provided in the embodiment of the present application may be improved and optimized without departing from the technical solution of the present application, and these improvements and optimizations should also be regarded as within the scope of protection of the present application.
[0267] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0268] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0269] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0270] The technical solution provided in the embodiment of the present application carefully constructs a binding relationship system between the storage pool and the tenant, introduces a special pool tenant management table to handle this process, and specially establishes new management instructions for the pool tenant management table, which are implemented without changing the original table structure, thereby significantly reducing the risks that may be encountered when synchronizing data tables, aiming to avoid the uncertainty factors introduced by modifying the table structure and ensure that the consistency and integrity of the data are not affected; at the same time, strive to achieve minimal changes at the level of issuing instructions to maintain the stability and reliability of the system to the greatest extent, and ensure the continuity and efficiency of business operations.
[0271] The technical solution provided in the embodiment of the present application cleverly transforms the underlying architecture and explores a new path without affecting the stability of the upper-level business logic. It minimizes the risks that may be encountered during the implementation process. At the same time, by simplifying complex processes, the entire system is easier to understand and maintain, and it also provides great convenience and flexibility for subsequent expansion.
[0272] Embodiment 3
[0273] This application provides a resource management device, such as Figure 6 As shown, the device includes: a receiving module, a creating module, a setting module, a determining module, a judging module, a management module, and a post-processing module.
[0274] In this embodiment, the receiving module is used to receive tenants to be allocated resources;
[0275] Create a module for creating a mixed integer linear programming model and a multi-level feedback queue scheduler; create a relationship table between storage pools and tenants;
[0276] A determination module, configured to determine a resource allocation strategy for the tenant to be allocated resources by using the mixed integer linear programming model;
[0277] A judgment module, configured to judge the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant in response to any operation of binding, unbinding and deleting the storage pool and the tenant;
[0278] The management module is used to dynamically schedule resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources; and manage the relationship between the storage pool and the tenant according to the judgment result.
[0279] In this embodiment, the determination module is used to create the resource allocation objective function of the tenant to be allocated resources through the mixed integer linear programming model;
[0280] Adding constraint conditions to the resource allocation objective function, wherein the constraint conditions include resource capacity restriction requirements for the tenant to be resource allocated and tenant resource allocation service quality requirements;
[0281] The resource capacity restriction on the tenant to be allocated resources includes:
[0282] When the tenant to be allocated resources is bound to multiple storage pools, the total capacity of the storage pools corresponding to the tenant is compared with the quota capacity of the tenant, and the resources between the storage pool and the tenant are restricted according to the comparison result;
[0283] The limiting of resources between the storage pool and the tenant according to the comparison result includes:
[0284] In response to the total capacity of the storage pool corresponding to the associated tenant being less than the quota capacity of the tenant, the available capacity of the tenant is the total capacity of the storage pool corresponding to the associated tenant, and when the remaining total capacity of the storage pool corresponding to the associated tenant is distributed in different storage pools, a corresponding number of storage volumes are created according to the number of different storage pools, and resources are allocated to the tenant according to the corresponding number of storage volumes, wherein the capacity of the storage volume is the remaining capacity of the corresponding storage pool;
[0285] In response to the total capacity of the storage pool associated with the tenant being greater than the quota capacity of the tenant, the available capacity of the tenant is the quota capacity of the tenant;
[0286] The resource allocation objective function is calculated by an optimization solver to determine the target resource allocation strategy of the tenant to be allocated resources.
[0287] In this embodiment, the management module is used to set the resource allocation priority of the tenant to be allocated resources to the first priority queue in response to determining the resource allocation strategy of the tenant to be allocated resources through the mixed integer linear programming model;
[0288] Execute a multi-level feedback queue scheduler, and traverse all queues of the multi-level feedback queue scheduler;
[0289] When the tenant to be allocated resources fails to complete resource allocation within the first time threshold, lowering the resource allocation priority of the tenant;
[0290] When the waiting time of the tenant to be allocated resources in all queues of the multi-level feedback queue scheduler is greater than a second time threshold, increasing the resource allocation priority of the tenant;
[0291] In response to the storage pool being bound to multiple tenants, the storage pool resources allocated to each tenant are isolated.
[0292] In this embodiment, the management module is used to monitor the multi-level feedback queue scheduler and dynamically adjust the resource allocation priority and queue position according to the execution status and resource usage of multiple tenant resource dynamic scheduling;
[0293] Use machine learning models to predict the resource requirements of multiple tenants, and optimize the multi-tenant resource scheduling strategy based on the prediction results and the current system resource allocation status;
[0294] Execute a multi-level feedback queue scheduler, allocate resources to the tenants according to the mixed integer linear programming model, and record an execution log of multi-tenant resource allocation through the multi-level feedback queue scheduler, wherein the log information is used to analyze and adjust the mixed integer linear programming model.
[0295] In this embodiment, a module is created to set fields in the relationship table between the storage pool and the tenant;
[0296] The field setting of the relationship table between the storage pool and the tenant includes:
[0297] Use the storage pool and tenant's associated ID information as the primary key;
[0298] Set the ID information of multiple storage pools and multiple tenants;
[0299] Other relevant fields are set for the relationship table between the storage pool and the tenant according to business requirements, wherein the relevant fields include at least one of a specific relationship field, a condition restriction field, and a timestamp field.
[0300] In one embodiment, a setting module is used to set a query table instruction for the relationship table between the storage pool and the tenant, and the query table instruction is used to perform full query, paging query, specific row query, specific column query, row count statistics, and sorting query on the relationship table between the storage pool and the tenant;
[0301] Setting a create pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the create pool tenant relationship instruction is used to add an association record between the storage pool and the tenant in the storage pool and tenant relationship table;
[0302] Setting a modify pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the modify pool tenant relationship instruction is used to update the storage pool and tenant association record in the storage pool and tenant relationship table;
[0303] An unbinding pool-tenant relationship instruction is set for the storage pool-tenant relationship table, and the unbinding pool-tenant relationship instruction is used to delete the storage pool-tenant association record in the storage pool-tenant relationship table.
[0304] In one embodiment, the management module is used to configure the binding relationship between the storage pool and the tenant, including:
[0305] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0306] In response to the association relationship between the storage pool and the tenant not existing, binding the storage pool and the tenant relationship;
[0307] Configuring the change relationship between the storage pool and the tenant includes:
[0308] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0309] In response to the existence of an association relationship between the storage pool and the tenant, unbinding the storage pool from the tenant;
[0310] Configuring a deletion operation of the storage pool includes:
[0311] Obtaining a relationship table between the storage pool and the tenant, and determining whether the storage pool is associated with the tenant;
[0312] In response to the storage pool not being associated with the tenant, deleting the storage pool;
[0313] Configure the deletion operation of the tenant, including:
[0314] Obtain a relationship table between the storage pool and the tenant, and determine whether the tenant is associated with the storage pool;
[0315] In response to the tenant not being associated with the storage pool, the tenant is deleted.
[0316] In one of the embodiments, the management module is used to obtain a storage pool relationship table and a tenant relationship table;
[0317] Determining whether both the ID information of the storage pool and the ID information of the tenant exist according to the storage pool relationship table and the tenant relationship table;
[0318] In response to the existence of both the ID information of the storage pool and the ID information of the tenant, an association record log of the storage pool and the tenant is added to the relationship table between the storage pool and the tenant, the association ID information of the storage pool and the tenant is used as the primary key, and the ID information of the storage pool is associated with the ID information of the tenant.
[0319] In one of the embodiments, the management module is used to determine whether the association relationship between the storage pool and the tenant is valid;
[0320] In response to the association relationship between the storage pool and the tenant being valid, a relationship table between the storage pool and the tenant is obtained, an association record log between the storage pool and the tenant is determined according to the relationship table between the storage pool and the tenant, and the association record log between the storage pool and the tenant is deleted.
[0321] In one of the embodiments, the post-processing module is used to configure the relationship system between the storage pool and the tenant according to the relationship table between the storage pool and the tenant to manage the resources between the storage pool and the tenant when a failure occurs, and then manage the relationship between the storage pool and the tenant by synchronizing information to the storage pool relationship table and the tenant relationship table;
[0322] The managing the relationship between the storage pool and the tenant by synchronizing information to the storage pool relationship table and the tenant relationship table includes:
[0323] Adding a field for associating tenants in the storage pool relationship table;
[0324] Adding a field for associating a storage pool in the tenant relationship table;
[0325] When the storage pool is added or the storage pool is bound to a tenant, the storage pool addition and binding information is synchronized to the storage pool relationship table and the tenant relationship table;
[0326] When the attribute information of the storage pool and the tenant is changed, the attribute change information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0327] When the storage pool and the tenant are unbound, the unbinding information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0328] When any tenant uses resources outside the tenant quota, the system issues an error message and an alarm prompt.
[0329] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0330] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0331] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0332] The technical solution provided in the embodiment of the present application carefully constructs a binding relationship system between the storage pool and the tenant, introduces a special pool tenant management table to handle this process, and specially establishes new management instructions for the pool tenant management table, which are implemented without changing the original table structure, thereby significantly reducing the risks that may be encountered when synchronizing data tables, aiming to avoid the uncertainty factors introduced by modifying the table structure and ensure that the consistency and integrity of the data are not affected; at the same time, strive to achieve minimal changes at the level of issuing instructions to maintain the stability and reliability of the system to the greatest extent, and ensure the continuity and efficiency of business operations.
[0333] The technical solution provided in the embodiment of the present application cleverly transforms the underlying architecture and explores a new path without affecting the stability of the upper-level business logic. It minimizes the risks that may be encountered during the implementation process. At the same time, by simplifying complex processes, the entire system is easier to understand and maintain, and it also provides great convenience and flexibility for subsequent expansion.
[0334] Embodiment 4
[0335] The present invention also provides a resource management device, comprising:
[0336] one or more processors;
[0337] A storage device for storing one or more programs;
[0338] When the one or more programs are executed by the one or more processors, the one or more processors execute the resource management method described below:
[0339] Receive tenants to be allocated resources;
[0340] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0341] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0342] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0343] Create a relationship table between storage pools and tenants;
[0344] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0345] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0346] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0347] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0348] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0349] The technical solution provided in the embodiment of the present application cleverly transforms the underlying architecture and explores a new path without affecting the stability of the upper-level business logic. It minimizes the risks that may be encountered during the implementation process. At the same time, by simplifying complex processes, the entire system is easier to understand and maintain, and it also provides great convenience and flexibility for subsequent expansion.
[0350] Embodiment 5
[0351] The present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following resource management method can be executed:
[0352] Receive tenants to be allocated resources;
[0353] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0354] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0355] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0356] Create a relationship table between storage pools and tenants;
[0357] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0358] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0359] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0360] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0361] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0362] The technical solution provided in the embodiment of the present application carefully constructs a binding relationship system between the storage pool and the tenant, introduces a special pool tenant management table to handle this process, and specially establishes new management instructions for the pool tenant management table, which are implemented without changing the original table structure, thereby significantly reducing the risks that may be encountered when synchronizing data tables, aiming to avoid the uncertainty factors introduced by modifying the table structure and ensure that the consistency and integrity of the data are not affected; at the same time, strive to achieve minimal changes at the level of issuing instructions to maintain the stability and reliability of the system to the greatest extent, and ensure the continuity and efficiency of business operations.
[0363] Embodiment 6
[0364] The present application also provides a computer program product, including a computer program, which can implement the following resource management method when executed by a processor:
[0365] Receive tenants to be allocated resources;
[0366] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0367] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0368] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0369] Create a relationship table between storage pools and tenants;
[0370] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0371] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0372] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0373] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable allocation of resources of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0374] This application can reduce the risks that may be encountered when synchronizing data tables, while avoiding the uncertainty factors introduced by modifying the pool tenant relationship table structure, ensuring that the consistency and integrity of the data are not affected.
[0375] Embodiment 7
[0376] The present application provides a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0377] Receive tenants to be allocated resources;
[0378] Create mixed integer linear programming models and multi-level feedback queue schedulers;
[0379] Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model;
[0380] The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources;
[0381] Create a relationship table between storage pools and tenants;
[0382] Setting an operation relationship table management instruction for the relationship table between the storage pool and the tenant;
[0383] In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant;
[0384] The relationship between the storage pool and the tenant is managed according to the judgment result.
[0385] In one of the embodiments, determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model includes:
[0386] Creating a resource allocation objective function for the tenant to be allocated resources by using the mixed integer linear programming model;
[0387] Adding constraint conditions to the resource allocation objective function, wherein the constraint conditions include resource capacity restriction requirements for the tenant to be resource allocated and tenant resource allocation service quality requirements;
[0388] The resource capacity restriction on the tenant to be allocated resources includes:
[0389] When the tenant to be allocated resources is bound to multiple storage pools, the total capacity of the storage pools corresponding to the tenant is compared with the quota capacity of the tenant, and the resources between the storage pool and the tenant are restricted according to the comparison result;
[0390] The limiting of resources between the storage pool and the tenant according to the comparison result includes:
[0391] In response to the total capacity of the storage pool corresponding to the associated tenant being less than the quota capacity of the tenant, the available capacity of the tenant is the total capacity of the storage pool corresponding to the associated tenant, and when the remaining total capacity of the storage pool corresponding to the associated tenant is distributed in different storage pools, a corresponding number of storage volumes are created according to the number of different storage pools, and resources are allocated to the tenant according to the corresponding number of storage volumes, wherein the capacity of the storage volume is the remaining capacity of the corresponding storage pool;
[0392] In response to the total capacity of the storage pool associated with the tenant being greater than the quota capacity of the tenant, the available capacity of the tenant is the quota capacity of the tenant;
[0393] The resource allocation objective function is calculated by an optimization solver to determine the target resource allocation strategy of the tenant to be allocated resources.
[0394] In one of the embodiments, the multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources, wherein the multi-level feedback queue scheduler includes a plurality of queues, each queue having a different resource allocation priority, including:
[0395] In response to determining the resource allocation strategy of the tenant to be allocated resources through the mixed integer linear programming model, setting the resource allocation priority of the tenant to be allocated resources to a first priority queue;
[0396] Execute a multi-level feedback queue scheduler, and traverse all queues of the multi-level feedback queue scheduler;
[0397] When the tenant to be allocated resources fails to complete resource allocation within the first time threshold, lowering the resource allocation priority of the tenant;
[0398] When the waiting time of the tenant to be allocated resources in all queues of the multi-level feedback queue scheduler is greater than a second time threshold, increasing the resource allocation priority of the tenant;
[0399] In response to the storage pool being bound to multiple tenants, the storage pool resources allocated to each tenant are isolated.
[0400] In one of the embodiments, after dynamically scheduling resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources, the method includes:
[0401] Monitor the multi-level feedback queue scheduler and dynamically adjust resource allocation priority and queue position according to the execution status and resource usage of dynamic resource scheduling of multiple tenants;
[0402] Use machine learning models to predict the resource requirements of multiple tenants, and optimize the multi-tenant resource scheduling strategy based on the prediction results and the current system resource allocation status;
[0403] Execute a multi-level feedback queue scheduler, allocate resources to the tenants according to the mixed integer linear programming model, and record an execution log of multi-tenant resource allocation through the multi-level feedback queue scheduler, wherein the log information is used to analyze and adjust the mixed integer linear programming model.
[0404] In one embodiment, the step of creating a relationship table between storage pools and tenants includes:
[0405] Setting fields in the relationship table between the storage pool and the tenant;
[0406] The field setting of the relationship table between the storage pool and the tenant includes:
[0407] Use the storage pool and tenant's associated ID information as the primary key;
[0408] Set the ID information of multiple storage pools and multiple tenants;
[0409] Other relevant fields are set for the relationship table between the storage pool and the tenant according to business requirements, wherein the relevant fields include at least one of a specific relationship field, a condition restriction field, and a timestamp field.
[0410] In one of the embodiments, the step of setting an operation relationship table management instruction for the relationship table between the storage pool and the tenant includes:
[0411] A query table instruction is set for the relationship table between the storage pool and the tenant, and the query table instruction is used for full query, paging query, specific row query, specific column query, row number statistics and sorting query of the relationship table between the storage pool and the tenant;
[0412] Setting a create pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the create pool tenant relationship instruction is used to add an association record between the storage pool and the tenant in the storage pool and tenant relationship table;
[0413] Setting a modify pool tenant relationship instruction for the storage pool and tenant relationship table, wherein the modify pool tenant relationship instruction is used to update the storage pool and tenant association record in the storage pool and tenant relationship table;
[0414] An unbinding pool-tenant relationship instruction is set for the storage pool-tenant relationship table, and the unbinding pool-tenant relationship instruction is used to delete the storage pool-tenant association record in the storage pool-tenant relationship table.
[0415] In one embodiment, judging the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant, and managing the relationship between the storage pool and the tenant according to the judgment result, includes:
[0416] Configuring the binding relationship between the storage pool and the tenant includes:
[0417] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0418] In response to the association relationship between the storage pool and the tenant not existing, binding the storage pool and the tenant relationship;
[0419] Configuring the change relationship between the storage pool and the tenant includes:
[0420] Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists;
[0421] In response to the existence of an association relationship between the storage pool and the tenant, unbinding the storage pool from the tenant;
[0422] Configuring a deletion operation of the storage pool includes:
[0423] Obtaining a relationship table between the storage pool and the tenant, and determining whether the storage pool is associated with the tenant;
[0424] In response to the storage pool not being associated with the tenant, deleting the storage pool;
[0425] Configure the deletion operation of the tenant, including:
[0426] Obtain a relationship table between the storage pool and the tenant, and determine whether the tenant is associated with the storage pool;
[0427] In response to the tenant not being associated with the storage pool, the tenant is deleted.
[0428] In one embodiment, the binding of the storage pool and the tenant relationship includes:
[0429] Get the storage pool relationship table and tenant relationship table;
[0430] Determining whether both the ID information of the storage pool and the ID information of the tenant exist according to the storage pool relationship table and the tenant relationship table;
[0431] In response to the existence of both the ID information of the storage pool and the ID information of the tenant, an association record log of the storage pool and the tenant is added to the relationship table between the storage pool and the tenant, the association ID information of the storage pool and the tenant is used as the primary key, and the ID information of the storage pool is associated with the ID information of the tenant.
[0432] In one embodiment, the unbinding the relationship between the storage pool and the tenant includes:
[0433] Determining whether the association relationship between the storage pool and the tenant is valid;
[0434] In response to the association relationship between the storage pool and the tenant being valid, a relationship table between the storage pool and the tenant is obtained, an association record log between the storage pool and the tenant is determined according to the relationship table between the storage pool and the tenant, and the association record log between the storage pool and the tenant is deleted.
[0435] In one embodiment, the method comprises:
[0436] When the relationship between the storage pool and the tenant is configured according to the relationship table between the storage pool and the tenant to manage the resources between the storage pool and the tenant, when a failure occurs, the relationship between the storage pool and the tenant is managed by synchronizing information to the storage pool relationship table and the tenant relationship table;
[0437] The managing the relationship between the storage pool and the tenant by synchronizing information to the storage pool relationship table and the tenant relationship table includes:
[0438] Adding a field for associating tenants in the storage pool relationship table;
[0439] Adding a field for associating a storage pool in the tenant relationship table;
[0440] When the storage pool is added or the storage pool is bound to a tenant, the storage pool addition and binding information is synchronized to the storage pool relationship table and the tenant relationship table;
[0441] When the attribute information of the storage pool and the tenant is changed, the attribute change information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0442] When the storage pool and the tenant are unbound, the unbinding information of the storage pool and the tenant is synchronized to the storage pool relationship table and the tenant relationship table;
[0443] When any tenant uses resources outside the tenant quota, the system issues an error message and an alarm prompt.
[0444] This application effectively combines the global optimization capability of MILP and the dynamic scheduling capability of MFQ to achieve reasonable resource allocation of the storage pool to multiple tenants, which can not only improve resource utilization but also ensure the service quality of tenants.
[0445] Figure 7 An exemplary system provided for Embodiment 7 of the present application that can be used to implement various embodiments described in the present application;
[0446] like Figure 7 As shown, in some embodiments, the system can be used as any of the above-mentioned devices for resource management in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in the present application.
[0447] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0448] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0449] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A resource management method, characterized in that: The method is applied to a resource management system, the system includes multiple storage pools and multiple tenants, each storage pool adjusts resources for multiple tenants respectively, and the method includes: Receive tenants to be allocated resources; Create mixed integer linear programming models and multi-level feedback queue schedulers; Determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model; The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources; Create a relationship table between storage pools and tenants; In response to any operation of binding, unbinding, or deleting the storage pool and the tenant, determining the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant; The relationship between the storage pool and the tenant is managed according to the judgment result.
2. The resource management method according to claim 1, characterized in that: The determining the resource allocation strategy of the tenant to be allocated resources by using the mixed integer linear programming model includes: Creating a resource allocation objective function of the tenant to be allocated resources by using the mixed integer linear programming model; Adding constraint conditions to the resource allocation objective function, wherein the constraint conditions include resource capacity restriction requirements for the tenant to be resource allocated and tenant resource allocation service quality requirements; The resource capacity restriction on the tenant to be allocated resources includes: When the tenant to be allocated resources is bound to multiple storage pools, the total capacity of the storage pools corresponding to the tenant is compared with the quota capacity of the tenant, and the resources between the storage pool and the tenant are restricted according to the comparison result; The limiting of resources between the storage pool and the tenant according to the comparison result includes: In response to the total capacity of the storage pool corresponding to the associated tenant being less than the quota capacity of the tenant, the available capacity of the tenant is the total capacity of the storage pool corresponding to the associated tenant, and when the remaining total capacity of the storage pool corresponding to the associated tenant is distributed in different storage pools, a corresponding number of storage volumes are created according to the number of different storage pools, and resources are allocated to the tenant according to the corresponding number of storage volumes, wherein the capacity of the storage volume is the remaining capacity of the corresponding storage pool; In response to the total capacity of the storage pool associated with the tenant being greater than the quota capacity of the tenant, the available capacity of the tenant is the quota capacity of the tenant; The resource allocation objective function is calculated by an optimization solver to determine the target resource allocation strategy of the tenant to be allocated resources.
3. The resource management method according to claim 1, characterized in that: The multi-level feedback queue scheduler dynamically schedules resources for multiple tenants according to the resource allocation policy of the tenant to be allocated resources, wherein the multi-level feedback queue scheduler includes several queues, each queue has a different resource allocation priority, including: In response to determining the resource allocation strategy of the tenant to be allocated resources through the mixed integer linear programming model, setting the resource allocation priority of the tenant to be allocated resources to a first priority queue; Execute a multi-level feedback queue scheduler, and traverse all queues of the multi-level feedback queue scheduler; When the tenant to be allocated resources fails to complete resource allocation within the first time threshold, lowering the resource allocation priority of the tenant; When the waiting time of the tenant to be allocated resources in all queues of the multi-level feedback queue scheduler is greater than a second time threshold, increasing the resource allocation priority of the tenant; In response to the storage pool being bound to multiple tenants, the storage pool resources allocated to each tenant are isolated.
4. The resource management method according to claim 1, characterized in that: After dynamically scheduling resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources, the method includes: Monitor the multi-level feedback queue scheduler and dynamically adjust resource allocation priority and queue position according to the execution status and resource usage of dynamic resource scheduling of multiple tenants; Use machine learning models to predict the resource requirements of multiple tenants, and optimize the multi-tenant resource scheduling strategy based on the prediction results and the current system resource allocation status; Execute a multi-level feedback queue scheduler, allocate resources to the tenants according to the mixed integer linear programming model, and record an execution log of multi-tenant resource allocation through the multi-level feedback queue scheduler, wherein the log information is used to analyze and adjust the mixed integer linear programming model.
5. The resource management method according to claim 1, characterized in that: The step of creating a relationship table between storage pools and tenants includes: Setting fields in the relationship table between the storage pool and the tenant; The field setting of the relationship table between the storage pool and the tenant includes: Use the storage pool and tenant's associated ID information as the primary key; Set the ID information of multiple storage pools and multiple tenants; Other relevant fields are set for the relationship table between the storage pool and the tenant according to business requirements, wherein the relevant fields include at least one of a specific relationship field, a condition restriction field, and a timestamp field.
6. The resource management method according to claim 1, characterized in that: The determining the association between the storage pool and the tenant according to the storage pool-tenant relationship table, and managing the relationship between the storage pool and the tenant according to the determination result, includes: Configuring the binding relationship between the storage pool and the tenant includes: Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists; In response to the association relationship between the storage pool and the tenant not existing, binding the storage pool and the tenant relationship; Configuring the change relationship between the storage pool and the tenant includes: Obtaining a relationship table between the storage pool and the tenant, and determining whether an association relationship between the storage pool and the tenant already exists; In response to the existence of an association relationship between the storage pool and the tenant, unbinding the storage pool from the tenant; Configuring a deletion operation of the storage pool includes: Obtaining a relationship table between the storage pool and the tenant, and determining whether the storage pool is associated with the tenant; In response to the storage pool not being associated with the tenant, deleting the storage pool; Configure the deletion operation of the tenant, including: Obtain a relationship table between the storage pool and the tenant, and determine whether the tenant is associated with the storage pool; In response to the tenant not being associated with the storage pool, the tenant is deleted.
7. The resource management method according to claim 6, characterized in that: The binding of the storage pool to the tenant relationship includes: Get the storage pool relationship table and tenant relationship table; Determining whether both the ID information of the storage pool and the ID information of the tenant exist according to the storage pool relationship table and the tenant relationship table; In response to the ID information of the storage pool and the ID information of the tenant both existing, adding an association record log of the storage pool and the tenant in the relationship table of the storage pool and the tenant, using the association ID information of the storage pool and the tenant as the primary key, and associating the ID information of the storage pool with the ID information of the tenant; The unbinding the relationship between the storage pool and the tenant includes: Determining whether the association relationship between the storage pool and the tenant is valid; In response to the association relationship between the storage pool and the tenant being valid, a relationship table between the storage pool and the tenant is obtained, an association record log between the storage pool and the tenant is determined according to the relationship table between the storage pool and the tenant, and the association record log between the storage pool and the tenant is deleted.
8. A resource management device, characterized in that: The device is applied to a resource management system, the resource management system includes multiple storage pools and multiple tenants, each storage pool adjusts resources for multiple tenants respectively, and the device includes: A receiving module, used for receiving tenants to be allocated resources; Create a module for creating a mixed integer linear programming model and a multi-level feedback queue scheduler; create a relationship table between storage pools and tenants; A determination module, configured to determine a resource allocation strategy for the tenant to be allocated resources by using the mixed integer linear programming model; A judgment module, configured to judge the association relationship between the storage pool and the tenant according to the relationship table between the storage pool and the tenant in response to any operation of binding, unbinding and deleting the storage pool and the tenant; The management module is used to dynamically schedule resources for multiple tenants according to the resource allocation strategy of the tenant to be allocated resources; and manage the relationship between the storage pool and the tenant according to the judgment result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the resource management method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the resource management method according to any one of claims 1 to 7 are implemented.