Linux 4.13 Adding Write Hints To Allow For Better NVMe Performance
The block changes for the Linux 4.13 kernel include some interesting changes.
Among the block changes queued by Jens Axboe of Facebook and already merged into Linux Git are a number of code clean-ups, continued debugfs work around blk-mq for exposing more information to help in debugging I/O issues, hardening of blk-mq support, NVMe code updates, support for write hints, and various other bug fixes and minor improvements.
The write hints support is exciting and with 4.13 is supported for NVMe devices. The write hints allow applications/user-space to suggest data placement on flash storage for improving performance, latencies, and write amplification. The write hints work was previously known as "write streams" and is supported by the NVMe 1.3 specification. The support on the NVMe side with v1.3+ is known as Directives as a framework for exchange of meta-data between the device and system. It is the streams support within the NVMe 1.3 Directives that make these write hints a possibility. NVMe 1.3 was ratified just back in May.
Facebook has found when implemented can reduce NAND writes by up to 25% for a RocksDB test setup. Among the hints supported are for specifying if there is likely to be a high overwrite rate of the given data, via new flags that can be passed to the pwritev2 system call or fcntl.
Given whether the write life-time is expected to be short or a longer lifetime, the system can make better decisions about data placement.
Among the block changes queued by Jens Axboe of Facebook and already merged into Linux Git are a number of code clean-ups, continued debugfs work around blk-mq for exposing more information to help in debugging I/O issues, hardening of blk-mq support, NVMe code updates, support for write hints, and various other bug fixes and minor improvements.
The write hints support is exciting and with 4.13 is supported for NVMe devices. The write hints allow applications/user-space to suggest data placement on flash storage for improving performance, latencies, and write amplification. The write hints work was previously known as "write streams" and is supported by the NVMe 1.3 specification. The support on the NVMe side with v1.3+ is known as Directives as a framework for exchange of meta-data between the device and system. It is the streams support within the NVMe 1.3 Directives that make these write hints a possibility. NVMe 1.3 was ratified just back in May.
Facebook has found when implemented can reduce NAND writes by up to 25% for a RocksDB test setup. Among the hints supported are for specifying if there is likely to be a high overwrite rate of the given data, via new flags that can be passed to the pwritev2 system call or fcntl.
Given whether the write life-time is expected to be short or a longer lifetime, the system can make better decisions about data placement.
7 Comments