Patent ID: 8495284

Claim:
A system for storing client data, the system comprising: a low-latency random read memory (LLRRM) device, the LLRRM device comprising a plurality of active erase-units (EUs) that store client data and a plurality of free erase-units (EUs) that do not store client data; active and free wear count (WC) data structures, the active WC data structure comprising a plurality of entries for a plurality of active EUs in the LLRRM device, the free WC data structure comprising a plurality of entries for a plurality of free EUs in the LLRRM device, each entry in the active and free WC data structures comprising a wear count associated with an EU, the wear count indicating a number of erase cycles performed on the EU; and a wear leveling module executed by a processor, the wear leveling module configured for: performing wear leveling on pairs of EUs comprising an active EU and a free EU by copying client data from the active EU to the free EU; and terminating wear leveling upon determining that a predetermined termination event occurred, the predetermined termination event being based on a variance threshold (VTH), an average wear count of the active EUs (AWCA) in the active WC data structure, and an average wear count of free EUs (AWCF) in the free WC data structure, the predetermined termination event being expressed by the equation: (AWCF−AWCA)/AWCF<VTH, wherein a value of the variance threshold is determined based on an average wear count of the erase-units of the LLRRM device.