Red Hat Develops New NVFS, Efficient for NVM Memory

Mikuláš Patočka, one of the developers of LVM and the author of the series inventions, related to the optimization of storage systems, working at Red Hat, presented new file system on the Linux kernel developers mailing list NVFS, aimed at creating a compact and fast FS for non-volatile memory chips (NVM, non-volatile memory, such as NVDIMM), combining the performance of RAM with the ability to permanently store content.

When developing NVFS, the experience of the FS was taken into account NEW, in 2017 created specifically for NVM memory, but not accepted into the Linux kernel and limited support for Linux kernels from 4.13 to 5.1.
The proposed NVFS file system is much simpler than NOVA (4972 lines of code versus 21459), provides the fsck utility, has higher performance, supports extended attributes (xattrs), security labels, ACLs and quotas, but does not support snapshots. architecture NVFS close to
FS Ext4 fits well into the model of file systems based on the VFS subsystem, which allows you to minimize the number of layers and get by with a module that does not require patching into the kernel.

NVFS uses a kernel interface DAX for direct access to persistent memory devices bypassing the page cache. To optimize NVM memory handling, which uses byte addressing, the contents of the drive are mapped to the kernel's linear address space without the traditional block device layer and intermediate cache. Used to store directory contents. basis tree (radix tree), in which each filename is hashed and the hash value is used when looking up the tree.

Data integrity is ensured by the mechanism "soft updates” (as in UFS from FreeBSD and FFS from OpenBSD) without using journaling. To avoid file corruption in NVFS, data modification operations are grouped in such a way that a crash cannot lead to the loss of blocks or inodes, and the integrity of the structures is restored using the fsck utility. The fsck utility runs in multi-threaded mode and provides performance at the level of enumeration of 1.6 million inodes per second.

В performance tests NVFS performed a Linux kernel source tree copy operation on NVM memory about 10% faster than NOVA, 30% faster than ext4, and 37% faster than XFS. In the data search test, NVFS was faster than NOVA by 3%, and ext4 and XFS by 15% (but with active disk cache, NOVA was 15% slower).
In the million directory operation test, NVFS outperformed NOVA by 40%, ext4 by 22%, and XFS by 46%. When simulating DBMS activity, NVFS outperformed NOVA by 20%, ext4 by 18 times, and XFS by 5 times. In the fs_mark test, the performance of NVFS and NOVA turned out to be approximately on the same level, while ext4 and XFS lagged behind by about 3 times.

The lag of traditional FS on NVM memory is due to the fact that they are not designed for byte addressing, used in non-volatile memory, which looks like ordinary RAM. Reading from conventional drives ensures the atomicity of the operation at the sector read/write level, while NVM memory provides access at the level of individual machine words. In addition, traditional FSs try to reduce the intensity of accessing the media, which is considered as obviously slower than RAM, and also try to group operations to ensure sequential reading when using hard drives, process request queues, fight fragmentation, and prioritize the execution of different operations. . For NVM memory, such complications are unnecessary, since the data access speed is comparable to RAM, and the access order does not matter.

Source: opennet.ru

Add a comment