Red Hat is developing a new filesystem NVFS, optimized for NVM memory.

Mikuláš Patočka, one of the developers of LVM and the author of several inventions, related to storage system optimization, working at Red Hat, presented announced the new filesystem NVFS, aimed at creating a compact and fast filesystem for non-volatile memory (NVM) chips, such as NVDIMM, that combine RAM performance with persistent storage capabilities.

The development of NVFS takes into account the experience of the filesystem NOVA, created in 2017 specifically for NVM memory, but not included in the Linux kernel and limited to kernel support from 4.13 to 5.1.
The proposed NVFS is significantly simpler than NOVA (4,972 lines of code versus 21,459), provides an fsck utility, has higher performance, supports extended attributes (xattrs), security labels, ACLs, and quotas, but does not support snapshots. The architecture of NVFS is close to
the Ext4 filesystem and fits well into the model of filesystems based on the VFS subsystem, which minimizes the number of layers and can operate with a module that does not require kernel patches.

NVFS uses the kernel interface DAX for direct access to persistent memory devices, bypassing the page cache. To optimize NVM memory access, which uses byte addressing, the contents of the storage are mapped into the kernel's linear address space without the use of a traditional block device layer and intermediate cache. For storing directory contents, a radix tree is used, where each filename is hashed, and the hash value is used for searching in the tree.

Data integrity is ensured through the 'soft updates' mechanism (as in UFS from FreeBSD and FFS from OpenBSD) without using journaling. To prevent 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 operates in multithreaded mode and provides a throughput of 1.6 million inodes per second.

In performance tests NVFS performed the operation of copying the tree with the Linux kernel source texts approximately 10% faster than NOVA, 30% faster than ext4, and 37% faster than XFS. In the data search test, the NVFS file system was 3% faster than NOVA, and 15% faster than ext4 and XFS (but with active disk caching, NOVA was 15% slower).
In the test with a million directory operations, NVFS outperformed NOVA by 40%, ext4 by 22%, and XFS by 46%. When simulating database activity, the NVFS file system surpassed NOVA by 20%, ext4 by 18 times, and XFS by 5 times. In the fs_mark test, NVFS and NOVA showed similar performance, while ext4 and XFS lagged behind by about 3 times.

The lag of traditional file systems on NVM memory is due to the fact that they are not designed for byte-addressing, which is applied in non-volatile memory that behaves like regular RAM. Reading from standard drives ensures atomicity of operations at the sector read/write level, whereas NVM memory provides access at the level of individual machine words. Furthermore, traditional file systems attempt to reduce the intensity of access to the media, which is considered inherently slower than RAM, and also try to group operations for sequential reading when using hard drives, manage request queues, combat fragmentation, and prioritize different operations. For NVM memory, such complexities are unnecessary, as data access speeds are comparable to RAM, and the order of access does not matter.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster