A storage subsystem, comprising: a controller coupled to non-volatile storage, said 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 volatile memory coupled to the controller, wherein the controller is configured to implement a write buffer in said volatile memory to buffer write data received from the host system on write operations, and to transfer said write data from the write buffer to the non-volatile storage, said buffer memory being capable of receiving data at a higher rate than the non-volatile storage, such that the storage subsystem is capable of receiving write data from the host system at a rate that exceeds a write speed of the non-volatile storage; characterized in that the controller is configured to monitor a plurality of operating conditions of the storage subsystem, calculate a likelihood of failure of the non-volatile storage based on the plurality of operating conditions, and adjust a size of the write buffer in response to the calculated likelihood of failure of the non-volatile storage so as to vary both a sustained write speed of the storage subsystem and a risk of data loss, such that the write buffer is set to a relatively large size to increase the sustained write speed and the write buffer is set to a relatively small size to reduce the risk of data loss, and wherein the controller is further configured to reduce the size of the write buffer in response to determining that the calculated likelihood of failure of the non-volatile storage exceeds a threshold. a controller coupled to non-volatile storage, said 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 volatile memory coupled to the controller, wherein the controller is configured to implement a write buffer in said volatile memory to buffer write data received from the host system on write operations, and to transfer said write data from the write buffer to the non-volatile storage, said buffer memory being capable of receiving data at a higher rate than the non-volatile storage, such that the storage subsystem is capable of receiving write data from the host system at a rate that exceeds a write speed of the non-volatile storage; characterized in that the controller is configured to monitor a plurality of operating conditions of the storage subsystem, calculate a likelihood of failure of the non-volatile storage based on the plurality of operating conditions, and adjust a size of the write buffer in response to the calculated likelihood of failure of the non-volatile storage so as to vary both a sustained write speed of the storage subsystem and a risk of data loss, such that the write buffer is set to a relatively large size to increase the sustained write speed and the write buffer is set to a relatively small size to reduce the risk of data loss, and wherein the controller is further configured to reduce the size of the write buffer in response to determining that the calculated likelihood of failure of the non-volatile storage exceeds a threshold.