Request processing method and device, computer equipment, storage medium and program product

By obtaining control information of IO requests from shared memory in the computer virtualization scenario, determining the storage sub-volume identification and sending IO requests, the problem of degradation in storage cluster performance in traditional technology is solved, and efficient IO processing and effective utilization of storage devices are achieved.

CN120234094APending Publication Date: 2025-07-01天津中科曙光存储科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311867665.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the computer virtualization scenario, when a physical machine sends IO requests from a virtual machine to a block storage device, a network connection is required, resulting in a degradation of storage cluster performance.

Method used

By obtaining control information of the IO request generated by the virtual machine from the preset shared memory, the corresponding storage subvolume identification is determined, and the IO request is sent to the storage subvolume according to the identification, thereby achieving efficient processing of the IO request.

Benefits of technology

It improves the overall performance of the storage cluster, enhances the utilization rate of storage space on block storage devices, and avoids data corruption caused by single point failure of block storage devices, and improves the reliability and availability of IO requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234094A_ABST
    Figure CN120234094A_ABST
Patent Text Reader

Abstract

The invention relates to a request processing method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring control information of a to-be-processed input / output IO request from a preset shared memory; the IO request to be processed is generated by a virtual machine corresponding to the physical machine; based on the control information, determining a first identifier of a storage sub-volume corresponding to the IO request to be processed; and sending the IO request to be processed to the storage sub-volume according to the control information and the first identifier. By adopting the method, the performance of the storage cluster can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and particularly to a request processing method, apparatus, computer device, and storage medium. Background Art

[0002] Generally, in a computer virtualization scenario, multiple block storage devices in a storage cluster are logically combined into an aggregated storage volume, and the aggregated storage volume provides virtual storage space for virtual machines. When a physical machine receives an IO request from a virtual machine, the physical machine needs to send the IO request of the virtual machine to the block storage devices of the aggregated storage volume to implement virtualized storage of the virtual machine.

[0003] In the traditional technology, when a physical machine sends an IO request of a virtual machine to a block storage device, it is necessary to establish a network connection between each virtual machine and the block storage device, so as to send the IO request to the aggregated storage volume.

[0004] However, the traditional technology will affect the performance of the storage cluster. Summary of the Invention

[0005] Based on this, it is necessary to provide a request processing method, apparatus, computer device, and storage medium that can improve the performance of the storage cluster for the above technical problems.

[0006] In a first aspect, this application provides a request processing method. The method includes:

[0007] Obtaining control information of a to-be-processed input / output (IO) request from a preset shared memory; the to-be-processed IO request is generated by a virtual machine corresponding to a physical machine;

[0008] Based on the control information, determining a first identifier of a storage sub-volume corresponding to the to-be-processed IO request;

[0009] According to the control information and the first identifier, sending the to-be-processed IO request to the storage sub-volume.

[0010] In one embodiment, the control information includes an offset address and a data length corresponding to the to-be-processed IO request; the step of sending the to-be-processed IO request to the storage sub-volume according to the control information and the first identifier includes:

[0011] Determining whether to split the to-be-processed IO request according to the offset address, the data length, a preset strip width of the storage sub-volume, and a preset strip size;

[0012] If so, determine the sub-IO requests corresponding to the to-be-processed IO request according to the offset address, the data length, the stripe width, and the stripe size, and send the sub-IO requests to the storage sub-volume;

[0013] If not, send the to-be-processed IO request to the storage sub-volume according to the first identifier.

[0014] In one embodiment, the step of splitting the to-be-processed IO request according to the offset address, the data length, the stripe width, and the stripe size to obtain the sub-IO requests corresponding to the to-be-processed IO request and sending the sub-IO requests to the storage sub-volume includes:

[0015] Split the to-be-processed IO request according to the offset address, the data length, the stripe width, and the stripe size to obtain the sub-IO requests;

[0016] Determine the second identifier of the storage sub-volume corresponding to the sub-IO requests according to the first identifier, the stripe width, and the number of the sub-IO requests;

[0017] Send the sub-IO requests to the storage sub-volume according to the second identifier.

[0018] In one embodiment, the step of sending the sub-IO requests to the storage sub-volume corresponding to the second identifier includes:

[0019] Merge the sub-IO requests in each of the sending queues according to the stripe size, the offset address, and the data length to obtain the merged sub-IO requests;

[0020] Obtain the processable quantity of the IO requests of the storage sub-volume corresponding to the second identifier;

[0021] When the processable quantity is greater than the number of the merged sub-IO requests, send the merged sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0022] In one embodiment, the step of merging the sub-IO requests in each of the sending queues according to the stripe size, the offset address, and the data length to obtain the merged sub-IO requests includes:

[0023] Select at least two sub-IO requests with consecutive offset addresses and the sum of the data lengths less than or equal to the stripe size from the sending queue, and perform a merge process on the at least two sub-IO requests to obtain the merged sub-IO requests after the merge process.

[0024] In one embodiment, determining a second identifier of a storage sub - volume corresponding to the sub - IO request according to the first identifier, the stripe width, and the number of the sub - IO requests includes:

[0025] If the stripe width is greater than the number of the sub - IO requests, determining the first identifier as the second identifier;

[0026] If the stripe width is less than or equal to the number of the sub - IO requests, determining a third identifier of an adjacent storage sub - volume of the storage sub - volume corresponding to the first identifier according to the number of the sub - IO requests and the first identifier, and determining the first identifier and the third identifier as the second identifier.

[0027] In one embodiment, the method further includes:

[0028] Running a virtual machine process corresponding to the virtual machine, obtaining free memory from the memory of the physical machine, and determining the free memory as the shared memory.

[0029] In one embodiment, the capacity of the shared memory is variable.

[0030] In one embodiment, the shared memory includes buffer pages; the method further includes:

[0031] When receiving the to - be - processed IO request, storing the to - be - processed IO request in the memory of the physical machine;

[0032] Running the virtual machine process to call a preset interface, obtaining the to - be - processed IO request from the memory of the physical machine through the preset interface, and storing control information of the to - be - processed IO request in the buffer pages.

[0033] In one embodiment, the shared memory further includes data exchange pages; the method further includes:

[0034] If the processing type of the to - be - processed IO request is a write process, storing processing data corresponding to the to - be - processed IO request in the data exchange pages.

[0035] In a second aspect, the present application further provides a request processing device. The device includes:

[0036] A first acquisition module, configured to acquire control information of a to - be - processed IO request from a preset shared memory; the to - be - processed IO request is generated by a virtual machine corresponding to a physical machine;

[0037] A determination module, configured to determine a first identifier of a storage sub - volume corresponding to the to - be - processed IO request based on the control information;

[0038] A sending module, configured to send the to-be-processed IO request to the storage sub - volume according to the control information and the first identifier.

[0039] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect above are implemented.

