Request parameter configuration method and device, equipment, storage medium and program product
By adaptively adjusting the immediate granularity in the NVMe over RoCE storage system, the problem that a single granularity configuration cannot meet the diverse application requirements is solved, achieving flexibility and efficient utilization of memory resources.
Patent Information
- Application Number
- CN202411744898.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, NVMe over RoCE storage systems can only configure single-granularity immediate write requests during the connection process between the target and the initiator, which cannot meet diverse application requirements and thus cannot adapt to changes in initiator application requests.
By obtaining the immediate write requests of the target initiator within the target time period, the write request data volume information is determined, and the immediate granularity is configured according to the data volume information to achieve adaptive adjustment and meet diverse application needs.
It improves the flexibility of immediate write request operations and the utilization of memory resources, avoids the waste of memory resources, and meets the performance requirements of different application scenarios.
Smart Images

Figure CN122152381A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a request parameter configuration method, apparatus, device, storage medium, and program product. Background Technology
[0002] NVMe over RoCE (NVMe over RDMA via Converged Ethernet) storage systems include a target device and multiple initiators. The initiators can write data to the target device via immediate write requests. An immediate write request is a write request that arrives at the target device along with a request command word. Therefore, it can reduce one process of reading data from remote memory, thereby reducing the processing latency of write requests and improving CPU utilization.
[0003] In related technologies, during the connection establishment process between the target and the initiator, the target can pre-configure the granularity of immediate write requests. However, it generally only supports configuring immediate write requests with a single granularity. This method requires the initiator to write a fixed amount of data each time through an immediate write request, which cannot meet diverse application needs when the application requests of the initiator change. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, device, storage medium, and program product capable of adaptively adjusting request parameter configuration to address the aforementioned technical problems.
[0005] In a first aspect, this application provides a request parameter configuration method for a target in a storage system, the storage system including a target and multiple initiators, the method comprising:
[0006] Get multiple immediate write requests sent by the target initiator within the target time period, where the target initiator is any one of the multiple initiators;
[0007] Based on the multiple immediate write requests sent by the target initiator, determine the write request data volume information of the target initiator;
[0008] Configure the immediate granularity for the target initiator based on the write request data volume information of the target initiator. The immediate granularity is used to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator.
[0009] In the above embodiments, the target in the storage system includes a target and multiple initiators. First, multiple immediate write requests sent by the target initiator within a target time period are acquired, where the target initiator is any one of the multiple initiators. Then, based on the acquired multiple immediate write requests sent by the target initiator, the write request data volume information of the target initiator is determined. Finally, based on the write request data volume information of the target initiator, the target initiator is configured with an immediate granularity indicating the maximum allowed data volume of a single immediate write request sent by the target initiator. In this way, the target can configure the immediate granularity of the target initiator according to the write request data volume information of the target initiator. When the write request data volume of the target initiator changes, the configuration can be adaptively adjusted, thereby meeting the diverse application needs of the target initiator and improving the flexibility of immediate write request operations.
[0010] In one embodiment, acquiring multiple immediate write requests sent by the target initiator within the target time period includes:
[0011] Get the application requests sent by each launcher within the target time period. The application requests carry the request type and launcher identifier.
[0012] Based on the request type and initiator identifier carried in the received application requests, multiple immediate write requests sent by the target initiator are filtered out from the received application requests.
[0013] In the above embodiments, the target device filters out multiple application requests received within the target time period to obtain multiple immediate write requests sent by the target initiator, thereby configuring the parameters of the immediate write requests of the target initiator according to the multiple immediate write requests.
[0014] In one embodiment, the write request data volume information of the target initiator is determined based on the multiple immediate write requests sent by the target initiator, including:
[0015] Based on each immediate write request sent by the target initiator, determine the reference immediate granularity corresponding to each immediate write request. The reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request.
[0016] The reference immediate value granularity corresponding to each immediate write request is used as the write request data volume information of the target initiator.
[0017] In the above embodiments, the corresponding reference immediate granularity is determined based on each immediate write request of the target initiator, thereby determining the write request data volume information of the target initiator, providing a data basis for adaptively adjusting the immediate granularity of the target initiator according to the write request data volume information.
[0018] In one embodiment, configuring the immediate granularity of the target initiator based on the write request data volume information of the target initiator includes:
[0019] Configure the immediate granularity for the target initiator based on the reference immediate granularity with the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0020] In the above embodiments, the corresponding reference immediate granularity is determined according to each immediate write request of the target initiator, and the reference immediate granularity with the largest proportion is configured as the immediate granularity of the target initiator. In this way, the immediate write requests of most target initiators can be satisfied, avoiding the situation where many immediate write requests cannot be fulfilled if the immediate granularity is set too small, or the memory resources are wasted if the immediate granularity is set too large, thereby improving the utilization rate of memory resources.
[0021] In one embodiment, the method further includes:
[0022] Determine the number of write requests in the application request based on the request type carried by the received application request;
[0023] Based on the number of write requests and the number of application requests, the immediate connection quota information is determined. The immediate connection quota information is used to characterize the maximum number of initiators that the target can connect to.
[0024] In the above embodiments, by adaptively adjusting the immediate connection quota supported by the target device by obtaining immediate connection requests within the sampling period, and increasing or decreasing the immediate connection quota, the waste of memory resources caused by invalid immediate connections can be reduced.
[0025] In one embodiment, after configuring the immediate granularity of the target initiator based on the write request data volume information of the target initiator, the method further includes:
[0026] If the immediate granularity of the target initiator is updated, the target's memory resource configuration is adjusted. The memory resource configuration is used to configure the size of the memory resource pool corresponding to different immediate granularities.
[0027] In the above embodiments, multiple initiators can share a memory resource pool. By adjusting the size of the shared memory resource pool, various immediate value granularities can share memory resources, thereby supporting multiple initiators and multiple immediate value connections, leveraging the performance advantages of immediate value writing in different application scenarios, and effectively improving the utilization rate of memory resources.
[0028] In one embodiment, adjusting the target's memory resource configuration according to the immediate granularity configured for the target initiator includes:
[0029] If the free resources of the memory resource pool corresponding to the target immediate granularity are greater than the preset free resource threshold, the capacity of the memory resource pool corresponding to the target immediate granularity is reduced; the target immediate granularity can be any one of multiple immediate granularities.
[0030] If the idle resources of the memory resource pool corresponding to the target immediate value granularity are less than the preset idle resource threshold, the capacity of the memory resource pool corresponding to the target immediate value granularity is increased.
[0031] In the above embodiments, the shared memory resource pool corresponding to each immediate granularity is expanded or shrunk by setting a preset idle resource threshold, so as to avoid the waste of memory resources and effectively improve the utilization rate of memory resources.
[0032] In one embodiment, the method further includes:
[0033] Obtain the connection request sent by the target initiator and obtain the immediate connection quota information;
[0034] If the number of initiators currently connected to the target is less than the immediate connection quota, parse the connection request and determine the initiator identifier of the connection request;
[0035] Based on the initiator identifier in the connection request, obtain the immediate granularity of the target initiator configuration;
[0036] The target initiator is initialized and configured according to the immediate granularity of the target initiator configuration.
[0037] In the above embodiments, after receiving the connection request from the target initiator, the target initiator is initialized by querying its configuration, so that the target initiator can perform immediate write operations according to the configured immediate granularity.
[0038] Secondly, this application also provides a request parameter configuration apparatus for use in a target in a storage system, the storage system including a target and a plurality of initiators, the apparatus comprising:
[0039] The acquisition module is used to acquire multiple immediate write requests sent by the target initiator within the target time period. The target initiator can be any one of the multiple initiators.
[0040] The determination module is used to determine the write request data volume information of the target initiator based on the multiple immediate write requests sent by the target initiator.
[0041] The configuration module is used to configure the immediate granularity for the target initiator based on the write request data volume information of the target initiator. The immediate granularity is used to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator.
[0042] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the request parameter configuration method described in any of the first aspects above.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the request parameter configuration method described in any of the first aspects above.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the request parameter configuration method described in any of the first aspects above.
[0045] The aforementioned request parameter configuration method, apparatus, device, storage medium, and program product are used in a target device within a storage system. The storage system includes a target device and multiple initiators. First, multiple immediate write requests sent by the target initiator within a target time period are acquired, where the target initiator is any one of the multiple initiators. Then, based on the acquired multiple immediate write requests sent by the target initiator, the write request data volume information of the target initiator is determined. Finally, based on the write request data volume information of the target initiator, an immediate granularity is configured for the target initiator to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator. In this way, the target device can configure the immediate granularity for the target initiator based on the write request data volume information of the target initiator. When the write request data volume of the target initiator changes, the configuration can be adaptively adjusted, thereby meeting the diverse application needs of the target initiator and improving the flexibility of immediate write request operations. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is an application environment diagram of a request parameter configuration method in one embodiment;
[0048] Figure 2 This is a flowchart illustrating a method for requesting parameter configuration in one embodiment;
[0049] Figure 3 This is a flowchart illustrating the steps of obtaining an immediate write request in one embodiment;
[0050] Figure 4 This is a flowchart illustrating a method for obtaining target initiator write request data volume information in another embodiment;
[0051] Figure 5 A flowchart illustrating the configuration of the target initiator at an immediate granularity exponential level in one embodiment;
[0052] Figure 6 This is a flowchart illustrating the steps for determining immediate join quota information in one embodiment;
[0053] Figure 7 A flowchart for configuring immediate connection quota information in another embodiment;
[0054] Figure 8 This is a flowchart illustrating the request parameter configuration method in another embodiment;
[0055] Figure 9 A flowchart of the initiator connection request processing procedure in another embodiment;
[0056] Figure 10 This is a logical module structure diagram of a request parameter configuration method in one embodiment;
[0057] Figure 11 This is a schematic diagram of the shared memory pool adjustment process in one embodiment;
[0058] Figure 12 This is a structural block diagram of a request parameter configuration device in one embodiment;
[0059] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] The request parameter configuration method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown is illustrated. The storage system includes a target 102 and multiple initiators 104. The target 102 communicates with the initiators 104 via a network. The initiators 104 can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The target 102 is the storage array endpoint and can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0062] In one exemplary embodiment, such as Figure 2 As shown, a request parameter configuration method is provided, which can be applied to... Figure 1 Taking the target in the example, the explanation includes the following steps 201 to 203. Wherein:
[0063] Step 201: Obtain multiple immediate write requests sent by the target initiator within the target time period.
[0064] In this context, the target initiator can be any one of multiple initiators. The target is the storage end, the initiator is the client that wants to access the storage end, and the immediate write request is a write request in which the initiator sends a request command word along with data to the target. The target time period can be a sampling time period set by the user. By sampling the immediate write requests of the target initiator within the target time period, i.e., the sampling period, the information of the immediate write requests of the target initiator can be obtained.
[0065] Optionally, the target can filter among the multiple application requests received from multiple initiators using the identification information of each initiator, thereby obtaining the immediate write request sent by the target initiator within the target time period.
[0066] Step 202: Determine the write request data volume information of the target initiator based on the multiple immediate write requests sent by the target initiator.
[0067] The write request data size information can be used to characterize the size of the data corresponding to multiple immediate write requests on the target launcher. The data size of different immediate write requests may be different. For example, the data size of immediate write requests sent by different applications on the target launcher may be 4KB, 8KB, or 16KB, etc. Here, 4KB, 8KB, or 16KB refers to the amount of data that an immediate write request can carry.
[0068] Step 203: Configure the immediate granularity for the target initiator based on the write request data volume information of the target initiator.
[0069] The immediate granularity indicates the maximum allowed data size for a single immediate write request sent by the target initiator. Optionally, the appropriate immediate granularity of the target initiator can be determined based on the distribution of write request data sizes among multiple immediate write requests sent by the target initiator within the target time period. For example, if the target initiator sends a large number of immediate write requests with a data size of 8KB, the immediate granularity of the target initiator can be set to 8KB. Alternatively, if the data size of multiple immediate write requests sent by the target initiator is less than 16KB, the immediate granularity of the target initiator can be set to 16KB, which can satisfy the needs of all immediate write requests.
[0070] In the above embodiments, the target in the storage system includes a target and multiple initiators. First, multiple immediate write requests sent by the target initiator within a target time period are acquired, where the target initiator is any one of the multiple initiators. Then, based on the acquired multiple immediate write requests sent by the target initiator, the write request data volume information of the target initiator is determined. Finally, based on the write request data volume information of the target initiator, the target initiator is configured with an immediate granularity indicating the maximum allowed data volume of a single immediate write request sent by the target initiator. In this way, the target can configure the immediate granularity of the target initiator according to the write request data volume information of the target initiator. When the write request data volume of the target initiator changes, the configuration can be adaptively adjusted, thereby meeting the diverse application needs of the target initiator and improving the flexibility of immediate write request operations.
[0071] In the embodiments of this application, step 201 is as follows: Figure 3 As shown, it may include:
[0072] Step 301: Obtain the application requests sent by each launcher within the target time period.
[0073] The application request carries the request type and the initiator identifier. Optionally, the request type of the application request sent by the initiator can include read requests and write requests, and the initiator identifier can be the name information of the initiator, which is unique. The target receives the application requests sent by each initiator in the target time period and counts the received application requests to obtain the total number of application requests.
[0074] Step 302: Based on the request type and initiator identifier carried by the received application request, filter out multiple immediate write requests sent by the target initiator from the received application requests.
[0075] Specifically, based on the request type and initiator identifier, application requests are matched to identify those that are write requests and whose initiator identifier matches that of the target initiator. These are the immediate write requests sent by the target initiator. In essence, the target initiator can filter out multiple immediate write requests corresponding to each initiator using the request type and initiator identifier, and then configure the appropriate immediate granularity for each initiator based on these requests.
[0076] In the above embodiments, the target device filters out multiple application requests received within the target time period to obtain multiple immediate write requests sent by the target initiator, thereby configuring the parameters of the immediate write requests of the target initiator according to the multiple immediate write requests.
[0077] In one embodiment, step 202 above, which determines the write request data volume information of the target initiator, is as follows: Figure 4 As shown, it includes:
[0078] Step 401: Determine the reference immediate granularity corresponding to each immediate write request based on each immediate write request sent by the target initiator.
[0079] The reference immediate granularity is used to characterize the maximum allowed data size for the corresponding immediate write request. The immediate write request carries data size information, and the reference immediate granularity for each immediate write request can be determined based on this information. For example, if the data size of an immediate write request is 4KB, then the reference immediate granularity for that immediate write request is 4KB.
[0080] Step 402: Use the reference immediate granularity corresponding to each immediate write request as the write request data volume information of the target initiator.
[0081] Optionally, the set of reference immediate granularities corresponding to each immediate write request, that is, the set of reference immediate granularities corresponding to all immediate write requests sent by the target initiator, can be used as the write request data volume information of the target initiator. For example, when six immediate write requests are received from the target initiator, and the reference immediate granularities corresponding to the six immediate write requests are 4KB, 4KB, 8KB, 16KB, 32KB, and 4KB respectively, the set of the above reference immediate granularities can be used as the write data volume request information of the target initiator.
[0082] Optionally, after determining the write request data volume information of the target initiator, step 203 above, which configures the immediate granularity of the target initiator based on the write request data volume information, includes:
[0083] Configure the immediate granularity for the target initiator based on the reference immediate granularity with the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0084] Optionally, the reference immediate granularity in the write request data volume information can include 4KB, 8KB, 16KB, or 32KB. A count value is set for each reference immediate granularity. The count is performed based on the reference immediate granularity corresponding to each immediate write request. For example, if the reference immediate granularity for an immediate write request is 4KB, the count value for 4KB is incremented by 1. This process is repeated for all immediate write requests to obtain the count value for each reference immediate granularity. Based on the count values for each reference immediate granularity, the reference immediate granularity with the highest percentage can be determined and used as the immediate granularity for the target initiator. Taking the six reference immediate granularities in the write request data volume as an example, the percentage of reference immediate granularities with a 4KB granularity is 50%, while the percentages of reference immediate granularities with 8KB, 16KB, and 32KB are approximately 16.7%. Therefore, 4KB can be configured as the immediate granularity for the target initiator, which can meet the needs of most immediate write requests while avoiding excessively large immediate granularity settings that would waste memory resources.
[0085] In the above embodiments, the corresponding reference immediate granularity is determined according to each immediate write request of the target initiator, and the reference immediate granularity with the largest proportion is configured as the immediate granularity of the target initiator. In this way, the immediate write requests of most target initiators can be satisfied, avoiding the situation where many immediate write requests cannot be fulfilled if the immediate granularity is set too small, or the memory resources are wasted if the immediate granularity is set too large, thereby improving the utilization rate of memory resources.
[0086] In the embodiments of this application, the immediate granularity configuration process of the target initiator described above can be as follows: Figure 5As shown. Optionally, the immediate write request of the target initiator is obtained, and then the immediate granularity configuration of the target initiator is checked. If it does not exist, it means that the target initiator was not configured before and does not support immediate write requests, so the process ends. If it exists, the immediate write requests of the target initiator are counted, and then the reference immediate granularity of the immediate write request is obtained. Optionally, in this embodiment, the immediate value is represented by a power of 2 of 4KB, that is, the power levels (0, 1, 2, 3) correspond to (4KB, 8KB, 16KB, 32KB) respectively. Therefore, the 4KB granularity power level corresponding to the reference immediate granularity of the immediate write request is calculated, and the count value of the corresponding 4KB granularity power level is incremented by 1. It is then determined whether the current sampling period has ended. If the sampling period has not ended, the immediate write request processing is completed and the process ends. The judgment continues when the next immediate write request of the target initiator is obtained. If the sampling period has ended, the proportion of all power levels of the target initiator within the sampling period is calculated, and the power level with the highest proportion is used as the immediate granularity power level of the newly connected initiator for configuration. After configuration, reset the target launcher's granular power-level statistical parameters, such as clearing all count values to zero.
[0087] Optionally, the immediate join quota information of the target device can also be determined based on the immediate write request, such as... Figure 6 As shown, the steps also include:
[0088] Step 601: Determine the number of write requests in the application request based on the request type carried by the received application request.
[0089] Optionally, a write request count can be set, initially set to 0. The count is incremented by 1 if the request type is a write request. After evaluating all application requests, the total number of write requests is determined from the write request count.
[0090] Step 602: Determine the immediate connection quota information based on the number of write requests and the number of application requests.
[0091] The immediate connection quota information is used to characterize the maximum number of initiators that the target can connect to. Optionally, the write request ratio can be obtained based on the number of write requests and the number of application requests. The write request floating level of the target can be determined based on the write request floating level, and the immediate connection quota information of the target can be adjusted based on the write request floating level.
[0092] For example, such as Figure 7The diagram shows a flowchart for configuring the immediate connection quota information of the target device. The global immediate connection quota is adjusted based on the proportion of immediate write requests within the sampling period. Upon receiving an application request, the number of application requests is counted, and the request type is parsed. If it is not a write request, the process ends. If it is a write request, and the write request size exceeds the preset immediate granularity, the current decision ends. If the write request size is within the preset immediate granularity range, the immediate write requests are counted. For example, every 10 percentage point fluctuation in the immediate write request proportion corresponds to one level. If the fluctuation level changes within the current sampling period, the global immediate connection quota is increased or decreased.
[0093] In the above embodiments, by adaptively adjusting the immediate connection quota supported by the target device by obtaining immediate connection requests within the sampling period, and increasing or decreasing the immediate connection quota, the waste of memory resources caused by invalid immediate connections can be reduced.
[0094] In one embodiment, the target can maintain a shared memory resource pool for each preset immediate granularity. To improve the utilization of each shared memory resource pool, the pool can be adjusted according to changes in the immediate granularity configured for each initiator. This includes:
[0095] If the immediate granularity of the target initiator is updated, the target's memory resource configuration is adjusted. The memory resource configuration is used to configure the size of the memory resource pool corresponding to different immediate granularities.
[0096] Different immediate value granularities correspond to different shared memory resource pools. For example, an immediate value granularity of 4KB corresponds to shared memory resource pool A, and an immediate value granularity of 8KB corresponds to shared memory resource pool B. The request receive queue for immediate write requests with an immediate value granularity of 4KB uses shared memory resource pool A, and the request receive queue for immediate write requests with an immediate value granularity of 8KB uses shared memory resource pool B. When the immediate value granularity configured in the target launcher is updated, for example, if the immediate value granularity is adjusted from 4KB to 8KB, it can be determined whether the 4KB shared memory resource pool A and the 8KB shared memory resource pool B need to be resized. Optionally, the adjustment methods include the following two:
[0097] In the first approach, if the idle resources of the memory resource pool corresponding to the target immediate granularity are greater than a preset idle resource threshold, the capacity of the memory resource pool corresponding to the target immediate granularity is reduced; the target immediate granularity can be any one of multiple immediate granularities.
[0098] Optionally, the idle resources of the memory resource pool, i.e. unused memory resources, can be set according to actual usage needs. When the idle resources exceed the preset idle resource threshold, it means that there are many idle resources in the memory resource pool and the utilization rate of the memory resource pool is low. Therefore, the capacity of the memory resource pool can be reduced. Optionally, the reduced capacity can be determined according to the preset idle resource threshold. For example, the memory resource pool can be reduced until the idle resources are equal to the preset idle resource threshold.
[0099] The second approach involves expanding the capacity of the memory resource pool corresponding to the target immediate value if the available resources are less than a preset free resource threshold.
[0100] Optionally, when the free resources in the memory resource pool are less than the preset free resource threshold, it indicates that the free resources in the memory resource pool are relatively small, the utilization rate of the memory resource pool is relatively high, and the memory capacity may be insufficient. Therefore, the memory resource pool can be expanded. Optionally, the expanded capacity can be determined according to the preset free resource threshold. For example, the memory resource pool can be expanded until the free resources are equal to the preset free resource threshold.
[0101] In the above embodiments, multiple launchers can share a memory resource pool. By adjusting the size of the shared memory resource pool, various immediate value granularities can share memory resources, thereby supporting multi-launcher, multi-immediate value connections. This leverages the performance advantages of immediate value writing in different application scenarios and effectively improves memory resource utilization. Simultaneously, by setting a preset idle resource threshold, the shared memory resource pool corresponding to each immediate value granularity can be expanded or shrunk to avoid wasting memory resources and effectively improve memory resource utilization.
[0102] In one embodiment, after the above request parameters are configured, as follows: Figure 8 As shown, the method also includes:
[0103] Step 801: Obtain the connection request and immediate connection quota information sent by the target initiator.
[0104] Upon receiving a connection request from the target initiator, obtain the immediate connection quota information configured in the target initiator. Based on the immediate connection quota information and the number of initiators currently connected, determine whether to support the target initiator's connection request.
[0105] Step 802: If the number of initiators currently connected to the target is less than the immediate connection quota information, parse the connection request and determine the initiator identifier of the connection request.
[0106] If the number of initiators currently connected to the target is less than the immediate connection quota, then the connection request of the target initiator is parsed to obtain the initiator identification information carried in the connection request.
[0107] Step 803: Obtain the immediate granularity of the target initiator configuration based on the initiator identifier of the connection request.
[0108] Optionally, based on the initiator identifier of the target initiator, query the immediate granularity corresponding to the target initiator configured in the target initiator.
[0109] Step 804: Initialize the target initiator according to the immediate granularity configured in the target initiator.
[0110] Memory resources are allocated for the immediate write requests of the target initiator based on the immediate granularity configured in the target initiator, for receiving data.
[0111] In the above embodiments, after receiving the connection request from the target initiator, the target initiator is initialized by querying its configuration, so that the target initiator can perform immediate write operations according to the configured immediate granularity.
[0112] Optional, such as Figure 9 The diagram illustrates the process by which the target initiator, upon receiving a connection request from the target initiator, performs immediate value configuration permission checks and configuration initialization. First, it retrieves the immediate value connection quota information. If no quota is available, the current connection does not support immediate value configuration. If quota information is successfully retrieved, it queries the immediate value granularity configuration parameters of the target initiator based on the target initiator identifier in the connection request. If the immediate value granularity configuration parameters are not found, the target initiator connection does not support immediate value configuration. In this case, the immediate value parameters of the connection request are reset, setting the supported immediate value size for this connection request to 0, meaning this connection request does not support immediate value requests. If the immediate value granularity configuration parameters of the target initiator are found, the immediate configuration is initialized and memory resources are allocated. If the request is successful, it continues to execute connection requests from other initiators until the request is completed. If the request fails, it resets the immediate value parameters of the connection request and then continues to execute connection requests from other initiators until the request is completed.
[0113] In embodiments of this application, the above-described request parameter configuration method may include, for example: Figure 10 The various modules within the system include: the application request processing module, which receives application requests, the IO sampling module performs IO sampling on the application request to obtain the application request data, and then sends a decision notification message to the immediate value configuration decision module to continue processing the application request.
[0114] The immediate value configuration decision module includes global immediate value connection quota decision and initiator immediate value idempotent decision. The global immediate value connection quota decision is used to predict and adjust the target's immediate value connection quota based on application request data. The specific process is as follows: Figure 7 As shown, the configuration and maintenance module is notified to update the immediate connection quota. The initiator immediate power-law decision is used to recalculate the power-law distribution ratio of initiator immediate write requests based on application requests, determining the initiator's immediate granularity configuration. The specific process is as follows: Figure 5 As shown, the configuration and maintenance module is then notified to update the immediate number granularity configuration parameters.
[0115] The immediate value configuration parameter maintenance module receives immediate value connection quota configuration update messages from the immediate value configuration decision module and updates the immediate value connection quota accordingly. It also receives immediate value granularity configuration update messages from the initiator and updates the initiator's immediate value granularity configuration. Simultaneously, when the above configurations are updated, an update message is sent to the memory resource management module to notify it to make resource management decisions.
[0116] The memory resource management module maintains a shared memory resource pool for each immediate value granularity exponential level. It receives memory resource management decision messages and expands or shrinks the memory resource pool accordingly. When the initiator's immediate value exponential level is updated, a notification message is sent to the memory resource management module. This notification message may include information such as the old exponential level and the new exponential level. The old exponential level is the immediate value granularity exponential level before the configuration update, and the new exponential level is the immediate value granularity exponential level after the configuration update. The process can be as follows: Figure 11 As shown. Simultaneously, a memory resource allocation interface is provided for the connection request module.
[0117] The initiator connection request processing module receives and processes connection requests from each initiator. It queries the immediate granularity configuration parameters of each initiator and performs initialization configuration.
[0118] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0119] Based on the same inventive concept, this application also provides a request parameter configuration apparatus for implementing the request parameter configuration method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more request parameter configuration apparatus embodiments provided below can be found in the limitations of the request parameter configuration method described above, and will not be repeated here.
[0120] In one exemplary embodiment, such as Figure 12 As shown, a request parameter configuration device 1200 is provided for use in a target in a storage system. The storage system includes a target and multiple initiators. The device includes: an acquisition module 1201, a determination module 1202, and a configuration module 1203, wherein:
[0121] The acquisition module 1201 is used to acquire multiple immediate write requests sent by the target initiator within the target time period, where the target initiator is any one of the multiple initiators;
[0122] The determination module 1202 is used to determine the write request data volume information of the target initiator based on the multiple immediate write requests sent by the target initiator.
[0123] Configuration module 1203 is used to configure immediate granularity for the target initiator based on the write request data volume information of the target initiator. The immediate granularity is used to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator.
[0124] In one embodiment, the acquisition module 1201 is specifically used to acquire application requests sent by each initiator within a target time period, wherein the application requests carry a request type and an initiator identifier; and based on the request type and initiator identifier carried by the received application requests, to filter out multiple immediate write requests sent by the target initiator from the received application requests.
[0125] In one embodiment, the determining module 1202 is specifically used to determine the reference immediate granularity corresponding to each immediate write request based on each immediate write request sent by the target initiator. The reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request. The reference immediate granularity corresponding to each immediate write request is used as the write request data volume information of the target initiator.
[0126] In one embodiment, the configuration module 1203 is specifically used to configure the immediate granularity for the target initiator based on the reference immediate granularity with the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0127] In one embodiment, the device further includes a connection quota determination module, configured to determine the number of write requests in the application request based on the request type carried by the received application request; and to determine immediate connection quota information based on the number of write requests and the number of application requests, wherein the immediate connection quota information is used to characterize the maximum number of initiators that the target device can connect to.
[0128] In one embodiment, the device further includes an adjustment module for adjusting the memory resource configuration of the target launcher if the immediate granularity of the target launcher configuration is updated. The memory resource configuration is used to configure the memory resource pool size corresponding to different immediate granularities.
[0129] In one embodiment, the adjustment module is specifically used to reduce the capacity of the memory resource pool corresponding to the target immediate granularity if the idle resources of the memory resource pool corresponding to the target immediate granularity are greater than a preset idle resource threshold; the target immediate granularity is any one of multiple immediate granularities; if the idle resources of the memory resource pool corresponding to the target immediate granularity are less than the preset idle resource threshold, the capacity of the memory resource pool corresponding to the target immediate granularity is increased.
[0130] In one embodiment, the device further includes an initialization module, configured to acquire a connection request sent by the target initiator and acquire immediate connection quota information; if the number of initiators currently connected to the target is less than the immediate connection quota information, parse the connection request and determine the initiator identifier of the connection request; acquire the immediate granularity configured by the target initiator according to the initiator identifier of the connection request; and initialize the target initiator according to the immediate granularity configured by the target initiator.
[0131] Each module in the aforementioned request parameter configuration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0132] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores configuration data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a request parameter configuration method.
[0133] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0134] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring multiple immediate write requests sent by a target initiator within a target time period, wherein the target initiator is any one of multiple initiators; determining the write request data volume information of the target initiator based on the acquired multiple immediate write requests sent by the target initiator; configuring an immediate granularity for the target initiator based on the write request data volume information of the target initiator, wherein the immediate granularity is used to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator.
[0135] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining application requests sent by each initiator within a target time period, wherein the application requests carry a request type and an initiator identifier; and filtering out multiple immediate write requests sent by the target initiator from the received application requests based on the request type and initiator identifier carried by the received application requests.
[0136] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining a reference immediate granularity corresponding to each immediate write request based on each immediate write request sent by the target initiator, wherein the reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request; and using the reference immediate granularity corresponding to each immediate write request as the write request data volume information of the target initiator.
[0137] In one embodiment, when the processor executes the computer program, it further performs the following steps: configuring an immediate granularity for the target initiator based on the reference immediate granularity that accounts for the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0138] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the number of write requests in the application request based on the request type carried by the received application request; and determining immediate connection quota information based on the number of write requests and the number of application requests, wherein the immediate connection quota information is used to characterize the maximum number of initiators that the target can connect to.
[0139] In one embodiment, when the processor executes the computer program, it further performs the following steps: if the immediate granularity configured by the target initiator is updated, the memory resource configuration of the target is adjusted, wherein the memory resource configuration is used to configure the memory resource pool size corresponding to different immediate granularities.
[0140] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the free resources of the memory resource pool corresponding to the target immediate granularity are greater than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is reduced in size; the target immediate granularity is any one of a plurality of immediate granularities; if the free resources of the memory resource pool corresponding to the target immediate granularity are less than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is expanded in size.
[0141] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a connection request sent by the target initiator and obtaining immediate connection quota information; if the number of initiators currently connected to the target is less than the immediate connection quota information, parsing the connection request and determining the initiator identifier of the connection request; obtaining the immediate granularity configured by the target initiator according to the initiator identifier of the connection request; and initializing the target initiator configuration according to the immediate granularity configured by the target initiator.
[0142] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the computer program performs the following steps: acquiring multiple immediate write requests sent by a target initiator within a target time period, wherein the target initiator is any one of multiple initiators; determining the write request data volume information of the target initiator based on the acquired multiple immediate write requests sent by the target initiator; configuring an immediate granularity for the target initiator based on the write request data volume information of the target initiator, wherein the immediate granularity is used to indicate the maximum allowed data volume of a single immediate write request sent by the target initiator.
[0143] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining application requests sent by each initiator within a target time period, wherein the application requests carry a request type and an initiator identifier; and filtering out multiple immediate write requests sent by the target initiator from the received application requests based on the request type and initiator identifier carried by the received application requests.
[0144] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining a reference immediate granularity corresponding to each immediate write request based on each immediate write request sent by the target initiator, wherein the reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request; and using the reference immediate granularity corresponding to each immediate write request as the write request data volume information of the target initiator.
[0145] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an immediate granularity for the target initiator based on the reference immediate granularity that accounts for the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0146] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the number of write requests in the application request based on the request type carried by the received application request; and determining immediate connection quota information based on the number of write requests and the number of application requests, wherein the immediate connection quota information is used to characterize the maximum number of initiators that the target can connect to.
[0147] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the immediate granularity configured by the target initiator is updated, the memory resource configuration of the target is adjusted, wherein the memory resource configuration is used to configure the memory resource pool size corresponding to different immediate granularities.
[0148] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the free resources of the memory resource pool corresponding to the target immediate granularity are greater than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is reduced in size; the target immediate granularity is any one of a plurality of immediate granularities; if the free resources of the memory resource pool corresponding to the target immediate granularity are less than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is expanded in size.
[0149] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a connection request sent by the target initiator and obtaining immediate connection quota information; if the number of initiators currently connected to the target is less than the immediate connection quota information, parsing the connection request and determining the initiator identifier of the connection request; obtaining the immediate granularity configured by the target initiator according to the initiator identifier of the connection request; and initializing the target initiator according to the immediate granularity configured by the target initiator.
[0150] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring multiple immediate write requests sent by a target initiator within a target time period, wherein the target initiator is any one of multiple initiators; determining write request data volume information of the target initiator based on the acquired multiple immediate write requests sent by the target initiator; configuring an immediate granularity for the target initiator based on the write request data volume information of the target initiator, wherein the immediate granularity is used to indicate the maximum allowed data volume of an immediate write request sent by the target initiator in a single instance.
[0151] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining application requests sent by each initiator within a target time period, wherein the application requests carry a request type and an initiator identifier; and filtering out multiple immediate write requests sent by the target initiator from the received application requests based on the request type and initiator identifier carried by the received application requests.
[0152] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining a reference immediate granularity corresponding to each immediate write request based on each immediate write request sent by the target initiator, wherein the reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request; and using the reference immediate granularity corresponding to each immediate write request as the write request data volume information of the target initiator.
[0153] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an immediate granularity for the target initiator based on the reference immediate granularity that accounts for the largest proportion among the reference immediate granularities corresponding to multiple immediate write requests.
[0154] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the number of write requests in the application request based on the request type carried by the received application request; and determining immediate connection quota information based on the number of write requests and the number of application requests, wherein the immediate connection quota information is used to characterize the maximum number of initiators that the target can connect to.
[0155] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the immediate granularity configured by the target initiator is updated, the memory resource configuration of the target is adjusted, wherein the memory resource configuration is used to configure the memory resource pool size corresponding to different immediate granularities.
[0156] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the free resources of the memory resource pool corresponding to the target immediate granularity are greater than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is reduced in size; the target immediate granularity is any one of a plurality of immediate granularities; if the free resources of the memory resource pool corresponding to the target immediate granularity are less than a preset free resource threshold, the memory resource pool corresponding to the target immediate granularity is expanded in size.
[0157] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a connection request sent by the target initiator and obtaining immediate connection quota information; if the number of initiators currently connected to the target is less than the immediate connection quota information, parsing the connection request and determining the initiator identifier of the connection request; obtaining the immediate granularity configured by the target initiator according to the initiator identifier of the connection request; and initializing the target initiator according to the immediate granularity configured by the target initiator.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, 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 the relevant data must comply with relevant regulations.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0161] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for configuring request parameters, characterized in that, In a target device in a storage system, the storage system including a target device and multiple initiators, the method includes: Obtain multiple immediate write requests sent by the target initiator within the target time period, wherein the target initiator is any one of the multiple initiators; Based on the multiple immediate write requests sent by the target initiator, determine the write request data volume information of the target initiator; Configure the immediate granularity of the target initiator based on the write request data volume information of the target initiator. The immediate granularity is used to indicate the maximum allowed data volume of an immediate write request sent by the target initiator in a single transaction.
2. The method according to claim 1, characterized in that, The acquisition of multiple immediate write requests sent by the target initiator within the target time period includes: Obtain application requests sent by each of the launchers within the target time period, wherein the application requests carry the request type and launcher identifier; Based on the request type and initiator identifier carried by the received application request, multiple immediate write requests sent by the target initiator are selected from the received application requests.
3. The method according to claim 1, characterized in that, The step of determining the write request data volume information of the target initiator based on the multiple immediate write requests sent by the target initiator includes: Based on each immediate write request sent by the target initiator, a reference immediate granularity is determined for each immediate write request, and the reference immediate granularity is used to characterize the maximum allowed data volume of the corresponding immediate write request. The reference immediate granularity corresponding to each immediate write request is used as the write request data volume information of the target initiator.
4. The method according to claim 3, characterized in that, The step of configuring immediate granularity for the target initiator based on the write request data volume information of the target initiator includes: Configure the immediate granularity for the target initiator based on the reference immediate granularity with the largest proportion among the reference immediate granularities corresponding to the multiple immediate write requests.
5. The method according to claim 2, characterized in that, The method further includes: Based on the request type carried by the received application request, determine the number of write requests in the application request; Based on the number of write requests and the number of application requests, an immediate connection quota is determined, which is used to characterize the maximum number of initiators that the target device can connect to.
6. The method according to claim 5, characterized in that, After configuring the immediate granularity of the target initiator based on the write request data volume information of the target initiator, the method further includes: If the immediate granularity of the target initiator is updated, the memory resource configuration of the target is adjusted. The memory resource configuration is used to configure the memory resource pool size corresponding to different immediate granularities.
7. The method according to claim 6, characterized in that, The step of adjusting the memory resource configuration of the target initiator according to the immediate granularity configured in the target initiator includes: If the idle resources of the memory resource pool corresponding to the target immediate granularity are greater than the preset idle resource threshold, the memory resource pool corresponding to the target immediate granularity is reduced in size; the target immediate granularity is any one of multiple immediate granularities. If the idle resources of the memory resource pool corresponding to the target immediate granularity are less than a preset idle resource threshold, the capacity of the memory resource pool corresponding to the target immediate granularity is increased.
8. The method according to claim 5, characterized in that, The method further includes: Obtain the connection request sent by the target initiator and the immediate connection quota information; If the number of initiators currently connected to the target is less than the immediate connection quota information, parse the connection request and determine the initiator identifier of the connection request; Based on the initiator identifier of the connection request, obtain the immediate granularity of the target initiator configuration; The target launcher is initialized and configured according to the immediate granularity of the target launcher configuration.
9. A request parameter configuration device, characterized in that, In a target device for a storage system, the storage system including a target device and multiple initiators, the device includes: The acquisition module is used to acquire multiple immediate write requests sent by the target initiator within the target time period, wherein the target initiator is any one of the multiple initiators; The determination module is used to determine the write request data volume information of the target initiator based on the multiple immediate write requests sent by the target initiator. The configuration module is used to configure the immediate granularity for the target initiator based on the write request data volume information of the target initiator. The immediate granularity is used to indicate the maximum allowed data volume of an immediate write request sent by the target initiator in a single transaction.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.