Accumulating I/O operations of data and checksums into a single combined I/O operation for implementation by an underlying storage device layer
Techniques are provided for combining data block and checksum block I/O into a single I/O operation. Many storage systems utilize checksums to verify the integrity of data blocks stored within storage devices managed by a storage stack. However, when a storage system reads a data block from a storage device, a corresponding checksum must also be read to verify integrity of the data in the data block. This results in increased latency because two read operations are being processed through the storage stack and are being executed upon the storage device. To reduce this latency and improve I/O operations per second, a single combined I/O operation corresponding to a contiguous range of blocks including the data block and the checksum block is processed through the storage stack instead of two separate I/O operations. Additionally, I/O operation may be combined into a single request that is executed upon the storage device.
1 . A system, comprising:
one or more processors; and
a non-transitory computer-readable medium, coupled to the one or more processors, having stored therein instructions that when executed by the one or more processors cause the one or more processors to:
receive a first I/O operation targeting a set of data blocks of a storage device and a second I/O operation targeting checksums for the set of data blocks, wherein the checksums are stored in a checksum block;
combine the first I/O operation and the second I/O operation into a combined I/O operation targeting the set of data blocks and the checksums; and
transmit the combined I/O operation to access the set of data blocks, and the checksums from the storage device.
2 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
determine that the set of data blocks and the checksum block form a dis-contiguous set of data blocks within the storage device; and
in response to determining that set of data blocks and the checksum block form the dis-contiguous set of data blocks, combine the first I/O operation and the second I/O operation into the combined I/O operation.
3 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
in response to determining that a plurality of I/O operations are not being received at the rate faster than the rate at which the plurality of I/O operations are being transmitted, refrain from combining the combined I/O operation with other I/O operations, wherein the combined I/O operation is transmitted to an underlying storage device layer.
4 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
receive the first I/O operation at a storage stack.
5 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
store, in a zone, the set of data blocks and the checksum block.
6 . The system of claim 1 , wherein a second checksum block, for a second set of data, is stored in a second zone different from a zone storing the checksum block.
7 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to route I/O operations through an intermediary layer to a storage layer.
8 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
combine a plurality of I/O operations targeting data blocks and checksum blocks of the storage device into a single combined I/O operation; and
transmit the single combined I/O operation to access the data blocks and the checksum blocks in the storage device.
9 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
receive a response to the combined I/O operation; and
transmit a first I/O response for the first I/O operation and a second I/O response for the second I/O operation.
10 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
generate a delay between receiving and transmitting I/O operations to the storage device, and
accumulate one or more I/O operations during the delay in order to combine the one or more I/O operations into a single combined I/O operation to transmit to the storage device.
11 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
generate a delay between receiving and transmitting I/O operations to the storage device, and
accumulate one or more I/O operations during the delay in order to combine the one or more I/O operations into a single combined I/O operation; and
adjust the delay to either increase or decrease the delay.
12 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
adjust a delay to combine one or more I/O operations into a single combined I/O operation, wherein the delay is adjusted based upon at least one of a number of I/O operations being received during the delay or a round trip time latency between a storage layer and an underlying storage device layer.
13 . The system of claim 1 , embodying a set of instructions, which when executed by the one or more processors further cause the one or more processors to:
combine a read I/O operation and a write I/O operation into a single combined I/O operation to transmit to the storage device.
14 . A method comprising:
receiving a first I/O operation targeting a set of data blocks of a storage device and a second I/O operation targeting checksums for the set of data blocks, wherein the checksums are stored in a checksum block;
combining the first I/O operation and the second I/O operation into a combined I/O operation targeting the set of data blocks and the checksums; and
transmitting the combined I/O operation to access the set of data blocks, and the checksums from the storage device.
15 . The method of claim 14 , further comprising:
receiving a response to the combined I/O operation from the storage device; and
transmitting separate I/O responses in response to the first I/O operation and the second I/O operation.
16 . A non-transitory machine readable medium comprising instructions, which when executed by a machine, causes the machine to:
receive a first I/O operation targeting a set of data blocks of a storage device and a second I/O operation targeting checksums for the set of data blocks, wherein the checksums are stored in a checksum block;
combine the first I/O operation and the second I/O operation into a combined I/O operation targeting the set of data blocks and the checksums; and
transmit the combined I/O operation to access the set of data blocks, and the checksums from the storage device.
17 . The non-transitory machine readable medium of claim 16 , wherein the instructions cause the machine to:
receive a response to the combined I/O operation from an underlying storage device layer; and
transmit, by a storage layer, separate I/O responses through a storage stack in response to the first I/O operation and the second I/O operation.