[0040] In a fourth aspect, the present application further provides a computer - readable storage medium. The computer - readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0041] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0042] For the above - mentioned request processing method, device, computer device, storage medium and program product, the physical machine obtains the control information of the to - be - processed input / output (IO) request generated by the virtual machine from a preset shared memory, and can determine the first identifier of the storage sub - volume corresponding to the to - be - processed IO request based on the control information of the to - be - processed IO request. Since the storage sub - volume is obtained by partitioning the storage space of the storage cluster, and one storage sub - volume can correspond to multiple storage devices in the storage space, the to - be - processed IO request is sent to the storage sub - volume according to the control information and the first identifier of the storage sub - volume corresponding to the to - be - processed IO request, which can improve the utilization rate of the block storage devices corresponding to the storage space, thereby improving the overall performance of the storage cluster; in addition, since the storage sub - volume corresponds to multiple block storage devices in the storage space, it can avoid the situation that the data of the to - be - processed IO request is damaged due to a single - point failure of the block storage device, and improves the reliability and availability of the to - be - processed IO request. Description of the Drawings

[0043] Figure 1 It is a diagram of the application environment of the request processing method in an embodiment;

[0044] Figure 2 It is a schematic flowchart of the request processing method in an embodiment;

[0045] Figure 3 It is a schematic diagram of establishing a network connection between a physical machine and a storage space in an embodiment;

[0046] Figure 4 It is a schematic flowchart of the request processing method in another embodiment;

[0047] Figure 5 It is a schematic flowchart of a request processing method in another embodiment;

[0048] Figure 6 It is a schematic flowchart of a request processing method in another embodiment;

[0049] Figure 7 It is a schematic flowchart of a request processing method in another embodiment;

[0050] Figure 8 It is a schematic flowchart of a request processing method in another embodiment;

[0051] Figure 9 It is a structural block diagram of a request processing device in one embodiment;

[0052] Figure 10 It is a structural block diagram of a request processing device in another embodiment;

[0053] Figure 11 It is an internal structure diagram of a computer device in one embodiment. Detailed implementation manners

[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0055] The request processing method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 Among them, the physical machine 102 communicates with the storage cluster 104 through a network. The physical machine 102 can send the IO requests generated by the virtual machine to the storage cluster 104 through the network to implement data read operations or data write operations on the storage cluster 104. Among them, the physical machine 102 can be, but is not limited to, various servers, personal computers, laptop computers, etc. The storage cluster 104 can be implemented by a storage cluster composed of multiple storage devices.

[0056] In one embodiment, as shown in Figure 2 A request processing method is provided. Taking the physical machine in Figure 1 as an example, the method includes the following steps:

[0057] S201, obtain the control information of the input / output (IO) request to be processed from a preset shared memory; the IO request to be processed is generated by the virtual machine corresponding to the physical machine.

[0058] Generally, in virtual machine technology, multiple virtual machines can run on a physical machine, enabling multiple applications to run simultaneously on the same physical machine. Each application is isolated from others, and the system resources of the physical machine can be shared, improving the utilization efficiency of the physical machine system resources. Among them, a virtual machine refers to a complete computer system that is simulated by software, has the functions of a complete hardware system, and runs in a completely isolated environment. In a physical machine, a virtual machine corresponds to a virtual machine process. When the virtual machine process starts, it dynamically loads the shared libraries provided by the physical machine to call the interfaces provided by the shared libraries, and sends the pending I / O requests generated by the operating system of the virtual machine to the corresponding storage space of the block storage service through the shared library. Here, the pending I / O requests refer to the data read and write operations between the virtual machine and the storage space, and the virtual machine process refers to the entity that runs computer programs through the virtual machine, including information such as independent memory space, registers, and run-time stacks.

[0059] It can be understood that the physical machine can provide a memory space for storing pending I / O requests to the virtual machine, and use this memory space as the shared memory that can be accessed by both the physical machine and the virtual machine. In the shared memory, the control information of the pending I / O requests can be stored. Among them, the control information of the pending I / O requests can include identification information for characterizing the processing type of the pending I / O requests. The control information of the pending I / O requests can also include the operation type of processing data, the identification information of the storage sub-volume, the starting address, offset address, and data length stored in the storage space.

[0060] As an optional implementation manner, a proxy process for managing pending I / O requests can be created in the physical machine. The pending I / O requests are managed by running the proxy process and sent to the storage space. The physical machine can allocate idle memory to the proxy process and divide the idle memory into multiple storage page groups. When the virtual machine process starts, a storage page group can be allocated to a virtual machine process as the shared memory. If the memory of the storage page group is insufficient during operation, a new storage page group can be dynamically allocated to the virtual machine process; or, when a certain virtual machine process ends, the storage page group allocated to the virtual machine process can be recycled, thereby realizing the dynamic allocation of the shared memory.

[0061] In this embodiment, the physical machine can obtain the stored information in the shared memory in real time by setting a listening function, so as to obtain the control information of the pending I / O requests from the preset shared memory when the physical machine receives the pending I / O requests sent by the virtual machine.

[0062] S202. Based on the control information, determine the first identifier of the storage sub-volume corresponding to the pending I / O request.

[0063] Generally, in the virtualized docking of block storage services, multiple block storage devices in a storage cluster can be logically combined into an aggregated storage volume, and the virtual storage space can be provided for virtual machines through this aggregated storage volume. In this embodiment, the aggregated storage volume can be divided into multiple storage sub-volumes by using striping technology. Among them, one storage sub-volume can correspond to all storage devices in the storage cluster; or, one storage sub-volume can also correspond to some storage devices in the storage cluster. It can be understood that the to-be-processed IO requests sent by a physical machine to a storage sub-volume can be dispersedly stored in all storage devices or some storage devices in the storage cluster, so that the storage cluster can exert its overall performance. Among them, the control information of the to-be-processed IO request can include the identification information of the corresponding storage sub-volume, as well as the offset address and data length corresponding to the to-be-processed IO request. It can be understood that the offset address is used to represent the offset address of the to-be-processed IO request in the storage space.

[0064] In this embodiment, the identification of the storage sub-volume corresponding to the to-be-processed IO request can be obtained by parsing the control information of the to-be-processed IO request, so as to determine the first identification of the storage sub-volume corresponding to the to-be-processed IO request according to the identification of the storage sub-volume.

[0065] S203, send the to-be-processed IO request to the storage sub-volume according to the control information and the first identification.

[0066] In this embodiment, the physical machine can determine which storage sub-volume to send the to-be-processed IO request to according to the first identification of the storage sub-volume corresponding to the to-be-processed IO request, and determine the offset address and data length of the to-be-processed IO request according to the control information, so as to send the to-be-processed IO request to the storage sub-volume corresponding to the first identification according to the offset address and data length.

