File System Native Support of Zoned Block Devices: Regular vs Append Writes

webinar

Author(s)/Presenter(s):

Naohiro Aota

Library Content Type

Presentation

Library Release Date

Focus Areas

Abstract

Zoned block devices (ZBD) support has been introduced in Linux with kernel version 4.10. ZBDs have different write constraints than regular block devices. A ZBD is divided into several zones, and each zone must be written sequentially and must be reset before rewriting. The main type of ZBD currently available is SMR HDDs. The NVMe Zoned NameSpace (ZNS) was also recently standardized and defines a zone abstraction for NVMe namespaces similar to SMR HDD zones. Natively supporting ZBDs in a filesystem is not a trivial change. Some filesystems must rely on special block layer drivers to ensure sequential writes (e.g., ext4 and the dm-zoned device mappers). Filesystems using a copy-on-write design are better candidates for native ZBD support. Examples are F2FS and btrfs. Implement ZBD and ZNS support in a file system can be done with two different approaches. One is to use regular write commands, and the other is to use the new zone append write command. An implementation using the regular write command is easier to integrate with the existing allocate-then-write procedure, but needs per-zone locking to ensure write ordering. On the other hand, with zone append write commands, the target LBA of written data is automatically assigned by the device and known to the host when the command completes. This approach thus requires more extensive modifications of the filesystem to implement a write-then-allocate procedure. However, this new approach can eliminate the zone locking required with regular write commands, resulting in reduced IO latencies and better performance scaling with the system number of CPUs. This talk discusses the principles of ZBD and ZNS native support in filesystems. Support in F2FS using regular writes is presented and the approach taken with btrfs using both zone append and regular writes discussed. This is followed with a presentation of performance results obtained with btrfs micro benchmarks, comparing the use of regular write commands and zone append write commands on zoned devices with unmodified btrfs performance on regular block devices.

Learning Objectives

Overview of ZBD/ZNS,Zone append write command,Pros/Cons of using zone append write commands for filesystem implementation