Patent ID: 8880839

Claim:
A system, comprising: a memory; and a processor coupled to the memory, wherein the processor performs operations, the operations comprising: maintaining, compressed data in a plurality of strides of a redundant array of independent disks, wherein a stride is configurable to store a plurality of tracks, wherein the stride is a unit of storage in the redundant array of independent disks, and wherein a track represents one of a series of concentric rings on a disk on which the compressed data is stored; receiving, a request to write one or more tracks; and writing the one or more tracks to a selected stride of the plurality of strides, based on comparing the number of operations required to destage selected tracks from the selected stride to the number of operations required to defragment the compressed data in the selected stride, and wherein contiguous free space is created on the selected stride either via destaging of the selected tracks or via defragmentation of the selected stride based on whether the destaging or the defragmentation is faster.