[0067] As an optional implementation manner, when the physical machine sends a to-be-processed IO request to the storage space, it can establish a network connection between the proxy process and the access interface of the storage space, so as to send the received to-be-processed IO request to the storage space through this network connection. Exemplarily, the schematic diagram of establishing a network connection between the physical machine and the storage space can be as Figure 3 shown, Figure 3 In the figure, there are two storage nodes in the storage space. One storage node corresponds to one storage sub-volume. A physical machine can establish network connections with the two storage nodes respectively through the proxy process. It can be understood that in this embodiment, by establishing network connections between the proxy process and each storage node, the number of network connections established by each virtual machine process with each storage node can be reduced, so that the memory and resources of the physical machine and the storage space can be reduced, and the problem that the storage cluster needs to manage a large number of network connections and affects the performance of the storage cluster can be avoided.

[0068] In the above request processing method, the physical machine obtains the control information of the to-be-processed IO request generated by the virtual machine from a preset shared memory, and can determine the first identifier of the storage sub-volume corresponding to the to-be-processed IO request based on the control information of the to-be-processed IO request. Since the storage sub-volume is obtained by partitioning the storage space of the storage cluster, and one storage sub-volume can correspond to multiple storage devices in the storage space, the to-be-processed IO request is sent to the storage sub-volume according to the control information and the first identifier of the storage sub-volume corresponding to the to-be-processed IO request, which can improve the utilization rate of the block storage devices corresponding to the storage space, thereby improving the overall performance of the storage cluster; in addition, since the storage sub-volume corresponds to multiple block storage devices in the storage space, it can avoid the situation that the data of the to-be-processed IO request is damaged due to a single point of failure of the block storage device, and improves the reliability and availability of the to-be-processed IO request.

[0069] In the scenario of sending the to-be-processed IO request to the storage sub-volume according to the control information and the first identifier, it is possible to determine whether to split the to-be-processed IO request according to the offset address, data length, preset strip width, and preset strip size of the to-be-processed IO request, and then send the to-be-processed IO request to the corresponding storage sub-volume according to the result of whether to split. In one embodiment, the control information includes the offset address and data length corresponding to the to-be-processed IO request. As Figure 4 shown, the above S203 includes:

[0070] S301, determine whether to perform a split process on the to-be-processed IO request according to the offset address, data length, preset strip width, and preset strip size of the to-be-processed IO request.

[0071] It should be noted that after the physical machine sends the to-be-processed IO request to the storage space, the data writing method in the storage space is overwrite writing. That is to say, when sending the to-be-processed IO request to the storage space, it is not necessary to consider the storage capacity of the storage space. In this embodiment, it is possible to determine whether the storage sub-volume corresponding to the first identifier meets the processing requirements of data writing and data reading of the to-be-processed IO request according to the offset address of the to-be-processed IO request.

[0072] In this embodiment, the starting storage sub-volume for sending can be determined according to the offset address corresponding to the to-be-processed IO request in the control information, and then the number of storage sub-volumes to which the to-be-processed IO request needs to be sent can be determined according to the strip size and data length. If the number of storage sub-volumes to be sent is greater than the number of storage sub-volumes, the to-be-processed IO request needs to be split. If the number of storage sub-volumes to be sent is less than or equal to the number of storage sub-volumes, the to-be-processed IO request does not need to be split.

[0073] In S302, if so, determine sub-IO requests corresponding to the to-be-processed IO request according to the offset address, data length, strip width, and strip size, and send the sub-IO requests to the storage sub-volumes.

[0074] It should be noted that the storage space may include multiple storage devices. The multiple storage devices can be logically combined into an aggregated storage space. According to the striping technology, the storage space can be divided into multiple storage sub-volumes. Each storage sub-volume can correspond to multiple storage devices or all storage devices in the storage space, and each storage sub-volume corresponds to a different offset address. Among them, the number of storage sub-volumes corresponding to the storage space is the strip width of the storage space, and the strip width can represent the number of storage devices that read or write to the storage sub-volumes simultaneously; the continuous data in the storage sub-volume is divided into data blocks of the same size, and the size of the data block is the strip size of the storage sub-volume. The strip size represents the amount of data accessed from the storage sub-volume at one time. When writing data to the storage sub-volume, the data can be divided according to the strip size and then written to the storage sub-volume according to the strip size.

[0075] In this embodiment, the to-be-processed IO request can be split according to the strip size and data length to obtain multiple sub-processed data. The to-be-processed IO request is split into multiple sub-IO requests according to the sub-processed data and the corresponding offset address. Thus, the starting storage sub-volume is determined according to the offset address, and the multiple split sub-IO requests are sent to the storage sub-volumes. Exemplarily, if the offset address corresponding to the storage sub-volume is 0 - 512k, and the offset address corresponding to the to-be-processed IO request is 0, and the data length is 1024K, then the to-be-processed IO request can be split into two sub-IO requests, and the offset addresses corresponding to each sub-IO request are 0k and 512k respectively.

[0076] In S303, if not, send the to-be-processed IO request to the storage sub-volume according to the first identifier.

[0077] It can be understood that if the offset address corresponding to the storage sub-volume exceeds the offset address corresponding to the to-be-processed IO request, it means that the storage device corresponding to the storage sub-volume can write the data corresponding to the to-be-processed IO request, or it means that the storage device corresponding to the storage sub-volume includes the data that the to-be-processed IO request needs to read.

[0078] In this embodiment, the to-be-processed IO request can be directly sent to the storage sub-volume corresponding to the first identifier without the need to split the to-be-processed IO request.

[0079] In this embodiment, by determining whether to split the to-be-processed IO request according to the offset address, it is possible to, when splitting the to-be-processed IO request, split the to-be-processed IO request according to the offset address, the preset strip width of the storage subvolume, and the preset strip size, obtain sub-IO requests corresponding to the to-be-processed IO request, and send the sub-IO requests to the storage subvolume. Also, when not splitting the to-be-processed IO request, send the to-be-processed IO request to the storage subvolume according to the first identifier. This can pre-split the to-be-processed IO request, avoid the problem that the storage subvolume corresponding to the first identifier cannot meet the processing requirements of the to-be-processed IO request and needs to be resent, resulting in waste of resources.

[0080] The following will describe in detail the specific process of determining sub-IO requests corresponding to the to-be-processed IO request according to the offset address, data length, preset strip width of the storage subvolume, and preset strip size, and sending the sub-IO requests to the storage subvolume. In one embodiment, as Figure 5 shown, step S302 above includes:

[0081] S401, split the to-be-processed IO request according to the offset address, data length, strip width, and strip size to obtain sub-IO requests.

[0082] It can be understood that in striping technology, it is necessary to determine the amount of data accessed from the storage device each time according to the strip size. Therefore, the processing data of the to-be-processed IO request can be split according to the strip size to obtain multiple sub-processing data. Exemplarily, if the strip size is 1 Mbit and the data length is 4 Mbit, the processing data of the to-be-processed IO request can be split into 4 sub-processing data of 1 Mbit each.

[0083] In this embodiment, the starting storage subvolume can be determined according to the offset address of the to-be-processed IO request, and the data length of the to-be-processed IO request can be split according to the strip size, so as to determine the storage subvolume corresponding to the split sub-IO requests according to the strip width, and send each sub-IO request to the corresponding storage subvolume. For example, if the offset address of the to-be-processed IO request is 1M - 6M, the data length is 5M, the strip width is 4, and the strip size is 1M, the to-be-processed IO request can be split into 5 sub-IO requests, namely sub-IO request 1, sub-IO request 2, sub-IO request 3, sub-IO request 4, and sub-IO request 5. And sub-IO request 1 corresponds to the second storage subvolume, sub-IO request 2 corresponds to the third storage subvolume, sub-IO request 3 corresponds to the fourth storage subvolume, sub-IO request 4 corresponds to the first storage subvolume, and sub-IO request 5 corresponds to the second storage subvolume.

[0084] S402. Determine a second identifier of the storage sub - volume corresponding to the sub - IO request according to the first identifier, the strip width, and the number of sub - IO requests.

[0085] It can be understood that after splitting the to - be - processed IO request, each sub - IO request can be separately sent to the corresponding storage sub - volume. Herein, the second identifier of the storage sub - volume corresponding to the sub - IO request refers to the identifiers of all storage sub - volumes corresponding to all sub - IO requests. The second identifier may include the first identifier and the identifiers of other storage sub - volumes.

[0086] In this embodiment, the number of corresponding storage sub - volumes can be determined according to the number of sub - IO requests, and the number of other storage sub - volumes can be determined according to the number of storage sub - volumes. Then, the identifiers of other storage sub - volumes can be determined according to the first identifier. The first identifier and the identifiers of other storage sub - volumes are determined as the second identifier corresponding to the sub - IO request, and the sub - IO request is added to the sending queue of the storage sub - volume corresponding to the second identifier.

[0087] As an alternative implementation, the sub - IO request can also be added to the sending queue of the storage sub - volume corresponding to the second identifier.

[0088] S403. Send the sub - IO request to the storage sub - volume corresponding to the second identifier according to the second identifier.

[0089] In this embodiment, the storage sub - volume corresponding to the sub - IO request can be determined according to the second identifier, and each sub - IO request is sent to the corresponding storage sub - volume.

[0090] In this embodiment, by splitting the to - be - processed IO request according to the offset address, the strip width, and the strip size, sub - IO requests can be obtained. And according to the first identifier, the strip width, and the number of sub - IO requests, the second identifier of the storage sub - volume corresponding to the sub - IO request can be determined. Thus, the sub - IO request can be sent to the storage sub - volume corresponding to the second identifier according to the second identifier. Since the second identifier of the storage sub - volume corresponding to the sub - IO request can be accurately determined according to the first identifier, the strip width, and the number of sub - IO requests, the sub - IO requests can be separately sent to the corresponding storage sub - volumes, thereby meeting the processing requirement of sending the sub - IO requests corresponding to the to - be - processed IO request to the storage sub - volumes.

[0091] In the scenario of sending the sub - IO request to the storage sub - volume corresponding to the second identifier according to the second identifier, the strip size, and the offset address, the sub - IO requests can be merged according to the offset addresses and data lengths of the sub - IO requests in the sending queue, and the merged sub - IO requests are sent to the storage sub - volume corresponding to the second identifier. In one embodiment, the control information further includes the data length corresponding to the to - be - processed IO request, such as Figure 6As shown above, the above S403 includes:

[0092] S501, merge the sub-IO requests in each sending queue according to the strip size, offset address, and data length to obtain the merged sub-IO requests.

[0093] It should be noted that if there are untransmitted sub-IO requests in the sending queue, in order to reduce the number of transmissions and thus reduce the resource occupancy of the physical machine, the sub-IO requests can be merged and the merged sub-IO requests can be sent to the storage sub-volume.

[0094] In this embodiment, it is possible to determine whether the sub-IO requests correspond to the same storage sub-volume according to the offset addresses of the sub-IO requests, so as to merge the sub-IO requests corresponding to the same storage sub-volume. Further, it is also possible to determine whether to merge according to the data length and strip size of the merged sub-IO requests. If the data length after merging is less than or equal to the strip size, then they can be merged; if the data length after merging is greater than the strip size, then they cannot be merged.

[0095] As an optional implementation manner, at least two sub-IO requests with consecutive offset addresses and the sum of the data lengths less than or equal to the strip size can be selected from the sending queue, and the at least two sub-IO requests are merged to obtain the merged sub-IO requests. Exemplarily, if the strip size is 1 Mbit, the offset address of sub-IO request A is 0, and the data length is 256 bits, and the offset address of sub-IO request B is 256, and the data length is 256 bits, then sub-IO request A and sub-IO request B can be merged to obtain the merged sub-IO request.

[0096] S502, obtain the number of IO requests that can be processed for the storage sub-volume corresponding to the second identifier.

[0097] It should be noted that due to the limited and fixed storage capacity of the storage device, the number of IO requests that each storage sub-volume can process obtained according to the storage capacity of the storage device is also fixed. If the number of requests that can be processed in the storage sub-volume is 0, it means that no new IO requests can be received in this storage sub-volume. If the number of requests that can be processed in the storage sub-volume is greater than 0, it means that this storage sub-volume can continue to receive new IO requests.

[0098] In this embodiment, the number of requests that can be processed for each storage sub-volume corresponding to the second identifier can be obtained through the network connection between the physical machine and each storage sub-volume; alternatively, a listening function can also be set to periodically obtain the number of received IO requests for each storage sub-volume, so as to determine the number of IO requests that can be processed for the storage sub-volume corresponding to the second identifier according to the preset total number of IO requests that can be processed for the storage sub-volume and the number of received IO requests for the storage sub-volume corresponding to the second identifier.

[0099] S503. When the processable quantity is greater than the quantity of sub-IO requests, the merged sub-IO requests are sent to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0100] In this embodiment, it is possible to determine whether the storage sub-volume can receive new sub-IO requests according to the comparison result between the processable quantity of the storage sub-volume and the quantity of the merged sub-IO requests in the send queue. Thus, when the processable quantity is greater than the quantity of the merged sub-IO requests, the merged sub-IO requests are sent to the storage sub-volume corresponding to the second identifier.

[0101] In this embodiment, by merging the sub-IO requests in each send queue according to the stripe size, offset address, and data length, the merged sub-IO requests can be obtained, so as to obtain the processable quantity of the IO requests of the storage sub-volume corresponding to the second identifier. When the processable quantity is greater than the quantity of the merged sub-IO requests, the merged sub-IO requests are sent to the storage sub-volume corresponding to the second identifier according to the second identifier, thereby ensuring that the storage sub-volume can process the sent sub-IO requests and improving the processing efficiency of the sub-IO requests.

[0102] In the scenario of determining the second identifier of the storage sub-volume corresponding to the sub-IO request according to the first identifier, stripe width, and quantity of sub-IO requests, the second identifier of the storage sub-volume corresponding to the sub-IO request can be determined according to the quantity of sub-IO requests and the stripe width. In one embodiment, as Figure 7 shown, the above S402 includes:

