IO data processing method and apparatus, device, and medium
By performing preset classification and aggregation processing on IO data blocks, using CNC separation architecture and battery-guaranteed memory to optimize large data block writing, and combining message cluster aggregation technology to reduce high-frequency operations of small data blocks, it solves the problem of large data block delays and small data blocks. The problem of high-frequency operation of data blocks improves the performance of storage systems in mixed IO scenarios.
Patent Information
- Application Number
- PCT/CN2024/079068
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-07
- Filing Date
- 2024-02-28
- Publication Date
- 2024-09-12
AI Technical Summary
In the mixed IO scenario of large data blocks and small data blocks, the existing CNC separation architecture causes delays in the writing process of large data blocks and interference from frequent and high-frequency operations of small data block writing, which affects the performance of the storage system.
Use preset classification standards to classify IO data blocks. If they meet a certain standard, they will be processed as large IO data blocks for CNC separation, pulled to battery-guaranteed memory, and asynchronously placed on the disk; if they do not meet the standard, small IO messages will be aggregated. Send message clusters to reduce high-frequency operations.
Reduce the latency of the large data block write process, improve the storage system performance in mixed IO scenarios of large data blocks and small data blocks, and improve iops performance.
Smart Images

Figure CN2024079068_12092024_PF_FP_ABST
Abstract
Description
IO data processing method, device, equipment and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 7, 2023, with application number 202310208165.7 and application name “IO data processing method, device, equipment and medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of distributed storage technology, and in particular to IO data processing methods, devices, equipment and media. Background Art
[0004] The CNC separation architecture is a novel data flow architecture developed based on the master-forwarding data flow method, maximizing the cluster's external service bandwidth. In this architecture, data and control flows follow separate paths: control flows follow the master-forwarding process, while data flows follow the unilateral RDMA (Remote Direct Memory Access) process. Large data blocks typically flow through the CNC separation architecture to reduce bandwidth usage. Control messages, due to their smaller size, do not benefit from CNC separation and therefore continue to flow through the master-forwarding process.
[0005] Currently, most business scenarios involve a mix of large and small data blocks in I / O (input / output) scenarios. The CNC separation process uses a two-stage submission design based on consistency considerations. This design requires the primary DSD (data storage device service) to first confirm the data, leading to a high number of interactions and impacting large-block writes.
[0006] Summary of the Invention
[0007] In view of this, the purpose of this application is to provide an IO data processing method, apparatus, device, and medium that can reduce the latency in the large data block write process, thereby improving the performance of storage systems in mixed IO scenarios with large and small data blocks. The specific solution is as follows:
[0008] In a first aspect, the present application discloses an IO data processing method, which is applied to a client and includes:
[0009] Classify IO data blocks based on preset classification standards;
[0010] If the size of the IO data block reaches a preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service;
[0011] Obtain the write success information returned by the main data storage device service; wherein, the write success information is the information that the main data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the data storage device service; and each data storage device service asynchronously performs disk write operations on large IO data blocks.
[0012] Optionally, also include:
[0013] If the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, and the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent.
[0014] Optionally, an IO message carrying a small IO data block is aggregated with multiple consecutive IO messages to obtain a message cluster, and the message cluster is sent, including:
[0015] Placing the IO message carrying the small IO data block in the message queue of the first communication connection;
[0016] Aggregating the IO message carrying the small IO data block with a plurality of consecutive adjacent IO messages in the message queue to obtain a message cluster, and sending the message cluster based on the first communication connection;
[0017] The first communication connection is a communication connection between the client and the primary data storage device service.
[0018] Optionally, also include:
[0019] Get the number of aggregated messages;
[0020] Accordingly, the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, including:
[0021] Based on the aggregate message quantity parameter, the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster.
[0022] Optionally, an IO message carrying a small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, including:
[0023] Serialize the IO message carrying the small IO data block with multiple consecutive IO messages to obtain the byte stream corresponding to each IO message;
[0024] Aggregate the byte stream corresponding to each IO message into a message cluster.
[0025] Optionally, the power-saving memory is the memory registered to the RDMA network card.
[0026] Optionally, the power-saving memory is an NVDIMM or a memory including a BBU and DRAM.
[0027] Optionally, the power-saving memory further stores object operation information corresponding to the large IO data block, so that each data storage device service can perform data recovery operations based on the object operation information.
[0028] Optionally, before classifying the IO data blocks based on the preset classification criteria, the following steps are further included:
[0029] The classification threshold value input by the user is obtained, and the classification threshold value is determined as a preset classification standard.
[0030] Optionally, before classifying the IO data blocks based on the preset classification criteria, the following steps are further included:
[0031] Get the erasure stripe size;
[0032] A classification standard is set based on the erasure stripe size to obtain a preset classification standard.
[0033] In a second aspect, the present application discloses an IO data processing method, which is applied to a primary data storage device service, comprising:
[0034] Obtaining a control message sent by the client; wherein the control message is a control message sent by the client to each data storage device service for classifying an IO data block based on a preset classification standard, classifying the IO data block as a large IO data block if the size of the IO data block meets the preset classification standard; each data storage device service includes a master data storage device service and a slave data storage device service;
[0035] Pull large IO data blocks to local power-saving memory;
[0036] When the pull is successful and the pull success information sent by the data storage device service is received, the write success information is directly returned to the client; the pull success information indicates that the large IO data block is successfully pulled from the data storage device service to its own power-saving memory; and each data storage device service asynchronously writes the large IO data block to the disk.
[0037] Optionally, also include:
[0038] Obtain a message cluster sent by the client; wherein the message cluster is obtained by aggregating multiple consecutive and adjacent IO messages carrying small IO data blocks, and the small IO data blocks are IO data blocks whose size does not meet the preset classification standard;
[0039] Split the message cluster to obtain individual IO messages.
[0040] Optionally, obtain the message cluster sent by the client, including:
[0041] A message cluster sent by the client is obtained based on the first communication connection; wherein the first communication connection is the communication connection between the client and the main data storage device service, and the message cluster is obtained by aggregating multiple consecutive adjacent IO messages carrying small IO data blocks in the message queue of the first communication connection.
[0042] Optionally, after splitting the message cluster to obtain individual IO messages, the following steps are further included:
[0043] Placing each IO message in the message queue of the second communication connection;
[0044] A plurality of consecutive and adjacent IO messages in the message queue are aggregated to obtain a message cluster, and the message cluster is sent to the slave data storage device service based on the second communication connection.
[0045] Optionally, a plurality of consecutive adjacent IO messages in the message queue are aggregated to obtain a message cluster, including:
[0046] Serialize multiple consecutive IO messages in the message queue to obtain the byte stream corresponding to each IO message;
[0047] Aggregate the byte stream corresponding to each IO message into a message cluster.
[0048] Optionally, also include:
[0049] Get the number of aggregated messages;
[0050] Accordingly, multiple consecutive and adjacent IO messages in the message queue are aggregated to obtain a message cluster, including:
[0051] A plurality of consecutive and adjacent IO messages in the message queue are aggregated based on an aggregate message quantity parameter to obtain a message cluster.
[0052] Optionally, the preset classification standard is a preset multiple of the erasure stripe size.
[0053] In a third aspect, the present application discloses an IO data processing device, which is applied to a client and includes:
[0054] An IO data block classification module is used to classify IO data blocks based on a preset classification standard; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block;
[0055] a control message sending module configured to send a control message to each data storage device service if the IO data block classification module classifies the IO data block as a large IO data block, so that each data storage device service pulls the large IO data block to a local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service;
[0056] The write success information acquisition module is used to obtain the write success information returned by the main data storage device service; wherein, the write success information is the information that the main data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the data storage device service; and each data storage device service asynchronously performs disk write operations on large IO data blocks.
[0057] In a fourth aspect, the present application discloses an electronic device, including a memory and a processor, wherein:
[0058] Memory, used to store computer programs;
[0059] The processor is used to execute the computer program to implement the aforementioned IO data processing method.
[0060] In a fifth aspect, the present application discloses a computer non-volatile readable storage medium for storing a computer program, wherein the computer program implements the aforementioned IO data processing method when executed by a processor.
[0061] It can be seen that the present application classifies IO data blocks based on preset classification standards; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein, each data storage device service includes a master data storage device service and a slave data storage device service; obtains the write success information returned by the master data storage device service; wherein, the write success information is the master data storage device service itself successfully pulling, and directly returns to the client after receiving the pull success information sent by the slave data storage device service; and, each data storage device service asynchronously performs disk write operations on large IO data blocks. That is, the present application adopts a digital control separation method for large IO data blocks. After the client classifies the IO data blocks into large IO data blocks, it sends a control message to each data storage device service. Each data storage device service pulls the large IO data blocks to the local power-saving memory. The use of the power-saving memory ensures that the data is not lost. The master data storage device service pulls the data successfully itself, and after receiving the pull success information sent by the slave data storage device service, it can directly return the write success information to the client. After the pull is successful, there is no need to wait for the master data storage device service to send a commit action to the slave data storage device service to write the data to the disk and then return the write success information. Each data storage device service asynchronously writes the large IO data blocks to the disk. In this way, the delay in the large data block write process can be reduced, thereby improving the storage system performance in the mixed IO scenario of large data blocks and small data blocks.
[0062] Moreover, in the present application, if the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, and the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent. In this way, for small IO data blocks, message aggregation is performed and message clusters are sent when sending, thereby reducing additional high-frequency operation interference and improving iops performance, thereby improving the storage system performance in mixed IO scenarios of large data blocks and small data blocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0064] FIG1 is a flow chart of an IO data processing method disclosed in an embodiment of the present application;
[0065] FIG2 is a schematic diagram of a specific large IO data block submission disclosed in an embodiment of the present application;
[0066] FIG3 is a schematic diagram of a specific message aggregation disclosed in an embodiment of the present application;
[0067] FIG4 is another IO data processing method disclosed in an embodiment of the present application;
[0068] FIG5 is a schematic diagram of an IO data processing device disclosed in an embodiment of the present application;
[0069] FIG6 is a structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0071] At present, most business scenarios are IO scenarios with a mixture of large data blocks and small data blocks, and the numerical control separation process adopts a two-stage submission design based on consistency considerations, that is, the main DSD first confirms the data, and the overall interaction process is relatively large, which will have an impact on large block writes. Small data blocks look at the iops (i.e., Input / Output Operations Per Second, the number of reads and writes per second) performance, and still follow the data forwarding process. Frequent event notifications in communication will cause frequent context switching, and the advantages of RDMA cannot be brought into play. High-frequency non-data additional operations cause performance degradation. To this end, the present application provides an IO data processing method, device, equipment and medium, which can reduce the delay in the large data block write process, reduce the additional high-frequency operation interference in the small data block write process, and improve the iops performance, thereby improving the storage system performance in the mixed IO scenario of large data blocks and small data blocks.
[0072] As shown in FIG1 , an embodiment of the present application discloses an IO data processing method, which is characterized by being applied to a client and comprising:
[0073] Step S11: classifying the IO data blocks based on a preset classification standard.
[0074] The IO data block is a data block processed by a single IO operation.
[0075] In one embodiment, a classification threshold input by a user may be obtained and determined as a preset classification standard. That is, the user may directly set a threshold as the classification standard.
[0076] In another embodiment, the erasure stripe size may be obtained, and a classification standard may be set based on the erasure stripe size to obtain a preset classification standard. Specifically, the preset classification standard may be obtained by multiplying the erasure stripe size by a preset multiple, for example, 2 times the erasure stripe size.
[0077] Step S12: If the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service.
[0078] Among them, the power-saving memory is the memory registered to the RDMA network card. In addition, the power-saving memory is an NVDIMM (non-volatile dual in-line memory module) or a memory including a BBU (battery backup unit, backup lithium battery) and DRAM (dynamic random access memory). In a specific implementation, the storage server is configured with a power-saving memory, and the power-saving memory is used to register the RDMA memory when initializing the communication layer. Each data storage device service runs on the storage server. It can include multiple slave data storage device services.
[0079] In addition, the power-saving memory also saves the object operation information corresponding to the large IO data block, so that each data storage device service can perform data recovery operations based on the object operation information. Specifically, after power is lost and then powered on again, data recovery operations are performed based on the object operation information. The object operation information may include PG INFO (i.e. placement group), object ID (i.e. identifier), operation code, object offset, length, and data. At the moment of power failure, the non-volatile memory data is stored in the local system disk file according to the power-saving memory interface, that is, the data in the power-saving memory is serialized into the file of the local system disk SSD (i.e. Solid State Disk). After power is restored, the system disk file is scanned to load the power-saving memory data. After the data is loaded, it is played back according to the data in the power-saving memory to continue the action that has not been written to the disk.
[0080] Step S13: Obtain the write success information returned by the main data storage device service; wherein, the write success information is the information that the main data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the data storage device service; and each data storage device service asynchronously performs disk write operations on large IO data blocks.
[0081] In a specific embodiment, if there are multiple slave data storage device services, the master data storage device service directly returns a write success message to the client after receiving pull success messages from all slave data storage device services. The master data storage device service sends a commit command to the slave data storage device service, and the slave data storage device service performs the write operation.
[0082] Furthermore, if the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent.
[0083] It is understandable that each of the multiple consecutive IO messages also carries a corresponding small IO data block. Furthermore, in an embodiment of the present application, the IO message carrying the small IO data block can be placed in the message queue of the first communication connection; the IO message carrying the small IO data block in the message queue is aggregated with the multiple consecutive IO messages to obtain a message cluster, and the message cluster is sent based on the first communication connection; wherein the first communication connection is the communication connection between the client and the primary data storage device service.
[0084] Furthermore, a parameter for the number of aggregated messages can be obtained. Based on this parameter, IO messages carrying small IO data blocks are aggregated with multiple consecutive IO messages to form a message cluster. The parameter for the number of aggregated messages can be an empirical value, such as 20. After receiving the message cluster, the primary data storage device service splits it.
[0085] Furthermore, in a specific implementation, an IO message carrying a small IO data block can be serialized with multiple consecutive IO messages to obtain a byte stream corresponding to each IO message. The byte streams corresponding to each IO message are then aggregated into a message cluster. In this way, each message is serialized into a continuous byte stream, and multiple messages are aggregated to form a large byte stream. The underlying communication is transmitted in the form of a message stream.
[0086] That is, the embodiment of the present application is aimed at the mixed IO scenario of large data blocks and small data blocks. It optimizes large data blocks and small data blocks respectively, so as to achieve the purpose of improving the performance of the mixed IO scenario of large data blocks and small data blocks under the CNC separation architecture.
[0087] In one implementation, cluster I / O data blocks can be categorized by size into large I / O data blocks and small I / O data blocks. The categorization criteria are configurable, with blocks less than 2 times the erasure stripe being classified as small I / O data blocks and blocks greater than or equal to 2 times the erasure stripe being classified as large I / O data blocks. Large I / O data blocks undergo numerical control separation, while small I / O data blocks undergo non-numerical control separation.
[0088] For large IO data blocks: In the prior art, CNC separation generally adopts a two-stage submission. After the data on each slave DSD is unilaterally pulled to the local, it first confirms the success of the pull to the master DSD, and then the master DSD uniformly sends a commit action to the slave to write to the disk. After the disk is successfully written, it returns to the master DSD, and then the master DSD returns it to the client. The embodiment of the present application optimizes the existing technology and uses power-saving memory (such as NVDIMM or BBU+DRAM) to register RDMA memory. After the slave DSD is unilaterally pulled to the local, the pull success is fed back to the master DSD. Since the power-saving memory is non-volatile, the master DSD can directly return the write success to the client, and the back-end, that is, each DSD, writes the data to the SSD asynchronously. Specifically, the storage server configures the power-saving memory; the power-saving memory is used to register the RDMA memory when initializing the communication layer; and the data is pulled into the power-saving memory during unilateral communication. For example, see Figure 2, which is a specific schematic diagram of large IO data block submission disclosed in the embodiment of the present application. Accelerate the main DSD's confirmation to the client and add asynchronous submission actions. In addition to storing data, the power-saving memory also stores object operation information for the current data, facilitating the recovery of data operations after a power outage and power cycle. Object operation information can include PG INFO, object ID, operation code, object offset, length, and data. At the moment of power outage, the non-volatile memory data is stored in the local system disk file according to the power-saving memory interface. In other words, the data in the power-saving memory is serialized into a file on the SSD (local system disk). After power is restored, the system disk file is scanned to load the power-saving memory data. After the data is loaded, playback is performed according to the data in the power-saving memory, continuing the actions that were not written to the disk.
[0089] Regarding small IO data blocks: In the prior art, the additional high-frequency operations generated during the communication process are the main factor causing performance degradation. When concurrency is high, there will generally be accumulated messages in the message queue of each connection. When this situation occurs, no matter how much concurrency is increased, the performance improvement is generally not significant. In the embodiment of the present application, for the message queue of a certain connection at the communication layer, if there are a large number of continuous small IO messages when sending messages, a message-level merge action is performed, and the messages are sent, and the peer end performs centralized splitting processing. Specifically, for a specific connection, if there are multiple small messages waiting to be sent in the queue, they can be aggregated to maintain order. The constraints are that the data block does not exceed the specified size and continuous adjacent messages are aggregated. The small messages are aggregated into message clusters. For example, see Figure 3, which is a specific message aggregation schematic diagram disclosed in the embodiment of the present application. n is the number of aggregated messages, that is, messages 1 to n can be aggregated into a message cluster, wherein each message is a continuous byte stream after serialization, and multiple messages are aggregated to form a large byte stream. The underlying communication is transmitted in the form of a message stream. The peer end reversely splits the message cluster according to the aggregation rules.
[0090] In this way, by optimizing the interaction mechanism of the CNC separation architecture, adding asynchronous processing to reduce latency and improve large bandwidth performance; by aggregating small messages, reducing additional high-frequency operation interference, improving iops performance, and overall improving performance in mixed IO scenarios of large and small files.
[0091] It can be seen that the embodiment of the present application classifies IO data blocks based on preset classification standards; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein, each data storage device service includes a master data storage device service and a slave data storage device service; obtains the write success information returned by the master data storage device service; wherein, the write success information is the master data storage device service itself successfully pulling, and directly returns to the client after receiving the pull success information sent by the slave data storage device service; and, each data storage device service asynchronously performs disk write operations on the large IO data block. That is, the present application adopts a digital control separation method for large IO data blocks. After the client classifies the IO data blocks into large IO data blocks, it sends a control message to each data storage device service. Each data storage device service pulls the large IO data blocks to the local power-saving memory. The use of the power-saving memory ensures that the data is not lost. The master data storage device service pulls the data successfully itself, and after receiving the pull success information sent by the slave data storage device service, it can directly return the write success information to the client. After the pull is successful, there is no need to wait for the master data storage device service to send a commit action to the slave data storage device service to write the data to the disk and then return the write success information. Each data storage device service asynchronously writes the large IO data blocks to the disk. In this way, the delay in the large data block write process can be reduced, thereby improving the storage system performance in the mixed IO scenario of large data blocks and small data blocks.
[0092] Furthermore, in an embodiment of the present application, if the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, and the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent. In this way, for small IO data blocks, message aggregation is performed, and message clusters are sent when sending, thereby reducing additional high-frequency operation interference, improving iops performance, and thereby improving storage system performance in mixed IO scenarios of large data blocks and small data blocks.
[0093] As shown in FIG4 , an embodiment of the present application discloses an IO data processing method, which is applied to a primary data storage device service, including:
[0094] Step S21: Obtaining a control message sent by the client; wherein the control message is a control message sent by the client to each data storage device service for classifying an IO data block based on a preset classification standard, classifying the IO data block as a large IO data block if the size of the IO data block meets the preset classification standard; each data storage device service includes a master data storage device service and a slave data storage device service;
[0095] The preset classification standard may be a preset multiple of the erasure stripe size, for example, 2 times the erasure stripe size.
[0096] Step S22: Pull the large IO data block to the local power-saving memory.
[0097] The power-retention memory is the memory registered with the RDMA network card. Furthermore, the power-retention memory is an NVDIMM or a memory consisting of a BBU and DRAM. In a specific embodiment, the storage server is configured with the power-retention memory and uses it to register the RDMA memory during communication layer initialization. Each data storage device service runs on the storage server. Multiple slave data storage device services may be included.
[0098] In addition, the power-saving memory also saves the object operation information corresponding to the large IO data blocks, so that each data storage device service can perform data recovery operations based on the object operation information. Specifically, after power failure and power on again, data recovery operations are performed based on the object operation information. The object operation information may include PG INFO, object ID, operation code, object offset, length, and data. At the moment of power failure, the non-volatile memory data is stored in the local system disk file according to the power-saving memory interface, that is, the data in the power-saving memory is serialized into the file of the local system disk SSD. After power is restored, the system disk file is scanned to load the power-saving memory data. After the data is loaded, it is played back according to the data in the power-saving memory to continue the action that has not been written to the disk.
[0099] It is understandable that the slave data storage device service also pulls large IO data blocks into its own power-saving memory.
[0100] Step S23: When the pull is successful and the pull success information sent from the data storage device service is received, the write success information is directly returned to the client; wherein, the pull success information indicates that the large IO data block is successfully pulled from the data storage device service to its own power-saving memory; and, each data storage device service asynchronously writes the large IO data block to the disk.
[0101] In addition, the embodiment of the present application can also obtain a message cluster sent by the client; wherein, the message cluster is obtained by aggregating multiple consecutive adjacent IO messages carrying small IO data blocks, and the small IO data block is an IO data block whose size does not meet the preset classification standard; the message cluster is split to obtain each IO message.
[0102] Among them, obtaining the message cluster sent by the client includes: obtaining the message cluster sent by the client based on the first communication connection; wherein the first communication connection is the communication connection between the client and the main data storage device service, and the message cluster is obtained by aggregating multiple consecutive adjacent IO messages carrying small IO data blocks in the message queue of the first communication connection.
[0103] Furthermore, after splitting the message cluster to obtain individual IO messages, embodiments of the present application also place each IO message in a message queue of a second communication connection; aggregate multiple consecutive IO messages in the message queue to obtain a message cluster, and send the message cluster to the slave data storage device service based on the second communication connection. Specifically, serialization operations are performed on the multiple consecutive IO messages in the message queue to obtain a byte stream corresponding to each IO message; and the byte stream corresponding to each IO message is aggregated into a message cluster.
[0104] Furthermore, the embodiment of the present application can obtain an aggregate message quantity parameter; based on the aggregate message quantity parameter, multiple consecutive adjacent IO messages in the message queue are aggregated to obtain a message cluster.
[0105] It can be seen that the embodiment of the present application adopts a digital control separation method for large IO data blocks. After the client classifies the IO data blocks into large IO data blocks, it sends a control message to each data storage device service. Each data storage device service pulls the large IO data blocks to the local power-saving memory. The use of the power-saving memory ensures that the data is not lost. The main data storage device service pulls the data successfully itself, and after receiving the pull success information sent by the slave data storage device service, it can directly return the write success information to the client. After the pull is successful, there is no need to wait for the main data storage device service to send a commit action to the slave data storage device service to write the data to the disk and then return the write success information. Each data storage device service asynchronously writes the large IO data blocks to the disk. In this way, the delay in the large data block write process can be reduced, thereby improving the storage system performance in the mixed IO scenario of large data blocks and small data blocks.
[0106] Furthermore, in an embodiment of the present application, multiple consecutive adjacent IO messages carrying small IO data blocks are aggregated to obtain a message cluster, and the message cluster is sent. In this way, for small IO data blocks, message aggregation is performed and a message cluster is sent when sending, thereby reducing additional high-frequency operation interference and improving iops performance, thereby improving storage system performance in mixed IO scenarios of large data blocks and small data blocks.
[0107] As shown in FIG5 , an embodiment of the present application discloses an IO data processing device, which is applied to a client and includes:
[0108] The IO data block classification module 11 is used to classify the IO data blocks based on a preset classification standard; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block;
[0109] a control message sending module 12 configured to send a control message to each data storage device service if the IO data block classification module classifies the IO data block as a large IO data block, so that each data storage device service pulls the large IO data block to a local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service;
[0110] The write success information acquisition module 13 is used to obtain the write success information returned by the main data storage device service; wherein, the write success information is the information that the main data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the data storage device service; and each data storage device service asynchronously performs disk write operations on large IO data blocks.
[0111] The IO data block classification module 11 is further configured to classify the IO data block as a small IO data block if the size of the IO data block does not meet a preset classification standard.
[0112] Correspondingly, the device further includes a small IO data block processing module, which is used to aggregate the IO message carrying the small IO data block with a plurality of consecutive adjacent IO messages to obtain a message cluster, and send the message cluster.
[0113] In a specific implementation, the small IO data block processing module specifically includes:
[0114] A message placement submodule, configured to place an IO message carrying a small IO data block into a message queue of a first communication connection; wherein the first communication connection is a communication connection between a client and a primary data storage device service;
[0115] The message aggregation submodule is used to aggregate the IO messages carrying small IO data blocks in the message queue with multiple consecutive adjacent IO messages to obtain a message cluster;
[0116] The message sending submodule is configured to send a message cluster based on the first communication connection.
[0117] Furthermore, the device also includes:
[0118] An aggregate message quantity parameter acquisition module is used to obtain the aggregate message quantity parameter;
[0119] Correspondingly, the small IO data block processing module is specifically configured to aggregate an IO message carrying a small IO data block with a plurality of consecutive adjacent IO messages based on the aggregated message quantity parameter to obtain a message cluster.
[0120] In addition, the small IO data block processing module is specifically used to serialize the IO message carrying the small IO data block with multiple consecutive adjacent IO messages to obtain the byte stream corresponding to each IO message; and aggregate the byte stream corresponding to each IO message into a message cluster.
[0121] In a specific implementation, the power-saving memory is a memory registered to the RDMA network card.
[0122] In addition, the power-saving memory is NVDIMM or a memory including BBU and DRAM.
[0123] In addition, the power-saving memory also stores object operation information corresponding to large IO data blocks, so that each data storage device service can perform data recovery operations based on the object operation information.
[0124] Furthermore, the device also includes a classification standard determination module;
[0125] In one embodiment, the classification standard determination module is specifically configured to obtain a classification threshold input by a user, and determine the classification threshold as a preset classification standard.
[0126] In another embodiment, the classification standard determination module is specifically configured to: obtain the erasure stripe size; and set the classification standard based on the erasure stripe size to obtain a preset classification standard.
[0127] It can be seen that the embodiment of the present application classifies IO data blocks based on preset classification standards; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein, each data storage device service includes a master data storage device service and a slave data storage device service; obtains the write success information returned by the master data storage device service; wherein, the write success information is the master data storage device service itself successfully pulling, and directly returns to the client after receiving the pull success information sent by the slave data storage device service; and, each data storage device service asynchronously performs disk write operations on the large IO data block. That is, the present application adopts a digital control separation method for large IO data blocks. After the client classifies the IO data blocks into large IO data blocks, it sends a control message to each data storage device service. Each data storage device service pulls the large IO data blocks to the local power-saving memory. The use of the power-saving memory ensures that the data is not lost. The master data storage device service pulls the data successfully itself, and after receiving the pull success information sent by the slave data storage device service, it can directly return the write success information to the client. After the pull is successful, there is no need to wait for the master data storage device service to send a commit action to the slave data storage device service to write the data to the disk and then return the write success information. Each data storage device service asynchronously writes the large IO data blocks to the disk. In this way, the delay in the large data block write process can be reduced, thereby improving the storage system performance in the mixed IO scenario of large data blocks and small data blocks.
[0128] Furthermore, in an embodiment of the present application, if the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, and the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent. In this way, for small IO data blocks, message aggregation is performed, and message clusters are sent when sending, thereby reducing additional high-frequency operation interference, improving iops performance, and thereby improving storage system performance in mixed IO scenarios of large data blocks and small data blocks.
[0129] As shown in Figure 6, an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22; wherein the memory 22 is used to store computer programs; the processor 21 is used to execute computer programs, and the IO data processing method disclosed in the above embodiment.
[0130] For the specific process of the above-mentioned IO data processing method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0131] Furthermore, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.
[0132] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0133] Furthermore, an embodiment of the present application also discloses a computer non-volatile readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the IO data processing method disclosed in the aforementioned embodiment.
[0134] For the specific process of the above-mentioned IO data processing method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0135] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0136] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0137] The IO data processing method, apparatus, device, and medium provided by the present application are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting the present application.
Claims
1. An IO data processing method, characterized in that: Applied to the client, including: Classify IO data blocks based on preset classification criteria; If the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and a control message is sent to each data storage device service so that each data storage device service pulls the large IO data block to the local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service; Obtain write success information returned by the master data storage device service; wherein, the write success information is information that the master data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the slave data storage device service; and, each data storage device service asynchronously performs disk write operations on the large IO data block.
2. The IO data processing method according to claim 1, characterized in that: Also includes: If the size of the IO data block does not meet the preset classification standard, the IO data block is classified as a small IO data block, the IO message carrying the small IO data block is aggregated with multiple consecutive adjacent IO messages to obtain a message cluster, and the message cluster is sent.
3. The IO data processing method according to claim 2, characterized in that: Aggregating the IO message carrying the small IO data block with a plurality of consecutive adjacent IO messages to obtain a message cluster, and sending the message cluster, includes: Placing the IO message carrying the small IO data block in the message queue of the first communication connection; Aggregating the IO message carrying the small IO data block in the message queue with a plurality of consecutive adjacent IO messages to obtain a message cluster, and sending the message cluster based on the first communication connection; The first communication connection is a communication connection between the client and the primary data storage device service.
4. The IO data processing method according to claim 2, characterized in that: Also includes: Get the aggregate message quantity parameter; Accordingly, the IO message carrying the small IO data block is aggregated with a plurality of consecutive adjacent IO messages to obtain a message cluster, including: The IO message carrying the small IO data block is aggregated with a plurality of consecutive adjacent IO messages based on the aggregate message quantity parameter to obtain a message cluster.
5. The IO data processing method according to claim 2, characterized in that: The step of aggregating the IO message carrying the small IO data block with a plurality of consecutive adjacent IO messages to obtain a message cluster includes: The IO message carrying the small IO data block is serialized with a plurality of consecutive adjacent IO messages to obtain a byte stream corresponding to each IO message; Aggregate the byte stream corresponding to each IO message into a message cluster.
6. The IO data processing method according to claim 1, characterized in that: The power-saving memory is the memory registered to the RDMA network card.
7. The IO data processing method according to claim 1, characterized in that: The power-saving memory is an NVDIMM or a memory including a BBU and a DRAM.
8. The IO data processing method according to claim 1, characterized in that: The power-saving memory also stores object operation information corresponding to the large IO data block, so that each data storage device service can perform data recovery operations based on the object operation information.
9. The IO data processing method according to any one of claims 1 to 8, characterized in that: Before classifying the IO data blocks based on the preset classification standard, the method further includes: A classification threshold input by a user is obtained, and the classification threshold is determined as a preset classification standard.
10. The IO data processing method according to any one of claims 1 to 8, characterized in that: Before classifying the IO data blocks based on the preset classification standard, the method further includes: Get the erasure stripe size; A classification standard is set based on the erasure stripe size to obtain the preset classification standard.
11. An IO data processing method, characterized in that: Applicable to primary data storage equipment services, including: Obtaining a control message sent by a client; wherein the control message is a control message sent by the client to classify the IO data blocks based on a preset classification standard, and if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block, and sent to each data storage device service; the each data storage device service includes the master data storage device service and the slave data storage device service; Pull the large IO data block to the local power-saving memory; When the pull is successful and the pull success information sent by the data storage device service is received, the write success information is directly returned to the client; wherein, the pull success information indicates that the large IO data block is successfully pulled from the data storage device service to its own power-saving memory; and, each data storage device service asynchronously writes the large IO data block to the disk.
12. The IO data processing method according to claim 11, characterized in that: Also includes: Acquire a message cluster sent by the client; wherein the message cluster is obtained by aggregating a plurality of consecutive adjacent IO messages carrying small IO data blocks, and the small IO data block is an IO data block whose size does not meet the preset classification standard; The message cluster is split to obtain various IO messages.
13. The IO data processing method according to claim 12, characterized in that: The obtaining of the message cluster sent by the client includes: A message cluster sent by the client is obtained based on a first communication connection; wherein the first communication connection is a communication connection between the client and the primary data storage device service, and the message cluster is obtained by aggregating multiple consecutive adjacent IO messages carrying small IO data blocks in a message queue of the first communication connection.
14. The IO data processing method according to claim 12, characterized in that: After the message cluster is split to obtain the IO messages, the following steps are also included: Placing each IO message in a message queue of the second communication connection; A plurality of consecutive and adjacent IO messages in the message queue are aggregated to obtain a message cluster, and the message cluster is sent to the slave data storage device service based on the second communication connection.
15. The IO data processing method according to claim 14, characterized in that: The step of aggregating a plurality of consecutive adjacent IO messages in the message queue to obtain a message cluster includes: Perform serialization operation on multiple consecutive and adjacent IO messages in the message queue to obtain a byte stream corresponding to each IO message; Aggregate the byte stream corresponding to each IO message into a message cluster.
16. The IO data processing method according to claim 14, characterized in that: Also includes: Get the aggregate message quantity parameter; Accordingly, the step of aggregating a plurality of consecutive adjacent IO messages in the message queue to obtain a message cluster includes: A plurality of consecutive and adjacent IO messages in the message queue are aggregated based on the aggregate message quantity parameter to obtain a message cluster.
17. The IO data processing method according to any one of claims 11 to 16, characterized in that: The preset classification standard is a preset multiple of the erasure stripe size.
18. An IO data processing device, characterized in that: Applied to the client, including: An IO data block classification module is used to classify the IO data blocks based on a preset classification standard; if the size of the IO data block reaches the preset classification standard, the IO data block is classified as a large IO data block; a control message sending module, configured to send a control message to each data storage device service if the IO data block classification module classifies the IO data block as a large IO data block, so that each data storage device service pulls the large IO data block to a local power-saving memory; wherein each data storage device service includes a master data storage device service and a slave data storage device service; A write success information acquisition module is used to obtain the write success information returned by the main data storage device service; wherein the write success information is the information that the main data storage device service itself successfully pulls and directly returns to the client after receiving the pull success information sent by the slave data storage device service; and each data storage device service asynchronously performs disk write operations on the large IO data block.
19. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the IO data processing method as described in any one of claims 1 to 10 or 11 to 17.
20. A computer non-volatile readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the IO data processing method according to any one of claims 1 to 10 or 11 to 17 is implemented.
Citation Information
Patent Citations
Request processing method, device and equipment and storage medium
CN111371848A
All-flash storage server system data management method and related components
CN112000289A
Distributed block storage data processing method and device, equipment and storage medium
CN114443364A
Data processing method, device and equipment and readable storage medium
CN115437581A
Erasure strip writing method and system, electronic equipment and readable storage medium
CN115543208A
Cited By
Data writing method and device, server, storage medium and program product
CN120762577A
