Access method, system, and storage medium
By implementing IO scheduling on the compute nodes, the problem of strong dependency between the compute layer and the storage layer is solved, the versatility of the compute nodes and the scalability of the database system are improved, and the decoupling of the compute nodes and storage nodes is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-25
- Publication Date
- 2026-06-26
AI Technical Summary
The strong dependency between the compute layer and the storage layer reduces the versatility of the compute layer, making compute nodes unable to adapt to different storage nodes, thus affecting the scalability and versatility of the database system.
The IO scheduling function is moved from the storage node to the compute node. The compute node initiates IO requests to the storage node based on the tenant's actual IOPS and achieves IO isolation through the IO scheduling algorithm, reducing the dependence on the storage node and decoupling the compute node from the storage node.
It improves the versatility of computing nodes, enabling them to adapt to different storage nodes and enhancing the scalability and flexibility of the database system.
Smart Images

Figure CN122285682A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage, and in particular to an access method, system and storage medium. Background Technology
[0002] A database system consists of a computation layer and a storage layer. The storage layer stores data, while the computation layer accesses the storage layer. For example, the computation layer can write data to or read data from the storage layer.
[0003] In related technologies, the computing layer is configured with tenants. The computing layer needs to send tenant information to the storage layer. The storage layer receives the tenant information and schedules the tenant's input / output (IO) requests based on the tenant information. Based on the scheduled IO requests, data is written or read.
[0004] In related technologies, there is a strong dependency between the computing layer and the storage layer, which reduces the versatility of the computing layer. Summary of the Invention
[0005] This application provides an access method, system, and storage medium to improve the versatility of computing nodes. The technical solution is as follows:
[0006] Firstly, this application provides an access method applied to a database system, which includes compute nodes, storage nodes, and storage media. In the method, a compute node receives a first access request from a first tenant, the first access request corresponding to m first input / output (IO) requests, where m is an integer greater than or equal to 1. The compute node initiates m first IO requests to the storage node based on the first tenant's actual IOPS (Input / Output Operations Per Second), where the number of first IO requests initiated per second is less than or equal to the first tenant's actual IOPS. The m first IO requests are used to request the storage node to perform m IO operations, and these m IO operations are used to access the storage media. The storage node responds to the m first IO requests and returns a first response result to the compute node. Based on the first response result, the compute node returns the access result of the first access request to the first tenant.
[0007] Since the compute node initiates m first IO requests to the storage node based on the first tenant's actual IOPS, and schedules the first user's m first IO requests, the scheduling work is moved up to the compute node. In this way, the compute node does not need to send the information required for scheduling to the storage node, making the database system framework more scalable and universal, and unaffected by the database system architecture. The compute node can be decoupled from the storage node, and the compute node can adapt to different storage nodes, improving the versatility of the compute node.
[0008] In one possible implementation, the compute node receives a second access request from a second tenant. This second access request corresponds to n second I / O requests, where n is an integer greater than or equal to 1. The compute node initiates these n second I / O requests to the storage node based on the second tenant's actual IOPS. The number of second I / O requests initiated per second is less than or equal to the second tenant's actual IOPS. These n second I / O requests are used to request the storage node to perform n I / O operations, which are used to access the storage medium. The storage node responds to these n second I / O requests and returns a second response result to the compute node. Based on the second response result, the compute node returns the access result of the second access request to the second tenant. In this way, by initiating respective I / O requests to the storage node based on the first and second tenants' actual IOPS, I / O isolation for multiple tenants is achieved based on their actual IOPS.
[0009] In another possible implementation, the compute node obtains the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium. This way, based on the IOPS configuration parameters of each tenant and the maximum IOPS of the storage medium, the actual IOPS of each tenant can be accurately obtained.
[0010] In another possible implementation, the compute node includes test access requests, which it repeatedly initiates to the storage node within a target time period. The compute node determines the maximum IOPS of the storage medium based on the length of the target time period and the number of times the test access requests are initiated within that period. This allows for adaptive determination of the maximum IOPS of the storage medium.
[0011] In another possible implementation, multiple access requests are multiple Structured Query Language (SQL) statements.
[0012] Secondly, this application provides a database system for performing the methods in the first aspect or any possible implementation thereof. Specifically, the system includes nodes for performing the methods in the first aspect or any possible implementation thereof.
[0013] Thirdly, this application provides a computing device cluster, the computing device cluster including at least one computing device, each computing device including a processor and a memory;
[0014] The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method of the first aspect or any possible implementation thereof.
[0015] Fourthly, this application provides a computer program product containing instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method of the first aspect or any possible implementation thereof.
[0016] Fifthly, this application provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, perform the method of the first aspect or any possible implementation thereof.
[0017] In a sixth aspect, this application provides a chip including a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to perform the method in the first aspect or any possible implementation thereof. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the structure of a database system provided in an embodiment of this application;
[0019] Figure 2 This is a flowchart of an access method provided in an embodiment of this application;
[0020] Figure 3 This is a flowchart of another access method provided in an embodiment of this application;
[0021] Figure 4 This is a flowchart of another access method provided in an embodiment of this application;
[0022] Figure 5 This is a flowchart of another access method provided in an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of another database system structure provided in an embodiment of this application;
[0024] Figure 7 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0025] Figure 8 This is a schematic diagram of a computing device cluster structure provided in an embodiment of this application;
[0026] Figure 9 This is a schematic diagram of another computing device cluster structure provided in an embodiment of this application. Detailed Implementation
[0027] Kernel-level multi-tenancy in database systems has become a highlight feature in many products due to its advantages such as low operation and maintenance costs, high resource utilization, rapid elastic scaling of tenant resources, support for smaller sizes, and low usage costs. Resource isolation in kernel-level multi-tenancy generally includes central processing unit (CPU) isolation, memory isolation, and input / output (I / O) isolation. Optionally, I / O isolation may include network I / O isolation and / or disk I / O isolation.
[0028] Kernel-level multi-tenancy refers to the creation of multiple tenants in a database system, which can share the database system's resources while achieving data isolation and / or resource isolation between the tenants.
[0029] A database system includes compute nodes, storage nodes, and storage media. Storage nodes include an I / O scheduling algorithm, which is used to schedule I / O requests for accessing the storage media to achieve I / O isolation. Optionally, in implementation:
[0030] The compute nodes of the database system send the tenant information and the correspondence between the tenant's input / output operations per second (IOPS) configuration parameter to the storage nodes in advance. The storage nodes of the database system receive and save the correspondence between the tenant information and the tenant's IOPS configuration parameter.
[0031] The compute nodes of the database system can receive multiple access requests, which are access requests from multiple tenants. Based on each tenant's access request, at least one IO request for each tenant is obtained. Multiple IO requests, along with information about the multiple tenants, are sent to the storage node. These multiple IO requests include at least one IO request from each tenant, and each IO request corresponds one-to-one with multiple IO operations used to access the storage medium.
[0032] The storage nodes of a database system include the mapping between tenant information and tenant IOPS configuration parameters. The storage nodes of the database system schedule pending IO requests using an IO scheduling algorithm. Optionally, in implementation:
[0033] The storage nodes of the database system receive multiple IO requests and information about multiple tenants. Based on the tenant information, the IOPS configuration information for each tenant is obtained from the correspondence between the tenant information and the tenant's IOPS configuration parameters. The actual IOPS for each tenant is then calculated based on this configuration information. Based on these actual IOPS, IO requests are scheduled for execution from among the multiple IO requests. IO operations are then performed based on these requests, either writing data to or reading data from the storage medium. This process isolates the IO available to each tenant based on their actual IOPS.
[0034] When scheduling storage nodes, compute nodes need to send information about multiple tenants and configure the correspondence between tenant information and tenant IOPS configuration parameters on storage nodes. Therefore, there is a dependency between compute nodes and storage nodes, which makes it impossible to decouple compute nodes from storage nodes. Compute nodes cannot adapt to different storage nodes, reducing the versatility of compute nodes.
[0035] To decouple compute nodes from storage nodes and improve the versatility of compute nodes, scheduling functions are moved from storage nodes to compute nodes. This way, compute nodes only need to send IO requests to storage nodes, which then execute the corresponding IO operations. This eliminates the need for compute nodes to send tenant information and the mapping between tenant information and IOPS configuration parameters to storage nodes, thus decoupling compute nodes from storage nodes and improving their versatility.
[0036] See Figure 1 This application provides a database system 100, which includes a computing node 101, a storage node 102, and a storage medium 103.
[0037] Compute node 101 is located in the compute layer, storage node 102 and storage medium 103 are located in the storage layer. Compute node 101 is configured with at least one tenant. Compute node 101 includes a correspondence between tenant information and IOPS configuration parameters. This correspondence is used to store the information and IOPS configuration parameters of each tenant configured on compute node 101.
[0038] Compute node 101 and storage node 102 communicate with each other, and storage node 102 can read and write storage medium 103.
[0039] In some embodiments, compute node 101 and storage node 102 may be integrated together, meaning that database system 100 is a compute-in-memory system. Alternatively, compute node 101 may communicate remotely with storage node 102 via a network, meaning that database system 100 is a compute-in-memory system.
[0040] Compute node 101 can receive access requests from tenants, which include the tenant's information and correspond to at least one IO request for accessing storage medium 103. Based on the tenant's information and the correspondence between the tenant's information and IOPS configuration parameters, the actual IOPS of the tenant are obtained. Based on the tenant's actual IOPS, the at least one IO request is initiated to storage node 102, with the number of IO requests initiated to storage node 102 per second being less than or equal to the tenant's actual IOPS. Storage node 102 receives the at least one IO request and performs at least one IO operation based on the at least one IO request to access storage medium 103. Then, it responds to the at least one IO request and returns a response result to compute node 101. Based on the response result, compute node 101 returns the access result of the access request to the tenant.
[0041] Optionally, the compute node 101 includes an IO scheduling algorithm that initiates at least one IO request to the storage node 102 based on the tenant's actual IOPS.
[0042] Optionally, the IO scheduling algorithm may include one or more of the following: mClock algorithm, token pass algorithm, or stochastic fair queuing (SFQ) algorithm, etc. The mClock algorithm is a control mechanism algorithm used to schedule IO requests.
[0043] Optionally, the access request can be multiple Structured Query Language (SQL) statements.
[0044] Since compute node 101 obtains the tenant's actual IOPS, it initiates at least one IO request for the tenant to storage node 102 based on the tenant's actual IOPS using an IO scheduling algorithm. The number of IO requests initiated to storage node 102 per second is less than or equal to the tenant's actual IOPS, thus achieving IO isolation based on the tenant's actual IOPS. Storage node 102 receives the at least one IO request and executes at least one IO operation corresponding to the at least one IO request. This eliminates the need for storage node 102 to schedule IO requests from different tenants. Without scheduling, storage node 102 does not need to rely on the tenant information sent by compute node 101 and the correspondence between the tenant information and IOPS configuration parameters, thus decoupling compute node 101 and storage node 102. Compute node 101 can adapt to different storage nodes 102, improving the versatility of compute node 101.
[0045] See Figure 2This application provides an access method 200, which is applied to... Figure 1 The database system 100 shown includes a computing node 101, a storage node 102, and a storage medium 103. The computing node 101 is configured with at least one tenant. The method 200 includes the following process.
[0046] Step 201: The compute node receives the first access request from the first tenant. The first access request corresponds to m first IO requests, where m is an integer greater than or equal to 1.
[0047] The at least one tenant includes a first tenant, the first access request includes information about the first tenant, and the first access request is used to access the storage medium.
[0048] Optionally, the information of the first tenant includes the identification information of the first tenant.
[0049] Optionally, the compute node may receive multiple access requests, which are access requests sent by w tenants among the at least one tenant, where w is an integer greater than or equal to 1. For example, the at least one tenant may also include a second tenant, and the compute node receives a second access request from the second tenant. That is, the w tenants include the first tenant and the second tenant, and the second access request corresponds to n second IO requests, where n is an integer greater than or equal to 1.
[0050] In some embodiments, the amount of data to be accessed in each of the plurality of access requests may be the same or different. For each access request, the access request may be a read request, which includes the amount of data to be read, and this amount of data is the amount of data to be accessed in the access request. Alternatively, the access request may be a write request, which includes the data to be written, and the amount of data to be accessed in the write request is the amount of data to be written.
[0051] In some embodiments, the compute node can also obtain at least one IO request corresponding to each access request based on the amount of data to be accessed and the target data amount for each of the w tenants, where the target data amount is the amount of data that the storage node can access by performing one IO operation. For each of the w tenants, the set of IO requests for that tenant includes at least one IO request corresponding to each access request of that tenant.
[0052] For example, for a first access request, the compute node obtains m first IO requests corresponding to the first access request based on the amount of data to be accessed and the target amount of data in the first access request. The IO request set of the first tenant includes these m first IO requests. Based on the amount of data to be accessed and the target amount of data in the second access request, n second IO requests corresponding to the second access request are obtained. The IO request set of the second tenant includes these n second IO requests.
[0053] For example, see Figure 3 Assuming the target data volume is 8kb, the computing node receives access request 1 from tenant 1, access request 2 from tenant 2, and access request 3 from tenant 3. The data volume to be accessed in access request 1 is 24kb, the data volume to be accessed in access request 2 is 32kb, and the data volume to be accessed in access request 3 is 64kb. The w tenants include tenant 1, tenant 2, and tenant 3.
[0054] Based on the 24kb data volume to be accessed and the target data volume of 8kb in access request 1, the compute node obtains 3 IO requests 1 for tenant 1, and the IO request set 1 for tenant 1 includes these 3 IO requests 1. Based on the 32kb data volume to be accessed and the target data volume of 8kb in access request 2, the compute node obtains 4 IO requests 2 for tenant 2, and the IO request set 2 for tenant 2 includes these 4 IO requests 2. Based on the 64kb data volume to be accessed and the target data volume of 8kb in access request 3, the compute node obtains 8 IO requests 3 for tenant 1, and the IO request set 3 for tenant 3 includes these 8 IO requests 3.
[0055] Step 202: The compute node initiates m first IO requests to the storage node based on the first tenant's actual IOPS. The number of first IO requests initiated per second is less than or equal to the first tenant's actual IOPS.
[0056] Among them, m first IO requests are used to request the storage node to perform m IO operations, and m IO operations are used to access the storage medium.
[0057] For the w tenants, excluding the first tenant, the compute node can initiate IO requests corresponding to the access requests of other tenants to the storage node based on the actual IOPS of the other tenants.
[0058] For example, the w tenants also include a second tenant. The compute node initiates n second IO requests to the storage node based on the second tenant's actual IOPS. The number of second IO requests initiated per second is less than or equal to the second tenant's actual IOPS.
[0059] For the actual IOPS of the first tenant and the actual IOPS of the second tenant, the compute node obtains the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium.
[0060] In some embodiments, in step 201, the compute node obtains the IO request set for each of the w tenants. Then, in step 202, the compute node obtains the actual IOPS for each tenant based on the tenant's information and the storage medium's maximum IOPS. Based on each tenant's actual IOPS, within the current one-second time period, at least one IO request for each tenant is scheduled from the IO request set for each tenant, where the total number of at least one IO request for each tenant is less than or equal to the actual IOPS for each tenant. Within the current one-second time period, at least one IO request for each tenant is initiated to the storage node, and within the current one-second time period, the total number of at least one IO request initiated for each tenant is less than or equal to the storage medium's maximum IOPS.
[0061] Optionally, in implementation, the compute node schedules at least one IO request for each tenant through the operations described in 2021 to 2023.
[0062] 2021: The compute node obtains the IOPS configuration parameters for each of the w tenants based on the information of each tenant.
[0063] The compute nodes store the mapping between tenant information and IOPS configuration parameters. Optionally, the tenant's IOPS configuration parameters include one or more of the following: minimum IOPS, maximum IOPS, or IOPS ratio, etc.
[0064] In 2021, compute nodes obtain the IOPS configuration parameters for each tenant based on the information of each tenant, from the correspondence between the tenant information and the IOPS configuration parameters.
[0065] 2022: The compute node obtains the actual IOPS of each tenant based on the IOPS configuration parameters of each tenant and the maximum IOPS of the storage medium.
[0066] In 2022, compute nodes obtain the actual IOPS of each tenant based on the IOPS ratio of each tenant and the maximum IOPS of the storage medium. The actual IOPS of each tenant is greater than or equal to the minimum IOPS of each tenant and less than or equal to the maximum IOPS of each tenant.
[0067] For example, suppose a computing node receives three access requests from three tenants, namely tenant 1, tenant 2 and tenant 3. The three access requests are access request 1 from tenant 1, access request 2 from tenant 2 and access request 3 from tenant 3. Access request 1 includes information about tenant 1, access request 2 includes information about tenant 2 and access request 3 includes information about tenant 3.
[0068] The compute nodes store the correspondence between tenant information and IOPS configuration parameters as shown in Table 1 below.
[0069] Table 1
[0070]
[0071] Assume the maximum IOPS of the storage medium is 10, meaning the storage node performs no more than 10 IO operations on the storage medium per second. Based on the tenant 1 information included in access request 1, the tenant 2 information included in access request 2, and the tenant 3 information included in access request 3, the compute node obtains the IOPS configuration parameter 1 for tenant 1, the IOPS configuration parameter 2 for tenant 2, and the IOPS configuration parameter 3 for tenant 3 from the correspondence between tenant information and IOPS configuration parameters shown in Table 1.
[0072] Based on the IOPS ratio of tenant 1 (included in IOPS configuration parameter 1), the IOPS ratio of tenant 2 (included in IOPS configuration parameter 2), the IOPS ratio of tenant 2 (included in IOPS configuration parameter 3), and the maximum IOPS of the storage medium, the compute node obtains the actual IOPS of tenant 1 as 2, the actual IOPS of tenant 2 as 3, and the actual IOPS of tenant 3 as 5.
[0073] Specifically, for a tenant's actual IOPS, if the tenant's actual IOPS is less than the tenant's minimum IOPS or greater than the tenant's maximum IOPS, the compute node can adjust the actual IOPS of at least one other tenant so that the actual IOPS of each of the w tenants is greater than or equal to the minimum IOPS of that tenant and less than or equal to the maximum IOPS of that tenant, respectively.
[0074] For ease of explanation, this tenant will be referred to as tenant A. The actual IOPS of tenant A is less than the minimum IOPS of tenant A or greater than the maximum IOPS of tenant A.
[0075] If tenant A's actual IOPS is less than tenant A's minimum IOPS, the compute node can increase tenant A's actual IOPS so that the increased actual IOPS is greater than or equal to tenant A's minimum IOPS. Optionally, it can also decrease the actual IOPS of one or more tenants B, where the w tenants include one or more tenants B in addition to tenant A.
[0076] Optionally, for each of the w tenants other than tenant A, the compute node calculates the first IOPS difference between each of the other tenants based on their actual IOPS and minimum IOPS. It then selects one or more tenants B with the largest first IOPS difference. This means that the actual IOPS of the selected tenant B may be significantly greater than its minimum IOPS. The actual IOPS of tenant A is increased, and the actual IOPS of one or more tenants B are decreased, ensuring that the decreased actual IOPS of tenant B is still greater than or equal to its minimum IOPS, thus reducing the number of tenants B that need adjustment.
[0077] If tenant A's actual IOPS is greater than tenant A's maximum IOPS, the compute node can reduce tenant A's actual IOPS so that the reduced actual IOPS is less than or equal to tenant A's maximum IOPS. Optionally, the actual IOPS of one or more tenants B can be increased, where the w tenants include one or more tenants B in addition to tenant A.
[0078] Optionally, for each of the w tenants other than tenant A, the compute node calculates a second IOPS difference for each of the other tenants based on their maximum IOPS and actual IOPS. It then selects one or more tenants B with the largest second IOPS difference, meaning that the actual IOPS of the selected tenant B is significantly less than its maximum IOPS. The actual IOPS of tenant A is reduced, and the actual IOPS of one or more tenants B are increased, ensuring that the increased actual IOPS of tenant B is still less than or equal to its maximum IOPS, thus reducing the number of tenants B that need adjustment.
[0079] 2023: Based on the actual IOPS of each tenant, the compute node schedules at least one IO request from the IO request set of each tenant within the current one-second time period and sends at least one IO request of each tenant to the storage node.
[0080] Wherein, the total number of at least one IO request for each tenant is less than or equal to the maximum IOPS of the storage medium. In the next second, the compute node still schedules at least one IO request for each tenant from the remaining IO requests in the IO request set of each tenant based on the actual IOPS of each tenant, and initiates at least one IO request for each tenant to the storage node.
[0081] For example, tenant 1's actual IOPS is 2, tenant 2's actual IOPS is 3, and tenant 3's actual IOPS is 5. Tenant 1's IO request set 1 includes the 3 IO requests 1, tenant 2's IO request set 2 includes the 4 IO requests 2, and tenant 3's IO request set 3 includes the 8 IO requests 3.
[0082] See Figure 3 Within the first second, the compute node, based on tenant 1's actual IOPS "2", schedules two IO requests 1 from tenant 1's IO request set 1 and sends them to the storage node; based on tenant 2's actual IOPS "3", it schedules three IO requests 2 from tenant 2's IO request set 2 and sends them to the storage node; based on tenant 3's actual IOPS "5", it schedules five IO requests 3 from tenant 3's IO request set 3 and sends them to the storage node. At this point, tenant 1's IO request set 1 has one IO request 1 remaining, tenant 2's IO request set 2 has one IO request 2 remaining, and tenant 3's IO request set 3 has three IO requests 3 remaining.
[0083] See Figure 4 During the second second, the compute node schedules one IO request 1 from the remaining IO request 1 in tenant 1's IO request set 1 based on tenant 1's actual IOPS "2" and sends one IO request 1 to the storage node; based on tenant 2's actual IOPS "3", it schedules one IO request 2 from the remaining IO request 2 in tenant 2's IO request set 2 and sends one IO request 2 to the storage node; based on tenant 3's actual IOPS "5", it schedules three IO requests 3 from the remaining IO requests 3 in tenant 3's IO request set 3 and sends three IO requests 3 to the storage node.
[0084] Step 203: The storage node responds to the m first IO requests and returns the first response result to the compute node.
[0085] In step 203, the storage node also responds to n second IO requests and returns a second response result to the compute node.
[0086] Optionally, if the first access request is a write request, the first response result is "write successful"; if the first access request is a read request, the first response result is "data read". If the second access request is a write request, the second response result is "write successful"; if the second access request is a read request, the second response result is "data read".
[0087] In some embodiments, within the current one-second time period, the storage node receives at least one IO request from each tenant initiated by the compute node, where the total number of at least one IO requests from each tenant is less than or equal to the maximum IOPS of the storage medium. The storage node accesses the storage medium based on each tenant's at least one IO request to respond to that request.
[0088] For example, within the first second, the storage node receives two IO requests (1) from tenant 1, three IO requests (2) from tenant 2, and five IO requests (3) from tenant 3. The storage node accesses the storage medium based on the two IO requests (1) from tenant 1, the three IO requests (2) from tenant 2, and the five IO requests (3) from tenant 3.
[0089] Within the second second, the storage node receives one IO request 1 from tenant 1, one IO request 2 from tenant 2, and three IO requests 3 from tenant 3. The storage node accesses the storage medium based on the IO request 1 from tenant 1, the IO request 2 from tenant 2, and the three IO requests 3 from tenant 3.
[0090] The storage node sends response result 1 for tenant 1, response result 2 for tenant 2, and response result 3 for tenant 3 to the compute node. Response result 1 is the result obtained by the storage node using three IO requests 1 to access the storage medium, response result 2 is the result obtained by the storage node using four IO requests 2 to access the storage medium, and response result 3 is the result obtained by the storage node using eight IO requests 3 to access the storage medium.
[0091] In this system, one IO request corresponds to one IO operation. The total number of IO requests initiated by the compute node to the storage node within a given time period (per second) is less than or equal to the maximum IOPS of the storage medium. The storage node executes each received IO request within the same time period (per second), meaning the total number of IO operations executed within that time period is less than or equal to the maximum IOPS of the storage medium. Therefore, the storage node executes the standard process of accessing the storage medium without relying on the tenant information of the compute node, thus achieving decoupling between the compute node and the storage node.
[0092] Step 204: Based on the first response result, the compute node returns the access result of the first access request to the first tenant.
[0093] In step 204, the compute node also returns the access result of the second access request to the second tenant based on the second response result.
[0094] Optionally, if the first response result is "write successful", the access result of the first access request is "write successful"; if the first response result is "read data", the access result of the first access request is "read data". If the second response result is "write successful", the access result of the second access request is "write successful"; if the second response result is "read data", the access result of the second access request is "read data".
[0095] In some embodiments, the target data volume may be a default data volume. Before accessing the storage node, the compute node configures the amount of data that the storage node can access in a single I / O operation based on the default data volume. Alternatively, the compute node may receive a configuration request that includes the target data volume; and configure the amount of data that the storage node can access in a single I / O operation based on the target data volume.
[0096] The target data volume included in the configuration request can be set by the administrator. The node corresponding to the administrator can obtain the target data volume set by the administrator and send a configuration request to the compute node, which includes the target data volume.
[0097] In some embodiments, for the maximum IOPS of the storage medium, the compute node includes a test access request, the amount of data to be accessed in the test access request being known. The test access request may be user-configured or it may be a standard access request pre-configured in the compute node.
[0098] The compute node measures the maximum IOPS of the storage medium by testing access requests. See also Figure 5 The detailed measurement process is as follows:
[0099] 301: The compute node repeatedly sends test access requests to the storage node within the target time period.
[0100] The target time period is a specified time interval. Within the target time period, the compute node initiates z I / O requests corresponding to test access requests to the storage node, where z is an integer greater than or equal to 1. The initial value of the number of loops for initiating test access requests within the target time period is 1. The storage node receives these z I / O requests, accesses the storage medium based on these z I / O requests, and responds to these z I / O requests by sending the response results back to the compute node.
[0101] The compute node receives the response and initiates z I / O requests corresponding to the test access request to the storage node, incrementing the loop count by 1 to obtain a loop count of 2. The storage node receives the z I / O requests, accesses the storage medium based on these z I / O requests, and responds to the z I / O requests by sending the response results back to the compute node.
[0102] The compute node receives the response and initiates z I / O requests corresponding to the test access request to the storage node, incrementing the loop count by 1 to obtain a loop count of 3. The storage node receives these z I / O requests, accesses the storage medium based on these z I / O requests, and responds to these z I / O requests by sending the response results back to the compute node.
[0103] Repeat the above process until the target time period ends, then perform step 302.
[0104] In some embodiments, the target data volume is the default data volume. When the storage node is configured based on the default data volume, the maximum IOPS of the storage medium can be tested.
[0105] In some embodiments, after receiving a configuration request that includes a target data volume, the compute node can test the maximum IOPS of the storage medium if it configures the storage node to access the amount of data it can access in one IO operation based on the target data volume.
[0106] 302: The compute node obtains the maximum IOPS of the storage medium based on the length of the target time period and the number of loops initiating test access requests within the target time period.
[0107] In step 302, the compute node obtains the loop count x at the end of the target time period, where x is an integer greater than or equal to 1. Based on x and z, the total number of I / O operations performed by the storage node within the target time period is x*z. Based on the length of the target time period and the total number of I / O operations x*z, the maximum IOPS of the storage medium is obtained.
[0108] In this embodiment, the compute node receives multiple access requests and obtains the IOPS configuration parameters for each tenant based on the information of each tenant. The actual IOPS for each tenant is obtained based on the IOPS configuration parameters and the maximum IOPS of the storage medium. Based on the actual IOPS of each tenant, at least one IO request from each tenant is scheduled from the IO request set of each tenant within the current one-second time period. The number of at least one IO request from each tenant is less than or equal to the actual IOPS of each tenant. At least one IO request from each tenant is then sent to the storage node, thus achieving IO isolation based on the actual IOPS of each tenant. Since the scheduling work is shifted to the compute node, based on the actual IOPS of each tenant, at least one IO request from each tenant's IO request set is scheduled from the current one-second time period. This eliminates the need for the compute node to send scheduling information to the storage node, such as tenant information and the correspondence between tenant information and IOPS configuration parameters. The total number of at least one IO request from each tenant scheduled by the compute node in the current one-second time period is less than or equal to the maximum IOPS of the storage medium. Thus, the storage node only needs to execute at least one IO request from each tenant initiated by the compute node, decoupling the compute node from the storage node. The compute node can adapt to different storage nodes, improving the versatility of the compute node.
[0109] See Figure 6 This application provides a database system 600, which can be used for... Figure 1 The database system 100 shown is or Figure 2 The database system in method 200 shown includes a computing node 601, a storage node 602, and a storage medium 603.
[0110] Compute node 601 is used to receive the first access request from the first tenant. The first access request corresponds to m first input / output (IO) requests, where m is an integer greater than or equal to 1.
[0111] The compute node 601 is also used to initiate m first IO requests to the storage node 602 based on the actual number of input / output operations per second (IOPS) of the first tenant. The number of first IO requests initiated per second is less than or equal to the actual IOPS of the first tenant. The m first IO requests are used to request the storage node 602 to perform m IO operations. The m IO operations are used to access the storage medium 603.
[0112] Storage node 602 is used to respond to m first IO requests and return the first response result to compute node 601;
[0113] Compute node 601 is also used to return the access result of the first access request to the first tenant based on the first response result.
[0114] Optionally, for details on how compute node 601 receives the first access request from the first tenant, please refer to [link to relevant documentation]. Figure 2 The details of step 201 of method 200 shown will not be explained in detail here.
[0115] Optionally, for details on how compute node 601 initiates m first IO requests to storage node 602 based on the first tenant's actual IOPS, see [link to relevant documentation]. Figure 2 The details of step 202 of method 200 shown will not be explained in detail here.
[0116] Optionally, for details on how storage node 602 responds to m first IO requests and returns the first response result to compute node 601, please refer to [link to implementation details]. Figure 2 The details of step 203 of method 200 shown will not be explained in detail here.
[0117] Optionally, the detailed implementation process of compute node 601 returning the access result of the first access request to the first tenant based on the first response result can be found in [link to relevant documentation]. Figure 2 The details of step 204 of method 200 shown will not be explained in detail here.
[0118] Optionally, compute node 601 is also configured to receive a second access request from a second tenant, the second access request corresponding to n second IO requests, where n is an integer greater than or equal to 1;
[0119] The compute node 601 is also used to initiate n second IO requests to the storage node 602 based on the actual IOPS of the second tenant. The number of second IO requests initiated per second is less than or equal to the actual IOPS of the second tenant. The n second IO requests are used to request the storage node 602 to perform n IO operations. The n IO operations are used to access the storage medium 603.
[0120] Storage node 602 is also used to respond to n second IO requests and return the second response result to compute node 601;
[0121] Compute node 601 is also used to return the access result of the second access request to the second tenant based on the second response result.
[0122] Optionally, for details on how compute node 601 receives the second access request from the second tenant, please refer to [link to relevant documentation]. Figure 2 The details of step 201 of method 200 shown will not be explained in detail here.
[0123] Optionally, for details on how compute node 601 initiates n second IO requests to storage node 602 based on the second tenant's actual IOPS, please refer to [link to relevant documentation]. Figure 2 The details of step 202 of method 200 shown will not be explained in detail here.
[0124] Optionally, for details on how storage node 602 responds to n second IO requests and returns the second response results to compute node 601, please refer to [link to relevant documentation]. Figure 2 The details of step 203 of method 200 shown will not be explained in detail here.
[0125] Optionally, the compute node 601 returns the access result of the second access request to the second tenant based on the second response result. For details on this process, please refer to [link to relevant documentation]. Figure 2 The details of step 204 of method 200 shown will not be explained in detail here.
[0126] Optionally, compute node 601 is also configured to obtain the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium.
[0127] Optionally, compute node 601 obtains the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium. For a detailed implementation process, see [link to relevant documentation]. Figure 2 The details of step 202 of method 200 shown will not be explained in detail here.
[0128] Optionally, the computing node 601 includes a test access request;
[0129] Compute node 601 is also used to cyclically send test access requests to storage node 602 within the target time period;
[0130] The compute node 601 is also used to obtain the maximum IOPS of the storage medium 603 based on the length of the target time period and the number of loops initiating test access requests within the target time period.
[0131] Optionally, for details on how compute node 601 cyclically sends test access requests to storage node 602 within the target time period, please refer to [link to relevant documentation]. Figure 2 The details of step 204 of method 200 shown will not be explained in detail here.
[0132] Optionally, the compute node 601 obtains the maximum IOPS of the storage medium 603 based on the length of the target time period and the number of loops initiating test access requests within the target time period. For detailed implementation details, please refer to [link to relevant documentation]. Figure 2 The details of step 204 of method 200 shown will not be explained in detail here.
[0133] Optionally, multiple access requests can be multiple Structured Query Language (SQL) statements.
[0134] Both compute node 601 and storage node 602 can be implemented in software or in hardware. For example, the implementation of storage node 602 will be described below using compute node 601 as an example. Similarly, the implementation of storage node 602 can be referenced from the implementation of compute node 601.
[0135] As an example of a software functional unit, a compute node 601 may include code running on a compute instance. A compute instance may include at least one of a physical host (compute device), a virtual machine, or a container. Further, the compute instance may be one or more. For example, compute node 601 may include code running on multiple hosts / virtual machines / containers. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0136] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0137] As an example of a hardware functional unit, computing node 601 may include at least one computing device, such as a server. Alternatively, computing node 601 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The aforementioned PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0138] The computing nodes 601 include multiple computing devices that can be distributed within the same region or in different regions. Similarly, the computing devices in the computing nodes 601 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the computing devices in the computing nodes 601 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0139] It should be noted that, in other embodiments, the compute node 601 and the storage node 602 can be used to execute any step in the access method. The steps implemented by the compute node 601 and the storage node 602 can be specified as needed, and the database system 600 can achieve all its functions by implementing different steps in the access method through the compute node 601 and the storage node 602 respectively.
[0140] In this embodiment, the compute node receives a first access request and, based on the actual IOPS of the first tenant, initiates m first IO requests to the storage node, thereby shifting the scheduling work to the compute node. In this way, the compute node does not need to send the information required for scheduling to the storage node, enabling the compute node to adapt to different storage nodes and improving the versatility of the compute node.
[0141] See Figure 7 This application provides a computing device 700. For example, the computing device 700 can be a device within a database system. The database system can be... Figure 1 The database system 100 shown may be... Figure 2 The database system in method 200 shown.
[0142] like Figure 7 As shown, the computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.
[0143] The 702 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the computing device 700 (e.g., processor 704, memory 706, communication interface 708).
[0144] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0145] Memory 706 may include volatile memory, such as random access memory (RAM). Memory 706 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0146] See Figure 7 The memory 706 stores executable program code, and the processor 704 executes the executable program code to implement the following respectively. Figure 6The database system 600 shown illustrates the functions of computing nodes 601 and storage nodes 602, thereby implementing the methods provided in any of the above embodiments. That is, the memory 706 stores instructions for executing the methods provided in any of the above embodiments. Alternatively,
[0147] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.
[0148] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0149] like Figure 8 As shown, the computing device cluster includes at least one computing device 700. The memory 606 of one or more computing devices 700 in the computing device cluster may store the same instructions for executing the access methods provided in any of the above embodiments.
[0150] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the access method described above. In other words, a combination of one or more computing devices 700 can jointly execute instructions for performing the method provided in any of the above embodiments.
[0151] The memory 706 in different computing devices 700 within a computing device cluster can store different instructions, each used for execution such as... Figure 6 The database system 600 shown contains some of its functionalities. Specifically, the instructions stored in the memory 706 of different computing devices 700 can implement the functions of one or more units in computing node 601 and storage node 602.
[0152] In some possible implementations, one or more computing devices in the computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 One possible implementation is shown. For example... Figure 9 As shown, the two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device.
[0153] In this type of possible implementation, the memory 706 in the computing device 700A stores the execution of, for example... Figure 6The instructions for the computing node 601 in the illustrated embodiment are shown. Meanwhile, the memory 706 in the computing device 700B stores instructions for executing such instructions. Figure 6 Instructions for the function of storage node 602 in the illustrated embodiment.
[0154] Figure 9 The connection method between the computing device clusters shown may be based on the access method provided in this application (e.g., storing large amounts of data and / or sending and receiving data), therefore, the functions implemented by the storage node 602 are considered to be performed by the computing device 700B.
[0155] It should be understood that Figure 9 The functions of the computing device 700A shown can also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be performed by multiple computing devices 700.
[0156] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... Figure 9 The connection method of the computing device cluster. The difference is that the memory 706 of one or more computing devices 700 in the computing device cluster can store the same instructions for executing the access method provided in any of the above embodiments.
[0157] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the methods provided in any of the above embodiments. In other words, a combination of one or more computing devices 700 can jointly execute instructions for performing the methods provided in any of the above embodiments.
[0158] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform the methods provided in any of the above embodiments.
[0159] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform the method provided in any of the above embodiments.
[0160] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0161] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. An access method, characterized in that, The method is applied to a database system, which includes computing nodes, storage nodes, and storage media. The method includes: The computing node receives a first access request from a first tenant, and the first access request corresponds to m first input / output (I / O) requests, where m is an integer greater than or equal to 1. The compute node initiates m first IO requests to the storage node based on the actual number of input / output operations per second (IOPS) of the first tenant. The number of first IO requests initiated per second is less than or equal to the actual IOPS of the first tenant. The m first IO requests are used to request the storage node to perform m IO operations, and the m IO operations are used to access the storage medium. The storage node responds to the m first IO requests and returns a first response result to the computing node; Based on the first response result, the computing node returns the access result of the first access request to the first tenant.
2. The method as described in claim 1, characterized in that, The method further includes: The computing node receives a second access request from a second tenant, and the second access request corresponds to n second I / O requests, where n is an integer greater than or equal to 1; The compute node initiates the n second IO requests to the storage node based on the actual IOPS of the second tenant. The number of second IO requests initiated per second is less than or equal to the actual IOPS of the second tenant. The n second IO requests are used to request the storage node to perform n IO operations, and the n IO operations are used to access the storage medium. The storage node responds to the n second IO requests and returns a second response result to the computing node; Based on the second response result, the computing node returns the access result of the second access request to the second tenant.
3. The method as described in claim 2, characterized in that, The method further includes: The compute node obtains the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium.
4. The method as described in claim 3, characterized in that, The computing node includes a test access request, and the method further includes: The computing node cyclically sends the test access request to the storage node within the target time period; The computing node obtains the maximum IOPS of the storage medium based on the length of the target time period and the number of loops initiating the test access request within the target time period.
5. The method according to any one of claims 1-4, characterized in that, The first access request is a Structured Query Language (SQL) statement.
6. A database system, characterized in that, The database system includes computing nodes, storage nodes, and storage media; The computing node is used to receive the first access request from the first tenant, and the first access request corresponds to m first input / output (IO) requests, where m is an integer greater than or equal to 1. The computing node is also configured to initiate m first IO requests to the storage node based on the actual number of input / output operations per second (IOPS) of the first tenant. The number of first IO requests initiated per second is less than or equal to the actual IOPS of the first tenant. The m first IO requests are used to request the storage node to perform m IO operations, and the m IO operations are used to access the storage medium. The storage node is used to respond to the m first IO requests and return a first response result to the computing node; The computing node is also configured to return the access result of the first access request to the first tenant based on the first response result.
7. The database system as described in claim 6, characterized in that, The computing node is also used to receive a second access request from a second tenant, the second access request corresponding to n second IO requests, where n is an integer greater than or equal to 1; The computing node is also configured to initiate the n second IO requests to the storage node based on the actual IOPS of the second tenant. The number of second IO requests initiated per second is less than or equal to the actual IOPS of the second tenant. The n second IO requests are used to request the storage node to perform n IO operations, and the n IO operations are used to access the storage medium. The storage node is also used to respond to the n second IO requests and return a second response result to the computing node; The computing node is also configured to return the access result of the second access request to the second tenant based on the second response result.
8. The database system as described in claim 7, characterized in that, The computing node is also configured to obtain the actual IOPS of the first tenant and the actual IOPS of the second tenant based on the IOPS configuration parameters of the first tenant, the IOPS configuration parameters of the second tenant, and the maximum IOPS of the storage medium.
9. The database system as described in claim 8, characterized in that, The computing node includes a test access request; The computing node is also used to cyclically send the test access request to the storage node within the target time period; The computing node is also used to obtain the maximum IOPS of the storage medium based on the length of the target time period and the number of loops initiating the test access request within the target time period.
10. The database system according to any one of claims 6-9, characterized in that, The first access request is a Structured Query Language (SQL) statement.
11. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1-5.
13. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster performs the method as described in any one of claims 1-5.