[0103] S601. If the stripe width is greater than the quantity of sub-IO requests, the first identifier is determined as the second identifier.

[0104] It can be understood that if the stripe width is greater than the quantity of sub-IO requests, it means that the sub-IO requests can be sent to the same storage sub-volume, so the sub-IO requests can be sent to this storage sub-volume. In this embodiment, when the stripe width is greater than the quantity of sub-IO requests, the first identifier can be directly determined as the second identifier. Exemplarily, if the quantity of sub-IO requests is 3 and the stripe width of the storage sub-volume corresponding to the first identifier is 4, it means that the stripe width is greater than the quantity of sub-IO requests, and the sub-IO requests can be sent to this storage sub-volume, so the first identifier can be determined as the second identifier.

[0105] S602. If the stripe width is less than or equal to the quantity of sub-IO requests, the third identifier of the adjacent storage sub-volume of the storage sub-volume corresponding to the first identifier is determined according to the quantity of sub-IO requests and the first identifier, and the first identifier and the third identifier are determined as the second identifier.

[0106] Among them, the third identifier refers to the identifier of the storage sub - volume adjacent to the storage sub - volume corresponding to the first identifier. In this embodiment, when the strip width is less than or equal to the number of sub - IO requests, the number of corresponding storage sub - volumes can be determined according to the number of sub - IO requests, and the storage sub - volumes adjacent to the storage sub - volume corresponding to the first identifier can be determined according to the determined number of storage sub - volumes. Then, the identifier of the adjacent storage sub - volume can be determined according to the first identifier, and the identifier of the adjacent storage sub - volume is determined as the third identifier. Thus, the first identifier and the third identifier can be determined as the second identifier. Exemplarily, if the number of sub - IO requests is 5 and the strip width of the storage sub - volumes in the storage space is 4, it indicates that the strip width is less than the number of sub - IO requests. Therefore, the third identifier of the adjacent storage sub - volume can be determined according to the first identifier, and the first identifier and the third identifier are determined as the second identifier.

[0107] In this embodiment, when the strip width is greater than the number of sub - IO requests, the first identifier can be determined as the second identifier. When the strip width is less than or equal to the number of sub - IO requests, the third identifier of the storage sub - volume adjacent to the storage sub - volume corresponding to the first identifier can be determined according to the number of sub - IO requests and the first identifier, and the first identifier and the third identifier are determined as the second identifier. Thus, the second identifier of the storage sub - volume corresponding to the sub - IO request can be quickly and accurately determined according to the strip width and the number of sub - IO requests, and further the efficiency of sending sub - IO requests can be improved.

[0108] In the above - mentioned scenario of obtaining the control information of the to - be - processed IO request from the preset shared memory, the shared memory allocated by the physical machine can be obtained by running the virtual machine process. In one embodiment, the above - mentioned method further includes: running the virtual machine process corresponding to the virtual machine, obtaining the free memory from the memory of the physical machine, and determining the free memory as the shared memory.

[0109] It should be noted that in computer virtualization technology, in order to enable the virtual machine to exchange data with the physical machine, the physical machine can allocate free memory as the shared memory that can be accessed by both the physical machine and the virtual machine. Among them, one virtual machine corresponds to the first virtual machine process, and multiple virtual machine processes can run on one physical machine.

[0110] Optionally, in this embodiment, the physical machine can pre - allocate some free memory, obtain the free memory from the memory of the physical machine by running the virtual machine process corresponding to the virtual machine, and determine the determined free memory as the shared memory; or, the physical machine can also pre - allocate some free memory, manage the free memory by the created proxy process, communicate with the proxy process through the interface by running the virtual machine process corresponding to the virtual machine, so as to obtain the free memory, and determine the free memory as the shared memory.

[0111] As an alternative embodiment, the capacity of the shared memory is variable and can be dynamically allocated or released. It should be noted that the physical machine can divide the shared memory into multiple shared memory blocks according to a preset size and run a preset page management process to manage the shared memory blocks. When a virtual machine process starts, a shared memory block can be allocated from the shared memory to the virtual machine process. If the memory capacity of the shared memory block is less than the data volume of the pending IO request corresponding to the virtual machine process, a new shared memory block can be applied to the page management process through an interface. If there are insufficient free shared memory blocks, a new shared memory can also be re-applied to the physical machine; or, after the virtual machine process ends, the shared memory block can be actively released, or if the virtual machine is abnormally interrupted, if the proxy process in the physical machine detects the abnormal interruption, it can trigger the process of recycling the shared memory block.

[0112] In this embodiment, by running the virtual machine process corresponding to the virtual machine, free memory is obtained from the memory of the physical machine and the free memory is determined as the shared memory. Thus, when a pending IO request is received, the virtual machine process can store the pending IO request in the shared memory, enabling the physical machine to obtain the control information of the pending IO request from the shared memory and then send the pending IO request to the storage space according to the control information.

[0113] In the scenario of obtaining the control information of the pending IO request from the preset shared memory above, the shared memory can be obtained by running the virtual machine process, and a buffer page can be allocated from the shared memory to store the control information of the pending IO request in the buffer page of the shared memory. In one embodiment, the shared memory includes buffer pages, such as Figure 8 shown, the above method further includes:

[0114] S701, in the case of receiving a pending IO request, store the pending IO request in the memory of the physical machine.

[0115] It should be noted that the virtual machine can communicate with the physical machine through the virtual machine process. When the operating system of the virtual machine generates a pending IO request, the pending IO request can be stored in the memory of the physical machine, and then the pending IO request can be obtained from the memory by running the virtual machine process. In this embodiment, the physical machine can obtain the pending IO request by running the virtual machine process, and thus, in the case of receiving the pending IO request, store the pending IO request in the free memory pre-allocated by the physical machine.

[0116] S702, run the virtual machine process to call a preset interface, obtain the pending IO request from the memory of the physical machine through the preset interface, and store the control information of the pending IO request in the buffer page.

[0117] Among them, the preset interface can be a communication interface provided by a physical machine to a virtual machine process, and this interface can be used to obtain the stored data in the memory of the physical machine. In this embodiment, the virtual machine process can be run to call the preset interface to obtain the to-be-processed IO request from the memory of the physical machine. Thus, when the to-be-processed IO request is obtained, the to-be-processed IO request is parsed, and the control information of the to-be-processed IO request obtained by parsing is stored in the buffer page of the shared memory.

[0118] In this embodiment, when the to-be-processed IO request is received, the to-be-processed IO request can be stored in the memory of the physical machine, so that the virtual machine process can be run to call the preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in the buffer page. Furthermore, the control information can be obtained from the buffer page of the shared memory, and the to-be-processed IO request is sent to the storage space according to the control information.

[0119] After the virtual machine process runs to obtain the shared memory as described above, the storage pages in the shared memory other than the buffer page can also be allocated as data exchange pages to store the processed data. In one embodiment, the shared memory further includes data exchange pages, and the method further includes: if the processing type of the to-be-processed IO request is a write process, the processed data corresponding to the to-be-processed IO request is stored in the data exchange page.

