Linux 4.13 Adding Write Hints To Allow For Better NVMe Performance

Written by Michael Larabel in Linux Storage on 3 July 2017 at 03:07 PM EDT. 7 Comments
LINUX STORAGE
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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week