Request scheduling method for multi-tenant system and related equipment
By preconfiguring I/O resources for the multi-tenant system and allocating independent resources to the tenant, and calculating the scheduling moment in combination with historical operation requests, the problems of I/O resource overload and tenant operation request scheduling in the multi-tenant system are solved, and reasonable resource utilization and system performance guarantees are achieved.
Patent Information
- Application Number
- CN202411699089.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
In a multi-tenant system, multiple tenants share the same storage system, resulting in overload of I/O resources and affecting system performance. Unreasonable occupation of a tenant may cause other tenants to fail to schedule operation requests normally.
By preconfiguring the total amount of I/O resources for the multi-tenant system and pre-allocating independent I/O resources allocations for each tenant, the scheduling time is calculated based on the tenant's historical operation requests, and the target operation request is only scheduled when the scheduling conditions are met to limit the frequent operations of the tenant.
It realizes reasonable scheduling of operation requests for each tenant in a multi-tenant system, avoids I/O resource overload, ensures normal use of the storage system by all tenants, and realizes I/O resource isolation between tenants, ensuring data security and performance.
Smart Images

Figure CN119536951A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of multi-tenant technology, and more particularly, to a request scheduling method and related equipment for a multi-tenant system. Background Art
[0002] In a multi-tenant system architecture, multiple tenants each have independent data and configurations, but at the same time these tenants share the same application and the infrastructure behind it, such as servers, databases, etc.
[0003] In some cases, multiple tenants may share the same storage system, that is, each of these multiple tenants can access the storage system and perform corresponding read and write operations on the data stored in the storage system. However, the I / O resources of a storage system are limited. If multiple tenants frequently access the storage system at the same time and frequently read and write data in the storage system, it will cause the I / O overload of the storage system, affecting the performance of the storage system, and may cause a large number of read and write errors. Alternatively, if one of the multiple tenants unreasonably occupies a large number of I / O resources, it will cause the operation requests of other tenants to be unable to be scheduled and executed normally, thereby affecting the normal use of other tenants, and seriously reducing the overall performance of the multi-tenant system.
[0004] Based on this, how to reasonably schedule the operation requests of each tenant in a multi-tenant system is an urgent problem to be solved. Summary of the invention
[0005] In view of this, one or more embodiments of the present specification provide a request scheduling method and related devices for a multi-tenant system.
[0006] In a first aspect, this specification provides a request scheduling method for a multi-tenant system, wherein the multi-tenant system includes multiple tenants, and the multiple tenants share a storage system; the method comprises:
[0007] Obtaining a target operation request for the storage system initiated by a target tenant among the multiple tenants;
[0008] Obtaining an I / O resource allocation amount pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system;
[0009] Calculate the scheduling time corresponding to the target operation request according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated last by the target tenant;
[0010] Determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute the operations included in the target operation request.
[0011] In a second aspect, the present specification provides a request scheduling device for a multi-tenant system, wherein the multi-tenant system includes multiple tenants, and the multiple tenants share a storage system; the device includes:
[0012] A request acquisition unit, configured to acquire a target operation request for the storage system initiated by a target tenant among the multiple tenants;
[0013] A resource allocation amount acquisition unit, configured to acquire an I / O resource allocation amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system;
[0014] A scheduling time calculation unit, configured to calculate a scheduling time corresponding to the target operation request according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request last initiated by the target tenant;
[0015] The request scheduling unit is used to determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute several operations included in the target operation request.
[0016] Accordingly, the present specification also provides a computing device, comprising: a memory and a processor; the memory stores a computer program / instruction that can be executed by the processor; when the processor executes the computer program / instruction, it executes the request scheduling method for a multi-tenant system described in the first aspect above.
[0017] Accordingly, the present specification also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the request scheduling method for a multi-tenant system as described in the first aspect above is executed.
[0018] Accordingly, the present specification also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the request scheduling method for a multi-tenant system as described in the first aspect above is performed.
[0019] In summary, in the case where multiple tenants in a multi-tenant system share the same storage system, considering that the I / O resources of a storage system are limited, the application can first pre-configure the corresponding I / O resource total amount for the multi-tenant system, and pre-allocate the corresponding I / O resource allocation amount for each tenant from the I / O resource total amount. Further, the application can calculate the scheduling time corresponding to the target operation request initiated this time according to the I / O resource allocation amount of each tenant and the scheduling time corresponding to the historical operation request initiated by each tenant for the storage system last time. Further, only when the scheduling time of the target operation request meets the scheduling condition, the target operation request can be scheduled for execution, so that the operation request of each tenant is reasonably scheduled according to the I / O resource allocation amount of each tenant, so as to limit the frequent operation of each tenant on the storage system, and ensure the normal use of the storage system by all tenants. And, as mentioned above, the application pre-allocates independent I / O resource allocation amounts for each tenant, realizes I / O resource isolation between tenants, so as to ensure that the operation of one tenant will not affect the operation of other tenants, and maintain the data security and performance of all tenants in the multi-tenant system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of a system architecture provided by an exemplary embodiment;
[0021] Figure 2 It is a flowchart of a request scheduling method for a multi-tenant system provided by an exemplary embodiment;
[0022] Figure 3 It is a logical diagram of a request scheduling provided by an exemplary embodiment;
[0023] Figure 4 It is a schematic diagram of a scheduling process of an operation request provided by an exemplary embodiment;
[0024] Figure 5 is a schematic diagram of another scheduling process of an operation request provided by an exemplary embodiment;
[0025] Figure 6 It is a structural schematic diagram of a request scheduling device for a multi-tenant system provided by an exemplary embodiment;
[0026] Figure 7 It is a structural diagram of a computing device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0028] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0029] It should be noted that the “plurality” mentioned in this application refers to two or more than two.
[0030] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] This specification provides a technical solution that can reasonably schedule the operation requests initiated by each tenant for a shared storage system based on the I / O resources pre-allocated to each tenant in a multi-tenant system, so as to limit the unreasonable and frequent operations of the tenants and ensure the normal use of the storage system by all tenants.
[0032] In implementation, the present application is applied to a multi-tenant system, which includes multiple tenants, and the multiple tenants can share a storage system. In an illustrated embodiment, the present application can first obtain a target operation request for the storage system initiated by a target tenant among multiple tenants. Further, the I / O resource allocation amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system can be obtained. Further, the scheduling time corresponding to the target operation request initiated this time can be calculated based on the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated by the target tenant last time. Further, it can be determined whether the scheduling time of the target operation request meets the scheduling conditions. If so, the target operation request can be scheduled to execute several operations contained in the target operation request.
[0033] In the above technical scheme, in the case where multiple tenants in a multi-tenant system share the same storage system, considering that the I / O resources of a storage system are limited, the corresponding I / O resource total amount can be pre-configured for the multi-tenant system first, and the corresponding I / O resource allocation amount can be pre-allocated for each tenant from the I / O resource total amount. Further, the present application can calculate the scheduling time corresponding to the target operation request initiated this time according to the I / O resource allocation amount of each tenant and the scheduling time corresponding to the historical operation request initiated by each tenant for the storage system last time. Further, only when the scheduling time of the target operation request meets the scheduling condition, the target operation request can be scheduled for execution, so that the operation request of each tenant is reasonably scheduled according to the I / O resource allocation amount of each tenant, so as to limit the frequent operation of each tenant on the storage system, and ensure the normal use of the storage system by all tenants. And, as mentioned above, the present application pre-allocates independent I / O resource allocation amounts for each tenant, realizes I / O resource isolation between tenants, so as to ensure that the operation of one tenant will not affect the operation of other tenants, and maintain the data security and performance of all tenants in the multi-tenant system.
[0034] See also Figure 1 , Figure 1 This is a schematic diagram of a system architecture provided by an exemplary embodiment. One or more embodiments provided in this specification may be Figure 1 The system architecture shown in the figure or a similar system architecture is specifically implemented. Figure 1As shown, the system architecture may include a multi-tenant system 10 and a storage system 20. The multi-tenant system 10 may include multiple tenants, such as tenant 100a, tenant 100b, and tenant 100c, etc. Each tenant may also include multiple user groups. In an illustrated embodiment, the multi-tenant system 10 may specifically be a multi-tenant database system, wherein tenant 100a, tenant 100b, and tenant 100c may each have their own database instance.
[0035] like Figure 1 As shown, tenants 100a, 100b and 100c in the multi-tenant system 10 can share the storage system 20, that is, tenants 100a, 100b and 100c can all initiate operation requests to the storage system 20 to perform corresponding read and write operations on the data stored in the storage system 20.
[0036] In an illustrated embodiment, considering that the I / O resources of the storage system 20 are limited, or the access traffic that the storage system 20 can bear is limited, the corresponding total amount of I / O resources can be preconfigured for the multi-tenant system 10 to limit the access traffic of the entire multi-tenant system 10 to the storage system 20. In an illustrated embodiment, the total amount of I / O resources preconfigured for the multi-tenant system 10 should be less than or equal to the limited I / O resources of the storage system 20. Exemplarily, assuming that the limited I / O resources of the storage system 20 are 100M / s, the total amount of I / O resources preconfigured for the multi-tenant system 10 can be 100M / s, 95M / s or 80M / s, etc., and this specification does not specifically limit this.
[0037] In an illustrated embodiment, the corresponding total amount of I / O resources may be preconfigured for the multi-tenant system 10 according to the amount of I / O resources actually used by the multi-tenant system 10 in the past, and this specification does not specifically limit this. Exemplarily, the total amount of I / O resources for the current cycle may be preconfigured for the multi-tenant system 10 periodically according to the amount of I / O resources actually used by the multi-tenant system 10 in the previous cycle according to a preset cycle duration (e.g., 30 seconds, 20 seconds, or 5 seconds, etc.), and this specification does not specifically limit this.
[0038] Furthermore, considering that tenants 100a, 100b, and 100c included in the multi-tenant system 10 share the storage system 20, it is also necessary to further reasonably allocate the total amount of I / O resources of the multi-tenant system 10 to each tenant to limit the access traffic of each tenant to the storage system 20. Exemplarily, assuming that the total amount of I / O resources of the multi-tenant system 10 is 100M / s, the pre-allocated I / O resource allocation amount for tenant 100a may be 30M / s, the pre-allocated I / O resource allocation amount for tenant 100b may be 20M / s, and the pre-allocated I / O resource allocation amount for tenant 100c may be 50M / s, and this specification does not specifically limit this.
[0039] In an illustrated embodiment, appropriate I / O resource allocations can be allocated to each tenant from the total amount of I / O resources of the multi-tenant system 10 according to the amount of I / O resources actually used by each tenant in the past, and this specification does not specifically limit this. Exemplarily, the I / O resource allocations for the current cycle can be allocated to each tenant periodically according to the amount of I / O resources actually used by each tenant in the previous cycle according to a preset cycle duration (e.g., 10 seconds, 5 seconds, or 3 seconds, etc.), and this specification does not specifically limit this.
[0040] Next, we will combine Figure 1 The system architecture shown takes tenant 100a in the multi-tenant system 10 as an example to illustrate the request scheduling method for the multi-tenant system provided by the present application, and the same is true for tenants 100b and 100c.
[0041] In an illustrated embodiment, the multi-tenant system 10 may obtain a target operation request initiated by a tenant 100a among multiple tenants for the storage system 20. Exemplarily, the tenant 100a may initiate a target operation request for the storage system 20 through a corresponding client. Exemplarily, the target operation request may be a read operation, a write operation, or any other possible operation, which is not specifically limited in this specification.
[0042] Furthermore, the multi-tenant system 10 may obtain an I / O resource allocation amount pre-allocated for the tenant 100a from the total amount of I / O resources pre-configured for the multi-tenant system 10 .
[0043] Furthermore, the multi-tenant system 10 can obtain the scheduling time corresponding to the historical operation request last initiated by the tenant 100a.
[0044] Furthermore, the multi-tenant system 10 can calculate the scheduling time corresponding to the target operation request initiated by the tenant 100a this time according to the obtained I / O resource allocation of the tenant 100a and the scheduling time corresponding to the historical operation request initiated by the tenant 100a last time. The specific calculation method can be referred to as follows Figure 2 The description of the corresponding embodiments will not be repeated here.
[0045] Furthermore, the multi-tenant system 10 can reasonably schedule the target operation request according to the calculated scheduling time of the target operation request and the pre-configured scheduling policy. In an illustrated embodiment, the multi-tenant system 10 can determine whether the scheduling time of the target operation request satisfies the scheduling condition. If the scheduling condition is satisfied, the target operation request can be scheduled to execute several operations included in the target operation request, etc. For details, please refer to the following Figure 2 and Figure 3 The description of the corresponding embodiments will not be repeated here.
[0046] It should be noted that this specification does not specifically limit the specific types of I / O resources. In an illustrated embodiment, the I / O resources may include any one or more combinations of the following I / O resources:
[0047] Input Per Second (IPS), which stands for the number of input operations per second;
[0048] Operations Per Second (OPS) represents the number of operations performed per second, which includes any type of operation, such as write operations and read operations;
[0049] Input / Output Operations Per Second (IOPS) represents the number of input and output operations per second and is a key indicator for measuring storage system performance.
[0050] Input Bandwidth (IBW), which represents the speed at which data is transmitted into the storage system;
[0051] Output Bandwidth (OBW) represents the speed at which data is transmitted from the storage system;
[0052] Total input / output bandwidth (IOBW), which represents the sum of input bandwidth and output bandwidth;
[0053] Tags are metadata used to identify and classify storage objects. Tags can add extra information to objects to help users organize, search, and manage data more conveniently. In some aspects, tags can also be used as an I / O resource of the storage system.
[0054] It should be noted that this specification does not specifically limit the specific type of the storage system 20. In an embodiment shown, the storage system 20 can be a storage system based on object storage, or a storage system based on file storage or table storage, etc., and this specification does not specifically limit this.
[0055] It should be noted that this specification does not specifically limit the specific deployment scenario of the multi-tenant system 10. In an illustrated embodiment, the multi-tenant system 10 can be a multi-tenant system in a stand-alone scenario, that is, all services are deployed in a single server. In an illustrated embodiment, the multi-tenant system 10 can also be a multi-tenant system in a distributed scenario, for example, the multi-tenant system 10 can be deployed in any of the multiple nodes (servers) included in the distributed system, and other nodes can also be deployed with their own multi-tenant systems, etc. This specification does not specifically limit this.
[0056] It should be understood that Figure 1 The system architecture shown is only for illustrative purposes. In some possible implementations, the system architecture may also include Figure 1 More or fewer devices are shown, for example, more tenants and storage systems may be included, and each tenant may include multiple user groups, etc. This specification does not specifically limit this.
[0057] See also Figure 2 , Figure 2 is a flowchart of a request scheduling method for a multi-tenant system provided by an exemplary embodiment. The method can be applied to Figure 1 The system architecture shown can be applied to Figure 1 The multi-tenant system shown in FIG. 1 includes multiple tenants, and the multiple tenants share a storage system. Figure 2 As shown, the method may specifically include the following steps S201 to S204.
[0058] Step S201: obtaining a target operation request for a storage system initiated by a target tenant among multiple tenants.
[0059] As described above, multiple tenants in a multi-tenant system share a storage system, and any of the multiple tenants can initiate an operation request for the storage system to perform corresponding read and write operations on data in the storage system.
[0060] In an illustrated embodiment, the multi-tenant system may obtain a target operation request for a storage system initiated by a target tenant among multiple tenants.
[0061] In one illustrated embodiment, since each tenant may include multiple user groups, each user group may initiate an operation request for the storage system. Based on this, the target operation request initiated by the target tenant may specifically be a target operation request initiated by a target user group among the multiple user groups included in the target tenant.
[0062] In an illustrated embodiment, after obtaining the target operation request, the multi-tenant system may parse the target operation request to determine the target tenant and target user group corresponding to the target operation request according to the parsing result, and this specification does not make any specific limitations on this.
[0063] Step S202: Obtain an I / O resource allocation amount pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system.
[0064] Furthermore, after obtaining the target operation request initiated by the target tenant, the multi-tenant system may also obtain the I / O resource allocation amount pre-allocated for the target tenant from the total I / O resource amount pre-configured for the multi-tenant system.
[0065] As described above, since each tenant may include multiple user groups, the present application may further reasonably allocate the I / O resource allocation of each tenant to each user group in each tenant to limit the access flow of each user group to the storage system. In other words, the present application can not only achieve tenant-level flow limitation, but also further achieve user group-level flow limitation. In an illustrated embodiment, appropriate I / O resource allocations can be allocated from the I / O resource allocations of the tenant to each user group in the tenant based on the amount of I / O resources actually used by the user group in the past, and this specification does not specifically limit this.
[0066] For example, assuming that the total amount of I / O resources preconfigured for the multi-tenant system is 100M / s, of which the amount of I / O resources pre-allocated to the target tenant is 30M / s, and assuming that the target tenant contains two user groups (for example, user group A and user group B), user group A can occupy 10M / s and user group B can occupy 20M / s. That is to say, the amount of I / O resources pre-allocated to user group A in the target tenant from the total amount of I / O resources in the multi-tenant system is 10M / s, and the amount of I / O resources pre-allocated to user group B is 20M / s. This specification does not make any specific limitations on this.
[0067] Based on this, after obtaining the target operation request initiated by the target user in the target tenant, the multi-tenant system can further obtain the I / O resource allocation amount pre-allocated for the target user group in the target tenant from the total I / O resources pre-configured for the multi-tenant system.
[0068] Step S203: Calculate the scheduling time corresponding to the target operation request according to the I / O resource allocation of the target tenant and the scheduling time corresponding to the historical operation request initiated last by the target tenant.
[0069] Furthermore, after obtaining the I / O resource allocation amount pre-allocated for the target tenant, the multi-tenant system can calculate the scheduling time corresponding to the target operation request initiated by the target tenant this time based on the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated by the target tenant last time.
[0070] Specifically, after the multi-tenant system obtains the I / O resource allocation amount pre-allocated for the target user group in the target tenant, it can calculate the scheduling time corresponding to the target operation request initiated by the target user group this time based on the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request initiated by the target user group last time.
[0071] In an illustrated implementation, the scheduling time of the target operation request may be composed of one or more times, and a specific calculation method of the scheduling time will be described below.
[0072] 1. Calculate the reserve time (reserve ts)
[0073] In an illustrated embodiment, the I / O resource allocation amount of the target user group may include the I / O resource reservation amount pre-allocated for the target user group, and accordingly, the scheduling time of the target operation request may include the reservation time corresponding to the I / O resource reservation amount. The I / O resource reservation amount refers to the minimum I / O resource amount reserved for each user group, in order to ensure that each user group can obtain the minimum required I / O resources, thereby ensuring the performance and stability of key tasks or services, even in the case of resource constraints.
[0074] Accordingly, when calculating the scheduling time of the target operation request, the multi-tenant system may specifically include: calculating the first scheduling time interval between two operation requests initiated by the target user group based on the I / O resource reservation amount of the target user group; further, the multi-tenant system may calculate the retention time of the target operation request initiated by the target user group this time based on the retention time corresponding to the historical operation request last initiated by the target user group and the first scheduling time interval.
[0075] In an illustrated implementation, the inverse of the I / O resource reservation amount of the target user group may be calculated, and the inverse may be used as the first scheduling time interval between two operation requests initiated by the target user group.
[0076] In an illustrated implementation, the first scheduling time interval may be added to the retention time of the historical operation request initiated by the target user group last time, thereby calculating the retention time of the target operation request initiated by the target user group this time.
[0077] Exemplarily, the calculation method of the retention time of the target operation request can be shown in the following formula (a):
[0078]
[0079] Where i represents the i-th user group in the target tenant (e.g., the target user group), and r represents the r-th request (e.g., the target operation request) initiated by the i-th user group; accordingly, R(r, i) represents the retention time of the r-th request initiated by the i-th user group, R(r-1, i) represents the retention time of the r-1-th request (i.e., the previous request of the r-th request) initiated by the i-th user group, and current time is the current time; r i Represents the reserved amount of I / O resources pre-allocated for the i-th user group.
[0080] For example, assuming that R(r-1, i) is equal to twelve ten and thirty seconds (i.e., 12:10:30), r i Equal to 10 operations / second (taking IOPS as an example), then the first scheduling interval seconds. That is to say, under the restriction of I / O resource reservation of the ith user group, when the two operation requests initiated by the ith user group are scheduled, there must be at least a 0.1 second interval between them. Furthermore, the calculated R(r, i) is equal to 12:10:30.1.
[0081] 2. Calculate the shared moment (share ts)
[0082] In an illustrated embodiment, the I / O resource allocation amount of the target user group may also include an I / O resource sharing ratio preconfigured for the target user group and an I / O resource sharing ratio preconfigured for the target tenant. Accordingly, the scheduling time of the target operation request may also include a sharing time corresponding to the I / O resource sharing ratio.
[0083] In an illustrated embodiment, corresponding I / O resource sharing amounts can be configured for multiple tenants and user groups in a multi-tenant system, and each tenant and user group can use part of the resources in the I / O resource sharing amount according to its own I / O resource sharing ratio. In an illustrated embodiment, the I / O resource sharing amount refers to the portion of I / O resources that are not reserved and restricted, which can be flexibly allocated among different tenants and user groups. In an illustrated embodiment, the I / O resource sharing amount also allows each task to dynamically adjust the usage amount according to demand, ensuring that system resources can be better utilized when some tenants and user groups have additional needs, thereby improving overall efficiency and resource utilization.
[0084] For example, assuming that the multi-tenant system contains a total of 4 tenants, and the I / O resource sharing ratios of these 4 tenants are 1:2:2:1 respectively, if the target tenant is the first tenant, the I / O resource sharing ratio of the target tenant is equal to 1; if the target tenant is the second tenant, the I / O resource sharing ratio of the target tenant is equal to 2, and so on.
[0085] For example, assuming that the target tenant contains a total of 2 user groups, and the I / O resource sharing ratios of the 2 user groups are 1:2 respectively, if the target user group is the first user group, the I / O resource sharing ratio of the target user group is equal to 1; if the target user group is the second user group, the I / O resource sharing ratio of the target user group is equal to 2.
[0086] Accordingly, when calculating the scheduling time of the target operation request, the multi-tenant system can specifically include: calculating the second scheduling time interval between two operation requests initiated by the target user group in the target tenant based on the I / O resource sharing ratio of the target user group and the I / O resource sharing ratio of the target tenant; further, the multi-tenant system can calculate the sharing time of the target operation request initiated by the target user group this time based on the sharing time corresponding to the historical operation request last initiated by the target user group and the second scheduling time interval.
[0087] In one illustrated embodiment, the product of the I / O resource sharing ratio of the target user group and the I / O resource sharing ratio of the target tenant can be calculated first, and then the inverse of the multiplication result can be calculated, and the inverse can be used as the second scheduling time interval between two operation requests initiated by the target user group.
[0088] In an illustrated implementation, the second scheduling time interval may be added to the sharing time of the historical operation request initiated by the target user group last time, thereby calculating the sharing time of the target operation request initiated by the target user group this time.
[0089] Exemplarily, the calculation method of the sharing time of the target operation request may be as shown in the following formula (b):
[0090]
[0091] Where i represents the i-th user group in the target tenant (e.g., the target user group), and w represents the w-th request (e.g., the target operation request) initiated by the i-th user group; accordingly, P(w, i) represents the sharing time of the w-th request initiated by the i-th user group, and P(w-1, i) represents the sharing time of the w-1-th request (i.e., the previous request of the w-th request) initiated by the i-th user group, and current time is the current time; w i g Represents the I / O resource sharing ratio pre-configured for the i-th user group, Represents the I / O resource sharing ratio pre-configured for the j-th tenant (i.e., the target tenant).
[0092] For example, assuming that P(w, i) is equal to twelve ten and thirty seconds (i.e., 12:10:30), is equal to 1, is also equal to 1, then the second scheduling time interval seconds. That is to say, under the restriction of the I / O resource sharing ratio of the ith user group and the jth tenant, when the two operation requests initiated by the ith user group in the jth tenant are scheduled, there must be at least a 1-second interval between the two requests. Furthermore, the calculated P(w, i) is equal to 12:10:31.
[0093] 3. Calculate the limit time (limit ts)
[0094] (1) Calculate the restricted time at the user group level
[0095] In an illustrated embodiment, the I / O resource allocation amount of the target user group may also include the I / O resource limit amount pre-allocated for the target user group, and accordingly, the scheduling time of the target operation request may also include the limit time corresponding to the I / O resource limit amount. Among them, the I / O resource limit amount refers to the maximum I / O resource limit imposed on each user group to prevent a certain task from occupying too many I / O resources. The I / O resource limit amount can ensure that other tasks in the system can obtain the required resources fairly, avoid excessive consumption of resources by a certain task, thereby maintaining the performance and stability of the overall system. It is not difficult to understand that the I / O resource limit amount of the target user group is usually greater than the I / O resource reservation amount of the target user group.
[0096] Accordingly, when calculating the scheduling time of the target operation request, the multi-tenant system can specifically include: calculating the third scheduling time interval between two operation requests initiated by the target user group based on the I / O resource limit of the target user group; further, the multi-tenant system can calculate the restriction time of the target operation request initiated by the target user group this time based on the restriction time corresponding to the historical operation request last initiated by the target user group and the third scheduling time interval.
[0097] In an illustrated implementation, the inverse of the I / O resource limit of the target user group may be calculated and used as the third scheduling time interval between two operation requests initiated by the target user group.
[0098] In an illustrated implementation, the third scheduling time interval may be added to the limit time of the historical operation request initiated by the target user group last time, thereby calculating the limit time of the target operation request initiated by the target user group this time.
[0099] Exemplarily, the calculation method of the limit time of the target operation request can be shown in the following formula (c):
[0100]
[0101] Where i represents the i-th user group in the target tenant (e.g., the target user group), l g The lth action initiated by the i-th user group g request (such as a target operation request); correspondingly, L g (l g , i) represents the lth user group initiated g The limit time of the request, L g (l g -1, i) represents the lth user group initiated by the i-th user group g -1 request (i.e. the lth g The limit time is the previous request of the request), and the current time is the current time; Represents the I / O resource limit pre-allocated for the i-th user group.
[0102] For example, assuming that L g (l g -1, i) is equal to twelve ten and thirty seconds (i.e. 12:10:30), Equal to 100 operations / second (taking IOPS as an example), then the third scheduling interval seconds, that is, under the I / O resource limit of the i-th user group, when the two operation requests initiated by the i-th user group are scheduled, there must be at least 0.01 seconds between them. Furthermore, the calculated L g (l g , i) is equal to 12:10:30.01.
[0103] It should be understood that when the above formula (c) calculates the restriction time of the target operation request according to the I / O resource limit of the target user group, it specifically calculates the restriction time of the target user group corresponding to the target operation request, that is, the restriction time at the user group level.
[0104] It should be noted that in some possible implementations, it is considered that not only the I / O resources available to the user group are limited, but also the I / O resources available to each tenant are limited. In addition, the storage system may contain multiple storage objects, and the I / O resources of each storage object are also limited. In addition, the multi-tenant system may provide at least one network card, and the I / O resources available to each network card are also limited. Therefore, the limit time of an operation request (i.e., the fastest time that can be scheduled) depends not only on the I / O resource limit of the user group that initiates the operation request, but also on the I / O resource limit of the tenant to which the user group belongs, the I / O resource limit of the specific storage object targeted by the operation request, and the I / O resource limit of the network card used to initiate the operation request.
[0105] Based on this, when calculating the restriction time of the target operation request, in addition to calculating the restriction time at the user group level, it is also necessary to calculate the restriction time at the tenant level, the restriction time at the storage object level, and the restriction time at the network card level corresponding to the target operation request, and finally determine the restriction time of the target operation request based on these restriction times to ensure the rationality and accuracy of the request scheduling.
[0106] The following will explain the calculation methods of the tenant-level restriction time, the storage object-level restriction time, and the network card-level restriction time in turn by combining formulas.
[0107] (2) Calculate the tenant-level limit time
[0108] In an illustrated embodiment, the multi-tenant system may first obtain the I / O resource limit amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system. Further, the fourth scheduling time interval between two operation requests initiated by the target tenant may be calculated based on the I / O resource limit amount of the target tenant. Further, the multi-tenant system may calculate the target tenant's limit time corresponding to the target operation request initiated this time based on the limit time corresponding to the historical operation request initiated last time by the target tenant and the fourth scheduling time interval.
[0109] In an illustrated implementation, the inverse of the I / O resource limit of the target tenant may be calculated, and the inverse may be used as the fourth scheduling time interval between two operation requests initiated by the target tenant.
[0110] In an illustrated implementation, the fourth scheduling time interval may be added to the restricted time of the historical operation request initiated last time by the target tenant, so as to calculate the restricted time of the target tenant corresponding to the target operation request initiated this time.
[0111] Exemplarily, the calculation method of the target tenant's restricted time corresponding to the target operation request initiated this time can be shown in the following formula (d):
[0112]
[0113] Where j represents the jth tenant in the multi-tenant system (e.g., the target tenant), l t The lth request initiated on behalf of the jth tenant t request (such as a target operation request); correspondingly, L t (l t , j) represents the lth t The limit time of the request, L t (l t -1, j) represents the lth request initiated by the jth tenant t -1 request (i.e. the lth t The limit time is the previous request of the request), and the current time is the current time; Represents the I / O resource limit pre-allocated for the j-th tenant.
[0114] For example, assuming that L t (l t -1, j) is equal to twelve ten and thirty seconds (i.e. 12:10:30), Equal to 50 operations / second (taking IOPS as an example), then the fourth scheduling interval seconds, that is, under the limit of the I / O resource limit of the jth tenant, when the two operation requests initiated by the jth tenant are scheduled, there must be at least 0.02 seconds between them. Furthermore, the calculated L t (l t , j) is equal to 12:10:30.02.
[0115] (3) Calculate the storage object level limit time
[0116] In an illustrated implementation, the storage system may include multiple storage objects, and the target operation request initiated by the target user group in the target tenant may be an operation request for a target storage object among the multiple storage objects.
[0117] In an illustrated embodiment, the storage system may be an object storage service (OSS) based storage system. Object storage is a data storage architecture mainly used to store large amounts of unstructured data, such as documents, images, videos, etc. In object storage, data is managed as objects, and each object may contain the data itself, metadata, and a unique identifier.
[0118] In an illustrated embodiment, the storage system includes multiple storage buckets for storing object data, and accordingly, the target storage object targeted by the target operation request may be a target storage bucket in the multiple storage buckets. Alternatively, in an illustrated embodiment, the storage system may also include multiple object storages, and the target storage object targeted by the target operation request may also be a target object storage in the multiple object storages, which is not specifically limited in this specification.
[0119] In an illustrated embodiment, the multi-tenant system may first obtain the I / O resource limit amount pre-allocated for the target storage object therein from the total amount of I / O resources pre-configured for the storage system. Further, the fifth scheduling time interval between two operation requests initiated for the target storage object may be calculated based on the I / O resource limit amount of the target storage object. Further, the multi-tenant system may calculate the limit time of the target storage object corresponding to the target operation request initiated this time based on the limit time corresponding to the last historical operation request initiated for the target storage object and the fifth scheduling time interval.
[0120] In an illustrated implementation, the inverse of the I / O resource limit of the target storage object may be calculated and used as the fifth scheduling time interval between two operation requests initiated for the target storage object.
[0121] In an illustrated implementation, the fifth scheduling time interval may be added to the limit time of the last historical operation request initiated for the target storage object, thereby calculating the limit time of the target storage object corresponding to the target operation request initiated this time.
[0122] Exemplarily, the calculation method of the restricted time of the target storage object corresponding to the target operation request initiated this time can be shown in the following formula (e):
[0123]
[0124] Where k represents the kth storage object in the storage system (e.g., the target storage object), l o Represents the lth action initiated for the kth storage object. o request (such as a target operation request); correspondingly, L o (l o , k) represents the lth action initiated for the kth storage object o The limit time of the request, L o (l o -1, k) represents the lth action initiated for the kth storage object o -1 request (i.e. the lth o The limit time is the previous request of the request), and the current time is the current time; Represents the I / O resource limit pre-allocated for the k-th storage object.
[0125] For example, assuming that L o (l o -1, k) is equal to twelve ten and thirty seconds (i.e. 12:10:30), Equal to 20 operations / second (taking IOPS as an example), then the fifth scheduling interval seconds, that is, under the I / O resource limit of the kth storage object, when the two operation requests initiated for the kth storage object are scheduled, there must be at least 0.05 seconds between them. Furthermore, the calculated L o (l o , k) is equal to 12:10:30.05, and this manual does not make any specific limitation on this.
[0126] (4) Calculate the limit time of the network card level
[0127] In an illustrated embodiment, the multi-tenant system may provide at least one network interface card (NIC), hereinafter referred to as NIC. Accordingly, the target operation request initiated by the target user group in the target tenant may be an operation request initiated by the target NIC in the at least one NIC, or in other words, the target user group accesses the storage system through the target NIC to perform corresponding read and write operations on the data in the storage system. In an illustrated embodiment, in order to prevent the NIC from being overloaded, the present application pre-configures a corresponding I / O resource limit for each NIC to limit the network traffic of each NIC.
[0128] In an illustrated embodiment, the multi-tenant system may first obtain the I / O resource limit preconfigured for the target network card. Further, the sixth scheduling time interval between two operation requests initiated by the target network card may be calculated based on the I / O resource limit of the target network card. Further, the multi-tenant system may calculate the target network card limit time corresponding to the target operation request initiated this time based on the limit time corresponding to the historical operation request initiated last time by the target network card and the sixth scheduling time interval.
[0129] In an illustrated implementation, the inverse of the I / O resource limit of the target network card may be calculated and used as the sixth scheduling time interval between two operation requests initiated by the target network card.
[0130] In an illustrated implementation, the sixth scheduling time interval may be added to the limit time of the historical operation request last initiated by the target network card, so as to calculate the limit time of the target network card corresponding to the target operation request initiated this time.
[0131] Exemplarily, the calculation method of the target network card limit time corresponding to the target operation request initiated this time can be shown in the following formula (f):
[0132]
[0133] Where m represents the mth network card provided by the multi-tenant system (for example, the target network card), l n Represents the lth call initiated through the mth network card n request (such as a target operation request); correspondingly, L n (l n , m) represents the lth message initiated by the mth network card n The limit time of the request, L n (l n -1, m) represents the lth call initiated through the mth network card n -1 request (i.e. the lthn The limit time is the previous request of the request), and the current time is the current time; Represents the I / O resource limit preconfigured for the mth network adapter.
[0134] For example, assuming that L n (l n -1, m) is equal to twelve ten and thirty seconds (i.e. 12:10:30), Equal to 100 operations / second (taking IOPS as an example), then the sixth scheduling interval seconds, that is, under the limit of the I / O resource limit of the mth network card, when the two operation requests initiated by the mth network card are scheduled, there must be at least 0.01 seconds between the two. Furthermore, the calculated L n (l n , m) is equal to 12:10:30.01.
[0135] So far, the restriction time of the target user group, the restriction time of the target tenant, the restriction time of the target storage object and the restriction time of the target network card corresponding to the target operation request initiated this time are calculated respectively through the above formulas (c) to (f). Further, the multi-tenant system can finally calculate the restriction time corresponding to the target operation request initiated this time by the target user group according to the restriction time of the target user group, the restriction time of the target tenant, the restriction time of the target storage object and the restriction time of the target network card.
[0136] In one illustrated embodiment, the multi-tenant system can determine a maximum restriction time from the restriction time of the target user group, the restriction time of the target tenant, the restriction time of the target storage object, and the restriction time of the target network card, and determine the maximum restriction time as the restriction time of the target operation request initiated by the target user group this time.
[0137] In summary, when calculating the scheduling time of the target operation request, step S203 may specifically include calculating the reservation time of the target operation request, the sharing time of the target operation request, and the restriction time of the target operation request. In an illustrated embodiment, the reservation time of the target operation request, the sharing time of the target operation request, and the restriction time of the target operation request finally calculated may be shown in the following formulas (1), (2), and (3), respectively:
[0138]
[0139]
[0140] L(l,i,j,k,m)=max{L g (lg , i), L t (l t ,j),L o (l o , k), L n (l n ,m)} (3)
[0141] Where r = w = l g = l t = l o = l n For the explanation of formula (1) to formula (3), please refer to the above explanation of formula (a) to formula (f), which will not be repeated here.
[0142] In addition, it should be noted that the first, second, third, fourth, fifth and sixth in the "first scheduling time interval", "second scheduling time interval", "third scheduling time interval", "fourth scheduling time interval", "fifth scheduling time interval" and "sixth scheduling time interval" described in this specification are only used to distinguish different scheduling time intervals, and do not limit the order or priority of the scheduling time intervals.
[0143] Step S204, determining whether the scheduling time of the target operation request meets the scheduling condition, and if so, scheduling the target operation request to execute the operations included in the target operation request.
[0144] Further, after calculating the scheduling time (including the reserved time, the shared time and the restricted time) of the target operation request, the multi-tenant system can reasonably schedule the target operation request based on the scheduling time. In an illustrated embodiment, the multi-tenant system can first determine whether the scheduling time of the target operation request meets the preset scheduling conditions, and if so, the target operation request can be scheduled to execute the multiple operations included in the target operation request.
[0145] In one illustrated embodiment, see Figure 3 , Figure 3 This is a logical diagram of a request scheduling provided by an exemplary embodiment. Figure 3 The scheduling logic in step S204 is described. Figure 3 As shown, when scheduling the operation request according to the calculated reservation time, sharing time and restriction time of the operation request, the specific scheduling logic may include the following steps S301 to S306.
[0146] Step S301, determine whether the group queue is empty, if so, return to the beginning; if not, execute step S302.
[0147] In an illustrated embodiment, the multi-tenant system may add the received operation requests initiated by each user group in the multiple tenants to the group queue corresponding to each user group, and calculate the retention time, sharing time and restriction time of each operation request based on the calculation method described in the above step S203. For example, the target operation request initiated by the target user group may be added to the target group queue corresponding to the target user group, and the retention time, sharing time and restriction time of the target operation request may be calculated.
[0148] In an illustrated implementation, the multi-tenant system may use a linked list to manage group queues, which is not specifically limited in this specification.
[0149] like Figure 3 As shown, when executing request scheduling, the multi-tenant system can first check the group queues corresponding to each user group in multiple tenants. If all current group queues do not contain operation requests (the group queues are empty), that is, the multi-tenant system currently has no schedulable operation requests, then the scheduling is terminated and the process returns to the beginning. In an illustrated embodiment, the so-called multi-tenant system currently has no schedulable operation requests, which may be that the multi-tenant system has not currently received an operation request initiated by any user group in any tenant, or that all operation requests received by the multi-tenant system have been successfully scheduled and executed. This specification does not make specific limitations on this.
[0150] Step S302: If the group queue is not empty, select the operation request with the smallest retention time from all group queues.
[0151] In an illustrated embodiment, if the group queue is not empty, the multi-tenant system can select the operation request with the smallest retention time (e.g., R(r,i,k,m,n) shown in the above formula (1)) from the multiple operation requests contained in all group queues. It should be understood that the smaller the retention time of the operation request, the earlier the operation request should be scheduled, and the larger the retention time of the operation request, the later the operation request should be scheduled, so as to ensure that all operation requests are scheduled in an orderly and reasonable manner.
[0152] That is to say, only when the retention time of the target operation request initiated by the target user group is the operation request with the smallest retention time in all group queues, the target operation request can be selected and the subsequent scheduling logic can be executed. In an illustrated embodiment, if all current group queues only contain the target operation request, the target operation request can be directly selected.
[0153] Step S303, determining whether the retention time of the selected operation request is less than the current time, if so, scheduling the operation request; if not, executing step S304.
[0154] Furthermore, after selecting the operation request with the smallest retention time from all group queues, it can be further determined whether the retention time of the operation request is less than the current time. If the retention time of the operation request is less than the current time, the operation request can be scheduled to execute several operations included in the operation request.
[0155] In one illustrated embodiment, in response to a target operation request initiated by a target user group being the operation request with the smallest retention time in all group queues, it is necessary to further determine whether the retention time of the target operation request is less than the current time. If the retention time of the target operation request is less than the current time, the target operation request can be scheduled to execute several operations contained in the target operation request.
[0156] Step S304, if the reservation time of the operation request is greater than the current time, further determine whether the limit time of the operation request is less than the current time, if so, execute step S305; if not, return to the beginning.
[0157] Furthermore, if the reserved time of the selected operation request (e.g., the target operation request) is greater than the current time, it can be further determined whether the restricted time of the operation request (e.g., L(r,i,k,m,n) shown in the above formula (3)) is less than the current time. It should be understood that since the preconfigured I / O resource reservation amount is usually less than the I / O resource limit amount, the restricted time of the operation request is usually less than the reserved time of the operation request. In an illustrated embodiment, the restricted time of the operation request can be regarded as the time when the operation request can be scheduled for execution the fastest.
[0158] like Figure 3 As shown, if it is further determined that the restricted time of the operation request is greater than the current time, the scheduling can be ended and returned to the beginning.
[0159] In one illustrated embodiment, considering that it takes a certain amount of time for an operation request to be added to the group queue and to be selected to execute the current step S304, it is necessary to subtract a preset time interval (which can be recorded as POP_USEC) from the current time in order to achieve shared scheduling, thereby improving the accuracy and precision of request scheduling.
[0160] In an illustrated implementation, the user may set the preset time interval according to actual conditions or requirements, for example, it may be 1ms, 2ms or 5ms, etc., and this specification does not make any specific limitation on this.
[0161] Based on this, when determining whether the restricted time of the operation request is less than the current time, it can specifically include: determining whether the restricted time of the operation request is less than the difference between the current time and the preset time interval. Correspondingly, if the restricted time of the operation request is greater than the difference between the current time and the preset time interval, the scheduling can be ended and returned to the beginning.
[0162] Step S305: If the restricted time of the operation request is less than the current time, the operation request is added to the preparation queue.
[0163] Furthermore, if the restricted time of the selected operation request (eg, target operation request) is less than the current time, it is determined that the operation request can be scheduled, and the operation request can be added to the ready queue to be scheduled. Accordingly, the operation request can be deleted from the original group queue.
[0164] In an illustrated implementation, the preparation queue may be a preset buffer in which schedulable operation requests initiated by all user groups are stored.
[0165] Step S306: Select an operation request with the smallest shared time from the preparation queue, and schedule the operation request to execute several operations included in the operation request.
[0166] Furthermore, the multi-tenant system can select the operation request with the smallest shared time (e.g., P(r,i,k,m,n) shown in the above formula (3)) from the multiple operation requests included in the preparation queue, and schedule the operation request to execute the several operations included in the operation request, thereby achieving the effect of shared scheduling and ensuring the performance of the entire multi-tenant system. Accordingly, after the operation request is successfully scheduled, the operation request can be deleted from the preparation queue.
[0167] In an illustrated embodiment, in response to a target operation request initiated by a target user group whose retention time is an operation request with the smallest shared time among multiple operation requests contained in a current preparation queue, the target operation request can be scheduled to execute several operations contained in the target operation request.
[0168] Next, we will Figure 2 and Figure 3 The execution entities of each step in the illustrated process are described, and the request scheduling method for a multi-tenant system provided in this specification is described in conjunction with these execution entities.
[0169] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a scheduling process of an operation request provided by an exemplary embodiment. Figure 4As shown, the multi-tenant system may include multiple I / O managers corresponding to multiple tenants, multiple scheduling threads (senders) for request scheduling, thread pools (channels) and devices (devices) for executing operation tasks, etc.
[0170] In an illustrated embodiment, still taking a target operation request for a storage system initiated by a target user group in a target tenant as an example, the target operation request can be generated by a foreground thread in a multi-tenant system. Furthermore, after obtaining the target operation request, the foreground thread can parse the target operation request and determine the target tenant and target user group corresponding to the target operation request based on the parsing result.
[0171] Furthermore, if Figure 4 As shown, the foreground thread can send the target operation request to the I / O manager corresponding to the target tenant.
[0172] Furthermore, if Figure 4 As shown, after receiving the target operation request, the I / O manager corresponding to the target tenant can randomly select a scheduling thread from multiple scheduling threads running in the multi-tenant system, and further send the target operation request to the scheduling thread so that the scheduling thread can request scheduling for the target operation request.
[0173] Furthermore, if Figure 4 As shown, after receiving the target operation request, the scheduling thread can Figure 2 and Figure 3 The request scheduling method shown calculates the reservation time, sharing time and restriction time of the target operation request, and reasonably schedules the target operation request based on the time, etc., which will not be described in detail here.
[0174] Furthermore, if Figure 4 As shown, if the target operation request meets the scheduling conditions, the scheduling thread can send the target operation request to the thread pool, so that several threads in the thread pool can execute several operations (such as read and write operations, etc.) included in the target operation request. Specifically, the operations can be executed by corresponding devices, and this manual does not make specific limitations on this.
[0175] Furthermore, if Figure 4 As shown, after the operation is completed, the execution status (Record) can also be recorded through the callback function callback, and this specification does not make specific limitations on this.
[0176] In one illustrated embodiment, during the request scheduling process, the foreground thread in the multi-tenant system may wait for the target operation request until the I / O times out or the operations included in the target operation request are all completed. This specification does not make any specific limitations on this.
[0177] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of another scheduling process of an operation request provided by an exemplary embodiment. Figure 5 As shown, the multiple scheduling threads running in the multi-tenant system may specifically include scheduling thread 1 and scheduling thread 2, and the multiple group queues corresponding to the multiple user groups may specifically include g1 group queue and g2 group queue.
[0178] like Figure 5 As shown, still taking the target operation request initiated by the target user group in the target tenant as an example, the I / O manager corresponding to the target tenant can assign the target operation request to the scheduling thread 1 for scheduling processing. Figure 2 As shown, the scheduling thread 2 can schedule and process other operation requests in parallel to obtain better scheduling performance.
[0179] Furthermore, if Figure 5 As shown, scheduling thread 1 may add the target operation request to a target group queue corresponding to the target user group (eg, g1 group queue).
[0180] Furthermore, if Figure 5 As shown, the scheduling thread 1 can calculate the reservation time, sharing time and restriction time of the target operation request through a multi-layer restriction and allocation mechanism. Exemplarily, the multi-layer restriction may include a group clock, a tenant clock, an object storage clock (OSS clock) and a network card clock (NIC clock).
[0181] Among them, the group clock is used to limit resource usage at the user group level, involving the retention time, sharing time and restriction time of the target user group corresponding to the target operation request, such as the above formula (a), consensus (b) and formula (c).
[0182] The tenant clock is used to limit tenant-level resource usage, and involves the restricted time of the target tenant corresponding to the target operation request, such as the above formula (d).
[0183] The object storage clock is used to limit the use of object storage related resources, and involves the restricted time of the target object storage corresponding to the target operation request, such as the above formula (e).
[0184] The network card clock is used to limit the use of network interface card related resources, and involves the restricted time of the target network card corresponding to the target operation request, such as the above formula (f).
[0185] Furthermore, if Figure 5 As shown in Figure 1, when the queues of groups g1, g2, etc. are not empty, the scheduler in the multi-tenant system can schedule the queues according to the preset scheduling logic (for example, Figure 3 The scheduling logic shown in the figure) selects a suitable operation request from the group queues g1, g2, etc., and submits the operation request to the thread pool and device for I / O operation processing, etc. This manual does not make specific limitations on this.
[0186] In summary, in the case where multiple tenants in a multi-tenant system share the same storage system, the present application can first pre-configure the corresponding total amount of I / O resources for the multi-tenant system, and pre-allocate the corresponding I / O resource allocation amount for each tenant from the total amount of I / O resources. Furthermore, the present application can calculate the scheduling time corresponding to the target operation request initiated this time based on the I / O resource allocation amount of each tenant and the scheduling time corresponding to the historical operation request initiated by each tenant for the storage system last time. Furthermore, the target operation request can only be scheduled for execution if the scheduling time of the target operation request meets the scheduling conditions. In this way, it is achieved that the operation requests of each tenant are reasonably scheduled according to the I / O resource allocation amount of each tenant, so as to limit the frequent operations of each tenant on the storage system and ensure the normal use of the storage system by all tenants.
[0187] As described above, the present application pre-allocates an independent I / O resource allocation for each tenant, and reasonably schedules the requests of each tenant based on the I / O resource allocation of each tenant, thereby reliably achieving I / O resource isolation between tenants, ensuring that the operation of one tenant will not affect the operation of other tenants, and maintaining the data security and performance of all tenants in the multi-tenant system.
[0188] In addition, the present application also pre-allocates independent I / O resource allocations for each user group in each tenant. The present application can further schedule the operation requests of each user group according to the I / O resource allocation of each user group to limit the frequent operations of each user group on the storage system, thereby further realizing the I / O resource isolation between user groups and ensuring that the operations of one user group will not affect the operations of other user groups. In other words, the present application realizes the I / O resource isolation between tenants and user groups.
[0189] Furthermore, if a tenant's multiple user groups include transaction processing (TP) user groups and application programming (AP) user groups, then the I / O resource isolation between user groups can also ensure that the I / O operations of the TP user group in a tenant do not affect the I / O operations of the AP user group. Among them, the TP user group usually refers to the user group responsible for transaction processing, which is mainly responsible for handling transaction-related tasks and ensuring the data consistency and integrity of the system. Among them, the AP user group usually refers to the user group responsible for the application programming interface (API), which is mainly responsible for developing, maintaining and managing the API, ensuring smooth interaction between the system and other systems or components, etc., which will not be elaborated here.
[0190] In addition to the resource restrictions at the tenant level and the resource restrictions at the user group level, this application also takes into account the resource restrictions of object storage and the resource restrictions of the network card. It ensures that the current limiting mechanism of object storage will not be triggered due to excessive use of its I / O resources (such as bandwidth), thereby maintaining the stability and continuity of the service. Object storage is different from cloud disks and does not have an independent network card. This application can ensure that operation requests for object storage will not exceed the upper limit of the network card, and avoid congestion of the TCP sliding window caused by too many requests accumulating in the TCP sliding window.
[0191] Corresponding to the implementation of the above method flow, the embodiment of this specification also provides a request scheduling device for a multi-tenant system. Figure 6 , Figure 6 is a schematic diagram of a structure of a request scheduling device for a multi-tenant system provided by an exemplary embodiment. The device 60 can be applied to Figure 1 The system architecture shown can be applied to Figure 1 The multi-tenant system shown in FIG. 1 includes multiple tenants, and the multiple tenants share a storage system. Figure 6 As shown, the device 60 includes:
[0192] A request acquisition unit 601 is used to acquire a target operation request for the storage system initiated by a target tenant among the multiple tenants;
[0193] The resource allocation amount acquisition unit 602 is used to acquire the I / O resource allocation amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system;
[0194] The scheduling time calculation unit 603 is used to calculate the scheduling time corresponding to the target operation request according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated by the target tenant last time;
[0195] The request scheduling unit 604 is used to determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute the multiple operations included in the target operation request.
[0196] In an illustrated implementation manner, the target tenant includes multiple user groups, and the target operation request is an operation request initiated by a target user group among the multiple user groups;
[0197] The resource allocation amount acquisition unit 602 is specifically used to:
[0198] Obtaining an I / O resource allocation amount pre-allocated for the target user group in the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system;
[0199] The scheduling time calculation unit 603 is specifically used for:
[0200] The scheduling time corresponding to the target operation request is calculated according to the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request initiated last by the target user group.
[0201] In an illustrated embodiment, the I / O resource allocation amount of the target user group includes an I / O resource reservation amount pre-allocated for the target user group, and the scheduling time includes a reservation time corresponding to the I / O resource reservation amount;
[0202] The scheduling time calculation unit 603 is specifically used for:
[0203] Calculating a first scheduling time interval between two operation requests initiated by the target user group according to the I / O resource reservation amount of the target user group;
[0204] The retention time of the target operation request is calculated according to the retention time corresponding to the historical operation request initiated last by the target user group and the first scheduling time interval.
[0205] In an illustrated embodiment, the I / O resource allocation amount of the target user group further includes an I / O resource sharing ratio preconfigured for the target user group and an I / O resource sharing ratio preconfigured for the target tenant, and the scheduling time further includes a sharing time corresponding to the I / O resource sharing ratio;
[0206] The scheduling time calculation unit 603 is specifically used for:
[0207] Calculating a second scheduling time interval between two operation requests initiated by the target user group according to the I / O resource sharing ratio of the target user group and the I / O resource sharing ratio of the target tenant;
[0208] The sharing time of the target operation request is calculated according to the sharing time corresponding to the historical operation request initiated by the target user group last time and the second scheduling time interval.
[0209] In an illustrated embodiment, the I / O resource allocation amount of the target user group further includes an I / O resource limit amount pre-allocated for the target user group, and the scheduling time further includes a limit time corresponding to the I / O resource limit amount; wherein the I / O resource limit amount is greater than the I / O resource reservation amount;
[0210] The scheduling time calculation unit 603 is specifically used for:
[0211] Calculating a third scheduling time interval between two operation requests initiated by the target user group according to the I / O resource limit of the target user group;
[0212] The restricted time of the target operation request is calculated according to the restricted time corresponding to the historical operation request initiated last by the target user group and the third scheduling time interval.
[0213] In an illustrated embodiment, the scheduling time calculation unit 603 is further used to:
[0214] Obtaining a limited amount of I / O resources pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system;
[0215] Calculating a fourth scheduling time interval between two operation requests initiated by the target tenant according to the I / O resource limit of the target tenant;
[0216] The restricted time of the target tenant corresponding to the target operation request initiated this time is calculated according to the restricted time corresponding to the historical operation request initiated last time by the target tenant and the fourth scheduling time interval.
[0217] In an illustrated embodiment, the storage system includes multiple storage objects, and the target operation request is an operation request for a target storage object among the multiple storage objects; the scheduling time calculation unit 603 is further used to:
[0218] Obtaining a limited amount of I / O resources pre-allocated for the target storage object from a total amount of I / O resources pre-configured for the storage system;
[0219] Calculating a fifth scheduling time interval between two operation requests initiated for the target storage object according to the I / O resource limit of the target storage object;
[0220] The limit time of the target storage object corresponding to the target operation request initiated this time is calculated according to the limit time corresponding to the historical operation request initiated last time for the target storage object and the fifth scheduling time interval.
[0221] In an illustrated embodiment, the multi-tenant system provides at least one network card, and the target operation request is an operation request initiated by a target network card in the at least one network card; the scheduling time calculation unit 603 is further used to:
[0222] Calculating a sixth scheduling time interval between two operation requests initiated by the target network card according to an I / O resource limit preconfigured for the target network card;
[0223] The limit time of the target network card corresponding to the target operation request initiated this time is calculated according to the limit time corresponding to the historical operation request initiated last time through the target network card and the sixth scheduling time interval.
[0224] In an illustrated implementation manner, the scheduling time calculation unit 603 is specifically configured to:
[0225] Calculate the restricted time of the target user group corresponding to the target operation request initiated this time according to the restricted time corresponding to the historical operation request initiated last time by the target user group and the third scheduling time interval;
[0226] A maximum restriction time is determined from the restriction time of the target user group, the restriction time of the target tenant, the restriction time of the target storage object and the restriction time of the target network card, and the maximum restriction time is determined as the restriction time of the target operation request.
[0227] In an illustrated implementation manner, the request scheduling unit 604 is specifically configured to:
[0228] Determine whether the retention time of the target operation request is less than the current time;
[0229] If the retention time of the target operation request is less than the current time, executing the target operation request;
[0230] If the retention time of the target operation request is greater than the current time, further determining whether the restriction time of the target operation request is less than the current time;
[0231] If the restricted time of the target operation request is less than the current time, the target operation request is scheduled to execute several operations included in the target operation request.
[0232] In an illustrated implementation manner, the request scheduling unit 604 is specifically configured to:
[0233] Determine whether the restricted time of the target operation request is less than the difference between the current time and a preset time interval.
[0234] In an illustrated implementation manner, the request scheduling unit 604 is specifically configured to:
[0235] If the limit time of the target operation request is less than the difference between the current time and the preset time interval, adding the target operation request to the preparation queue;
[0236] In response to the target operation request being an operation request having the smallest shared time among all operation requests included in the preparation queue, the target operation request is scheduled to execute several operations included in the target operation request.
[0237] In an illustrated embodiment, the storage system is an object storage-based storage system, the storage system includes a plurality of storage buckets for storing object data, and the target storage object is a target storage bucket among the plurality of storage buckets.
[0238] In an illustrated embodiment, the I / O resources include any one or more combinations of the following I / O resources: IPS, OPS, IOPS, IBW, OBW, IOBW, and TAG.
[0239] The implementation process of the functions and effects of each unit in the above-mentioned device 60 is specifically described in the above-mentioned embodiment, and will not be repeated here. It should be understood that the above-mentioned device 60 can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor (CPU) of the device where it is located reading the corresponding computer program instructions into the memory and running them. From the hardware level, in addition to the CPU and memory, the device where the above-mentioned device is located usually also includes other hardware such as chips for wireless signal transmission and reception, and / or other hardware such as boards and cards for realizing network communication functions.
[0240] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Those of ordinary skill in the art may understand and implement it without creative work.
[0241] The devices, units, and modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, a vehicle-mounted computer, or a combination of any of these devices.
[0242] Corresponding to the above method embodiment, the embodiment of this specification also provides a computing device. Figure 7 , Figure 7 It is a structural diagram of a computing device provided by an exemplary embodiment. Figure 7 The computing device shown may be Figure 1 A computing device in a multi-tenant system as shown, wherein the multi-tenant system includes multiple tenants, and the multiple tenants share a storage system. Figure 7 As shown, the computing device includes a processor 1001 and a memory 1002, and may further include an input device 1004 (such as a keyboard, etc.) and an output device 1005 (such as a display, etc.). The processor 1001, the memory 1002, the input device 1004, and the output device 1005 may be connected via a bus or other means. Figure 7As shown, the memory 1002 includes a computer-readable storage medium 1003, which stores a computer program that can be run by the processor 1001. The processor 1001 can be a CPU, a microprocessor, or an integrated circuit for controlling the execution of the above method embodiment. When the processor 1001 runs the stored computer program, it can execute the various steps of the request scheduling method for the multi-tenant system in the embodiment of this specification, including: obtaining a target operation request for the storage system initiated by a target tenant among multiple tenants; obtaining an I / O resource allocation amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system; according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated by the target tenant last time, calculate the scheduling time corresponding to the target operation request; determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute several operations contained in the target operation request, and so on.
[0243] For a detailed description of each step of the above-mentioned request scheduling method for a multi-tenant system, please refer to the previous content and will not be repeated here.
[0244] Corresponding to the above method embodiment, the embodiment of this specification also provides a computer-readable storage medium, on which a computer program is stored, and when these computer programs are executed by a processor, they execute the various steps of the request scheduling method for a multi-tenant system in the embodiment of this specification. Please refer to the description of the above embodiment for details, which will not be repeated here.
[0245] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
[0246] In a typical configuration, a terminal device includes one or more CPUs, input / output interfaces, network interfaces, and memory.
[0247] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0248] Computer readable media include permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer readable instructions, data structures, program modules or other data.
[0249] Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0250] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0251] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
Claims
1. A request scheduling method for a multi-tenant system, characterized in that: The multi-tenant system includes multiple tenants, and the multiple tenants share a storage system; the method includes: Obtaining a target operation request for the storage system initiated by a target tenant among the multiple tenants; Obtaining an I / O resource allocation amount pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system; Calculate the scheduling time corresponding to the target operation request according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request initiated last by the target tenant; Determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute the operations included in the target operation request.
2. The method according to claim 1, characterized in that: The target tenant includes multiple user groups, and the target operation request is an operation request initiated by a target user group among the multiple user groups; The obtaining of an I / O resource allocation amount pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system includes: Obtaining an I / O resource allocation amount pre-allocated for the target user group in the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system; The calculating, according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request last initiated by the target tenant, the scheduling time corresponding to the target operation request includes: The scheduling time corresponding to the target operation request is calculated according to the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request initiated last by the target user group.
3. The method according to claim 2, characterized in that The I / O resource allocation amount of the target user group includes an I / O resource reservation amount pre-allocated for the target user group, and the scheduling time includes a reservation time corresponding to the I / O resource reservation amount; The calculating, according to the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request last initiated by the target user group, the scheduling time corresponding to the target operation request includes: Calculating a first scheduling time interval between two operation requests initiated by the target user group according to the I / O resource reservation amount of the target user group; The retention time of the target operation request is calculated according to the retention time corresponding to the historical operation request initiated last by the target user group and the first scheduling time interval.
4. The method according to claim 3, characterized in that The I / O resource allocation amount of the target user group also includes an I / O resource sharing ratio preconfigured for the target user group and an I / O resource sharing ratio preconfigured for the target tenant, and the scheduling time also includes a sharing time corresponding to the I / O resource sharing ratio; The calculating, according to the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request last initiated by the target user group, the scheduling time corresponding to the target operation request includes: Calculating a second scheduling time interval between two operation requests initiated by the target user group according to the I / O resource sharing ratio of the target user group and the I / O resource sharing ratio of the target tenant; The sharing time of the target operation request is calculated according to the sharing time corresponding to the historical operation request initiated by the target user group last time and the second scheduling time interval.
5. The method according to claim 4, characterized in that The I / O resource allocation amount of the target user group also includes an I / O resource limit amount pre-allocated for the target user group, and the scheduling time also includes a limit time corresponding to the I / O resource limit amount; wherein the I / O resource limit amount is greater than the I / O resource reservation amount; The calculating, according to the I / O resource allocation amount of the target user group and the scheduling time corresponding to the historical operation request last initiated by the target user group, the scheduling time corresponding to the target operation request includes: Calculating a third scheduling time interval between two operation requests initiated by the target user group according to the I / O resource limit of the target user group; The restricted time of the target operation request is calculated according to the restricted time corresponding to the historical operation request initiated last by the target user group and the third scheduling time interval.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining a limited amount of I / O resources pre-allocated for the target tenant from a total amount of I / O resources pre-configured for the multi-tenant system; Calculating a fourth scheduling time interval between two operation requests initiated by the target tenant according to the I / O resource limit of the target tenant; The restricted time of the target tenant corresponding to the target operation request initiated this time is calculated according to the restricted time corresponding to the historical operation request initiated last time by the target tenant and the fourth scheduling time interval.
7. The method according to claim 6, characterized in that The storage system includes a plurality of storage objects, and the target operation request is an operation request for a target storage object among the plurality of storage objects; the method further includes: Obtaining a limited amount of I / O resources pre-allocated for the target storage object from a total amount of I / O resources pre-configured for the storage system; Calculating a fifth scheduling time interval between two operation requests initiated for the target storage object according to the I / O resource limit of the target storage object; The limit time of the target storage object corresponding to the target operation request initiated this time is calculated according to the limit time corresponding to the historical operation request initiated last time for the target storage object and the fifth scheduling time interval.
8. The method according to claim 7, characterized in that The multi-tenant system provides at least one network card, and the target operation request is an operation request initiated by a target network card in the at least one network card; The method further comprises: Calculating a sixth scheduling time interval between two operation requests initiated by the target network card according to an I / O resource limit preconfigured for the target network card; The limit time of the target network card corresponding to the target operation request initiated this time is calculated according to the limit time corresponding to the historical operation request initiated last time through the target network card and the sixth scheduling time interval.
9. The method according to claim 8, characterized in that The calculating the restricted time of the target operation request according to the restricted time corresponding to the historical operation request last initiated by the target user group and the third scheduling time interval includes: Calculate the restricted time of the target user group corresponding to the target operation request initiated this time according to the restricted time corresponding to the historical operation request initiated last time by the target user group and the third scheduling time interval; A maximum restriction time is determined from the restriction time of the target user group, the restriction time of the target tenant, the restriction time of the target storage object and the restriction time of the target network card, and the maximum restriction time is determined as the restriction time of the target operation request.
10. The method according to claim 9, characterized in that The determining whether the scheduling time of the target operation request satisfies the scheduling condition, and if so, scheduling the target operation request to execute the operations included in the target operation request, including: Determine whether the retention time of the target operation request is less than the current time; If the retention time of the target operation request is less than the current time, executing the target operation request; If the retention time of the target operation request is greater than the current time, further determining whether the restriction time of the target operation request is less than the current time; If the restricted time of the target operation request is less than the current time, the target operation request is scheduled to execute several operations included in the target operation request.
11. The method according to claim 10, characterized in that The determining whether the limit time of the target operation request is less than the current time includes: Determine whether the restricted time of the target operation request is less than the difference between the current time and a preset time interval.
12. The method according to claim 11, characterized in that If the restricted time of the target operation request is less than the current time, the target operation request is scheduled to execute several operations included in the target operation request, including: If the limit time of the target operation request is less than the difference between the current time and the preset time interval, adding the target operation request to the preparation queue; In response to the target operation request being an operation request having a smallest shared time among all operation requests included in the preparation queue, the target operation request is scheduled to execute several operations included in the target operation request.
13. The method according to claim 7, characterized in that The storage system is an object storage-based storage system, the storage system includes a plurality of storage buckets for storing object data, and the target storage object is a target storage bucket among the plurality of storage buckets.
14. The method according to any one of claims 1 to 13, characterized in that: The I / O resources include any one or more combinations of the following I / O resources: IPS, OPS, IOPS, IBW, OBW, IOBW, and TAG.
15. A request scheduling device for a multi-tenant system, characterized in that: The multi-tenant system includes multiple tenants, and the multiple tenants share a storage system; the device includes: A request acquisition unit, configured to acquire a target operation request for the storage system initiated by a target tenant among the multiple tenants; A resource allocation amount acquisition unit, configured to acquire an I / O resource allocation amount pre-allocated for the target tenant from the total amount of I / O resources pre-configured for the multi-tenant system; A scheduling time calculation unit, configured to calculate a scheduling time corresponding to the target operation request according to the I / O resource allocation amount of the target tenant and the scheduling time corresponding to the historical operation request last initiated by the target tenant; The request scheduling unit is used to determine whether the scheduling time of the target operation request meets the scheduling condition, and if so, schedule the target operation request to execute several operations included in the target operation request.
16. A computing device, characterized in that: include: Memory and processor; The memory has stored thereon computer programs / instructions executable by the processor; When the processor runs the computer program / instructions, the processor performs the method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: A computer program / instruction is stored thereon, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
18. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 14 is implemented.