[0120] Among them, the data exchange page is a storage page in the shared memory for storing the processed data. It can be understood that if the processing type of the to-be-processed IO request is a write process, the processed data corresponding to the write request needs to be written into the storage space, and the physical machine can obtain the processing request from the data exchange page. Therefore, the processed data corresponding to the write request needs to be stored in the data exchange page so that the physical machine can obtain the processed data.

[0121] In this embodiment, when the physical machine receives the to-be-processed IO request, it can determine whether the processing type of the to-be-processed IO request is a read process or a write process according to the identifier in the control information of the to-be-processed IO request. Thus, when the processing type of the to-be-processed IO request is a write process, the processed data corresponding to the to-be-processed IO request is stored in the data exchange page of the shared memory by running the virtual machine process.

[0122] As an alternative implementation, if the processing type of the to-be-processed IO request is a read process, after the physical machine obtains the corresponding data to be read from the storage space, it can also be stored in the data exchange page, so that the virtual machine process can obtain the data to be read from the data exchange page.

[0123] In this embodiment, when the processing type of the to-be-processed IO request is a write process, storing the processing data corresponding to the to-be-processed IO request in the data exchange page enables the physical machine to obtain the processing data through the data exchange page, so as to send the to-be-processed IO request and the processing data to the storage space.

[0124] For the convenience of understanding by those skilled in the art, the request processing method provided by this application is introduced in detail below. The method may include:

[0125] S1. Run the virtual machine process corresponding to the virtual machine, obtain free memory from the memory of the physical machine, and determine the free memory as shared memory, where the shared memory includes a buffer page and a data exchange page, and the capacity of the shared memory is variable.

[0126] S2. When receiving a to-be-processed IO request, store the to-be-processed IO request in the memory of the physical machine. The to-be-processed IO request is generated by the virtual machine corresponding to the physical machine.

[0127] S3. Run the virtual machine process to call a preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in the buffer page.

[0128] S4. Run a preset proxy process to obtain the control information of the to-be-processed IO request from the preset shared memory.

[0129] S5. Based on the control information of the to-be-processed IO request, determine the first identifier of the storage subvolume corresponding to the to-be-processed IO request. The control information includes an offset address and a data length.

[0130] S6. According to the offset address, data length, preset strip width of the storage subvolume, and preset strip size, determine whether to split the to-be-processed IO request.

[0131] S7. If the to-be-processed IO request is to be split, split the to-be-processed IO request according to the offset address, data length, strip width, and strip size to obtain sub-IO requests.

[0132] S8. If the strip width is greater than the number of sub-IO requests, determine the first identifier as the second identifier.

[0133] S9. If the strip width is less than or equal to the number of sub-IO requests, determine the third identifier of the adjacent storage subvolume of the storage subvolume corresponding to the first identifier according to the number of sub-IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

[0134] S10. Add the sub-IO requests to the send queue of the storage subvolume corresponding to the second identifier.

[0135] S11. Select at least two sub - IO requests from the send queue whose offset addresses are consecutive and the sum of the data lengths is less than or equal to the stripe size, and perform a merging process on the at least two sub - IO requests to obtain the merged sub - IO requests.

[0136] S12. Obtain the number of IO requests that can be processed for the storage sub - volume corresponding to the second identifier;

[0137] S13. When the number of requests that can be processed is greater than the number of merged sub - IO requests, send the merged sub - IO requests to the storage sub - volume corresponding to the second identifier according to the second identifier.

[0138] S14. If the to - be - processed IO request is not split, send the to - be - processed IO request to the storage sub - volume according to the first identifier.

[0139] It should be noted that for the descriptions in S1 - 14 above, reference can be made to the relevant descriptions in the above - mentioned embodiments, and the effects are similar. Therefore, this embodiment will not be elaborated here.

[0140] It should be understood that although the steps in the flowcharts involved in the above - mentioned embodiments are displayed in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - mentioned embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0141] Based on the same inventive concept, the embodiments of the present application also provide a request processing device for implementing the request processing method involved above. The implementation solutions provided by this device for solving problems are similar to the implementation solutions recorded in the above - mentioned method. Therefore, the specific limitations in one or more embodiments of the request processing device provided below can refer to the limitations on the request processing method in the above text, and will not be elaborated here.

[0142] In one embodiment, as Figure 9 shown, a request processing device is provided, including: a first acquisition module 11, a determination module 12, and a sending module 13, where:

[0143] The first acquisition module 11 is configured to acquire control information of an input / output (IO) request to be processed from a preset shared memory; the IO request to be processed is generated for a virtual machine corresponding to a physical machine.

[0144] The determination module 12 is configured to determine a first identifier of a storage sub - volume corresponding to the IO request to be processed based on the control information.

[0145] The sending module 13 is configured to send the IO request to be processed to the storage sub - volume according to the control information and the first identifier.

[0146] The request processing device provided in this embodiment can execute the above - mentioned method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0147] In one embodiment, the control information includes an offset address and a data length corresponding to the IO request to be processed. As Figure 10 shown, the above - mentioned sending module 13 includes: a determination unit 131, a first sending unit 132, and a second sending unit 133, where:

[0148] The determination unit 131 is configured to determine whether to split - process the IO request to be processed according to the offset address, the data length, a preset strip width of the storage sub - volume, and a preset strip size.

[0149] The first sending unit 132 is configured to, if so, determine sub - IO requests corresponding to the IO request to be processed according to the offset address, the data length, the strip width, and the strip size, and send the sub - IO requests to the storage sub - volume.

[0150] The second sending unit 133 is configured to, if not, send the IO request to be processed to the storage sub - volume according to the first identifier.

[0151] The request processing device provided in this embodiment can execute the above - mentioned method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0152] In one embodiment, please continue to refer to Figure 10 ..., the above - mentioned first sending unit 132 is specifically configured to split - process the IO request to be processed according to the offset address, the data length, the strip width, and the strip size to obtain sub - IO requests; determine a second identifier of the storage sub - volume corresponding to the sub - IO requests according to the first identifier, the strip width, and the number of sub - IO requests; and send the sub - IO requests to the storage sub - volume corresponding to the second identifier according to the second identifier.

[0153] The request processing device provided in this embodiment can execute the above - mentioned method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0154] In one embodiment, please continue to refer toFigure 10 Specifically, the first sending unit 132 is configured to merge the sub-IO requests in each sending queue according to the strip size, the offset address, and the data length to obtain the merged sub-IO requests; obtain the processable quantity of the IO requests of the storage sub-volume corresponding to the second identifier; and when the processable quantity is greater than the quantity of the merged sub-IO requests, send the merged sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0155] The request processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0156] In one embodiment, if the processing policy is to split the to-be-processed IO requests, please continue to refer to Figure 10 Specifically, the first sending unit 132 is configured to select at least two sub-IO requests with consecutive offset addresses and the sum of the data lengths less than or equal to the strip size from the sending queue, and merge the at least two sub-IO requests to obtain the merged sub-IO requests.

