Patent ID: 8151020

Claim:
A storage subsystem, comprising: a controller coupled to non-volatile storage, the controller capable of writing data to, and reading data from, the non-volatile storage in response to commands received by the storage subsystem from a host system; and a buffer memory, the buffer memory capable of receiving data at a higher rate than the non-volatile storage, wherein the controller is configured to implement a write buffer in the buffer memory to buffer write data received from the host system and transfer the write data from the write buffer to the non-volatile storage, and to automatically adjust a size of the write buffer based at least in part on one or more monitored conditions of the storage subsystem that are reflective of a likelihood of a data loss in the storage subsystem, the automatically adjusting including reducing the size of the write buffer between at least a first non-zero size value and a second non-zero size value in response to the one or more monitored conditions indicating an increased risk of data loss, so as to vary both a sustained write speed of the storage subsystem and a risk of data loss.