1. A system comprising: a central processing unit (CPU) of a node; one or more storage arrays of solid state drives (SSDs) coupled to the node, each storage array including a first set of segments and a second set of segments, each segment having a contiguous free space on the SSDs, the SSDs organized as one or more redundant array of independent disks (RAID) groups; and a memory coupled to the CPU and configured to store a layered file system of a storage input/output (I/O) stack, the layered file system including a log-structured layer configured to provide sequential log-structured layout of data and metadata on the SSDs, the data organized as variable-length extents of one or more logical units (LUNs) served by the node, the log-structured layer configured to perform segment cleaning to clean a selected segment from the first set of segments by reading the extents of the selected segment that contain valid data and writing the read extents to one or more different segments so as to maintain a first fraction of free space in the selected segment to enable writing of additional extents as a sequence of contiguous range write operations to the selected segment with temporal locality to reduce data relocation within the SSDs as a result of the write operations, wherein the second set of segments is maintained at a second fraction of free space different from the first fraction of free space.