[0157] The request processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0158] In one embodiment, please continue to refer to Figure 10 Specifically, the first sending unit 132 is configured to: if the strip width is greater than the number of sub-IO requests, determine the first identifier as the second identifier; if the strip width is less than or equal to the number of sub-IO requests, determine the third identifier of the adjacent storage sub-volume of the storage sub-volume corresponding to the first identifier according to the number of sub-IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

[0159] The request processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0160] In one embodiment, please continue to refer to Figure 10 Specifically, the device further includes: a second obtaining module 14, where:

[0161] The second obtaining module 14 is configured to run the virtual machine process corresponding to the virtual machine, obtain the free memory from the memory of the physical machine, and determine the free memory as the shared memory.

[0162] Optionally, the capacity of the shared memory is variable.

[0163] The request processing device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0164] In one embodiment, the shared memory includes buffer pages. Please continue to refer to Figure 10 , the above device further includes: a first storage module 15 and a third acquisition module 16, where:

[0165] The first storage module 15 is configured to store the to-be-processed IO request in the memory of the physical machine when receiving the to-be-processed IO request.

[0166] The third acquisition module 16 is configured to run a virtual machine process to call a preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in the buffer page.

[0167] The request processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0168] In one embodiment, the shared memory further includes data exchange pages. Please continue to refer to Figure 10 , the above device further includes: a second storage module 17, where:

[0169] The second storage module 17 is configured to store the processing data corresponding to the to-be-processed IO request of the running virtual machine process in the data exchange page if the processing type of the to-be-processed IO request is a write process.

[0170] The request processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0171] Each module in the above request processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0172] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data of the IO requests to be processed. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a data processing method.

[0173] Those skilled in the art can understand that Figure 11 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0174] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0175] Obtain the control information of the input / output IO request to be processed from a preset shared memory; the IO request to be processed is generated for the virtual machine corresponding to the physical machine;

[0176] Based on the control information, determine the first identifier of the storage sub-volume corresponding to the IO request to be processed;

[0177] According to the control information and the first identifier, send the IO request to be processed to the storage sub-volume.

[0178] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0179] According to the offset address determination, data length, preset strip width and preset strip size of the storage sub-volume, determine whether to split the IO request to be processed;

[0180] If so, according to the offset address, data length, strip width and strip size, determine the sub-IO requests corresponding to the IO request to be processed, and send the sub-IO requests to the storage sub-volume;

[0181] Otherwise, send the to-be-processed IO request to the storage sub - volume according to the first identifier.

[0182] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0183] Split - process the to - be - processed IO request according to the offset address, data length, stripe width, and stripe size to obtain sub - IO requests;

[0184] Determine the second identifier of the storage sub - volume corresponding to the sub - IO request according to the first identifier, stripe width, and the number of sub - IO requests;

[0185] Send the sub - IO request to the storage sub - volume corresponding to the second identifier according to the second identifier.

[0186] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0187] Merge - process the sub - IO requests in each send queue according to the stripe size, offset address, and data length to obtain the merged sub - IO requests;

[0188] Obtain the processable quantity of the IO requests of the storage sub - volume corresponding to the second identifier;

[0189] When the processable quantity is greater than the number of the merged sub - IO requests, send the merged sub - IO requests to the storage sub - volume corresponding to the second identifier according to the second identifier.

[0190] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0191] Select at least two sub - IO requests with consecutive offset addresses and the sum of data lengths less than or equal to the stripe size from the send queue, and perform merge - processing on the at least two sub - IO requests to obtain the merged sub - IO requests after merge - processing.

[0192] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0193] If the stripe width is greater than the number of sub - IO requests, determine the first identifier as the second identifier;

[0194] If the stripe width is less than or equal to the number of sub - IO requests, determine the third identifier of the adjacent storage sub - volume of the storage sub - volume corresponding to the first identifier according to the number of sub - IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

[0195] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0196] Run the virtual machine process corresponding to the virtual machine, obtain free memory from the memory of the physical machine, and determine the free memory as shared memory.

[0197] Optionally, the capacity of the shared memory is variable.

[0198] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0199] In the case of receiving a to-be-processed IO request, store the to-be-processed IO request in the memory of the physical machine;

[0200] Run the virtual machine process to call a preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in a buffer page.

[0201] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0202] If the processing type of the to-be-processed IO request is a write process, then run the virtual machine process to store the processing data corresponding to the to-be-processed IO request in a data exchange page.

[0203] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0204] Obtain the control information of the to-be-processed input / output IO request from a preset shared memory; the to-be-processed IO request is generated for the virtual machine corresponding to the physical machine;

[0205] Based on the control information, determine the first identifier of the storage subvolume corresponding to the to-be-processed IO request;

[0206] According to the control information and the first identifier, send the to-be-processed IO request to the storage subvolume.

[0207] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0208] According to the offset address, data length, stripe width preset for the storage subvolume, and preset stripe size, determine whether to split the to-be-processed IO request;

[0209] If so, according to the offset address, data length, stripe width, and stripe size, determine the sub-IO requests corresponding to the to-be-processed IO request, and send the sub-IO requests to the storage subvolume;

[0210] If not, send the to-be-processed IO request to the storage subvolume according to the first identifier.

[0211] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0212] According to the offset address, data length, stripe width, and stripe size, split and process the to-be-processed IO request to obtain sub-IO requests;

[0213] According to the first identifier, stripe width, and the number of sub-IO requests, determine the second identifier of the storage sub-volume corresponding to the sub-IO requests;

[0214] Send the sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0215] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0216] According to the stripe size, offset address, and data length, merge the sub-IO requests in each send queue to obtain merged sub-IO requests;

[0217] Obtain the processable quantity of the IO requests of the storage sub-volume corresponding to the second identifier;

[0218] When the processable quantity is greater than the number of merged sub-IO requests, send the merged sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0219] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0220] Select at least two sub-IO requests with consecutive offset addresses and the sum of data lengths less than or equal to the stripe size from the send queue, and merge the at least two sub-IO requests to obtain merged sub-IO requests after merge processing.

[0221] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0222] If the stripe width is greater than the number of sub-IO requests, determine the first identifier as the second identifier;

[0223] If the stripe width is less than or equal to the number of sub-IO requests, determine the third identifier of the adjacent storage sub-volume of the storage sub-volume corresponding to the first identifier according to the number of sub-IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

[0224] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0225] Run the virtual machine process corresponding to the virtual machine, obtain free memory from the memory of the physical machine, and determine the free memory as shared memory.

[0226] Optionally, the capacity of the shared memory is variable.

[0227] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0228] When a to-be-processed IO request is received, store the to-be-processed IO request in the memory of the physical machine;

[0229] Run a virtual machine process to call a preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in a buffer page.

[0230] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0231] If the processing type of the to-be-processed IO request is a write process, run a virtual process to store the processing data corresponding to the to-be-processed IO request in a data exchange page.

