Patent ID: 8452900

Claim:
A method of compressing data comprising: splitting an input/output (I/O) request into smaller I/O requests if a throughput of I/O requests in a queue of I/O requests is below a predetermined threshold, a smaller I/O request is equal or smaller than a block size; storing the smaller I/O requests in the queue; asynchronously compressing the smaller I/O requests; storing metadata comprising a compression indicator, a compression length indicating how many bytes compressed data occupies if the data is compressed and a validity indicator indicating whether the data is being used and the data will be preserved; determining if an I/O request is a read request or a write request; aligning I/O data if the I/O request is a read request; reading the I/O data if the I/O request is a read request; uncompressing the I/O data if the I/O request is a read request; determining if the data in a block is needed based on the validity indicator associated with the block if the I/O request is a write request; pre-reading the I/O data if the data in the block is needed and the I/O data is not aligned; aligning the I/O data if the data in the block is needed and the I/O data is not aligned; uncompressing the pre-read I/O data if the data in the block is needed and the I/O data is not aligned; and merging the data in block with the I/O data if the data in the block is needed and the I/O data is not aligned, wherein the I/O request is one of a read request or a write request.