[0232] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0233] Obtain the control information of a to-be-processed input / output (IO) request from a preset shared memory; the to-be-processed IO request is generated for a virtual machine corresponding to the physical machine;

[0234] Based on the control information, determine a first identifier of a storage sub-volume corresponding to the to-be-processed IO request;

[0235] According to the control information and the first identifier, send the to-be-processed IO request to the storage sub-volume.

[0236] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0237] According to an offset address, a data length, a preset strip width of the storage sub-volume, and a preset strip size, determine whether to split the to-be-processed IO request;

[0238] If so, according to the offset address, the data length, the strip width, and the strip size, determine sub-IO requests corresponding to the to-be-processed IO request, and send the sub-IO requests to the storage sub-volume;

[0239] If not, send the to-be-processed IO request to the storage sub-volume according to the first identifier.

[0240] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0241] Split the IO request to be processed according to the offset address, data length, strip width, and strip size to obtain sub-IO requests;

[0242] Determine the second identifier of the storage sub-volume corresponding to the sub-IO request according to the first identifier, strip width, and the number of sub-IO requests;

[0243] Send the sub-IO request to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0244] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0245] Merge the sub-IO requests in each send queue according to the strip size, offset address, and data length to obtain the merged sub-IO requests;

[0246] Obtain the number of IO requests that can be processed for the storage sub-volume corresponding to the second identifier;

[0247] When the number of requests that can be processed is greater than the number of merged sub-IO requests, send the merged sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

[0248] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0249] Select at least two sub-IO requests from the send queue whose offset addresses are consecutive and the sum of the data lengths is less than or equal to the strip size, and merge the at least two sub-IO requests to obtain the merged sub-IO requests.

[0250] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0251] If the strip width is greater than the number of sub-IO requests, determine the first identifier as the second identifier;

[0252] If the strip width is less than or equal to the number of sub-IO requests, determine the third identifier of the adjacent storage sub-volume of the storage sub-volume corresponding to the first identifier according to the number of sub-IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

[0253] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0254] Run the virtual machine process corresponding to the virtual machine, obtain the free memory from the memory of the physical machine, and determine the free memory as the shared memory.

[0255] Optionally, the capacity of the shared memory is variable.

[0256] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0257] When a to-be-processed IO request is received, store the to-be-processed IO request in the memory of the physical machine;

[0258] Run the virtual machine process to call a preset interface, obtain the to-be-processed IO request from the memory of the physical machine through the preset interface, and store the control information of the to-be-processed IO request in a buffer page.

[0259] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0260] If the processing type of the to-be-processed IO request is a write process, run the virtual process to store the processing data corresponding to the to-be-processed IO request in a data exchange page.

[0261] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. 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), magnetoresistive 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 be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0262] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0263] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A request processing method, characterized in that The method includes: Obtaining control information of a to-be-processed input / output (IO) request from a preset shared memory; the to-be-processed IO request is generated by a virtual machine corresponding to a physical machine; Determining a first identifier of a storage sub-volume corresponding to the to-be-processed IO request based on the control information; Sending the to-be-processed IO request to the storage sub-volume according to the control information and the first identifier.

2. The method according to claim 1, wherein The control information includes an offset address and a data length corresponding to the to-be-processed IO request; the step of sending the to-be-processed IO request to the storage sub-volume according to the control information and the first identifier includes: Determining whether to split the to-be-processed IO request according to the offset address, the data length, a preset strip width, and a preset strip size of the storage sub-volume; If so, determining sub-IO requests corresponding to the to-be-processed IO request according to the offset address, the data length, the strip width, and the strip size, and sending the sub-IO requests to the storage sub-volume; If not, sending the to-be-processed IO request to the storage sub-volume according to the first identifier.

3. The method according to claim 2, characterized in that, The step of determining sub-IO requests corresponding to the to-be-processed IO request according to the offset address, the data length, the strip width, and the strip size, and sending the sub-IO requests to the storage sub-volume includes: Splitting the to-be-processed IO request according to the offset address, the data length, the strip width, and the strip size to obtain the sub-IO requests; Determining a second identifier of a storage sub-volume corresponding to the sub-IO requests according to the first identifier, the strip width, and the number of the sub-IO requests; Sending the sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

4. The method according to claim 3, characterized in that, The step of sending the sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier includes: Merging the sub-IO requests in each sending queue according to the strip size, the offset address, and the data length to obtain merged sub-IO requests; Obtaining the number of processable IO requests of the storage sub-volume corresponding to the second identifier; When the number of processable requests is greater than the number of the sub-IO requests, sending the merged sub-IO requests to the storage sub-volume corresponding to the second identifier according to the second identifier.

5. The method according to claim 4, characterized in that, The step of merging the sub-IO requests in each sending queue according to the strip size, the offset address, and the data length to obtain merged sub-IO requests includes: Selecting at least two sub-IO requests with consecutive offset addresses and the sum of the data lengths less than or equal to the strip size from the sending queue, and merging the at least two sub-IO requests to obtain merged sub-IO requests after the merging process.

6. The method according to any one of claims 3-5, characterized in that The step of determining a second identifier of a storage sub-volume corresponding to the sub-IO requests according to the first identifier, the strip width, and the number of the sub-IO requests includes: If the strip width is greater than the number of the sub-IO requests, determine the first identifier as the second identifier; If the strip width is less than or equal to the number of the sub-IO requests, determine a third identifier of an adjacent storage sub-volume of the storage sub-volume corresponding to the first identifier according to the number of the sub-IO requests and the first identifier, and determine the first identifier and the third identifier as the second identifier.

7. The method according to claim 1, characterized in that, The method further includes: Running a virtual machine process corresponding to the virtual machine, obtaining free memory from the memory of the physical machine, and determining the free memory as the shared memory.

8. The method according to claim 7, characterized in that, The capacity of the shared memory is variable.

9. The method according to claim 8, wherein The shared memory includes buffer pages; the method further includes: When receiving the to-be-processed IO request, storing the to-be-processed IO request in the memory of the physical machine; Running the virtual machine process to call a preset interface, obtaining the to-be-processed IO request from the memory of the physical machine through the preset interface, and storing control information of the to-be-processed IO request in the buffer pages.

10. The method according to claim 9, characterized in that, The shared memory further includes data exchange pages; the method further includes: If the processing type of the to-be-processed IO request is a write process, running the virtual machine process to store processing data corresponding to the to-be-processed IO request in the data exchange pages.

11. A request processing device, characterized in that, The apparatus includes: A first obtaining module, configured to obtain control information of a to-be-processed input / output IO request from a preset shared memory; the to-be-processed IO request is generated by a virtual machine corresponding to a physical machine; A determining module, configured to determine a first identifier of a storage sub-volume corresponding to the to-be-processed IO request based on the control information; A sending module, configured to send the to-be-processed IO request to the storage sub-volume according to the control information and the first identifier.

12. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.