Samsung's new Flash file system and performance comparison

Good day to all!

Samsung engineers presented on the Linux kernel developers mailing list a set of patches with the implementation of the new F2FS (Flash-Friendly File System) file system, designed specifically for use on NAND Flash drives such as SSDs, eMMCs and SD cards. In addition to patches for the Linux kernel, the first release of the f2fs-tools package was also published , containing a collection of utilities for servicing F2FS partitions (so far only mkfs.f2fs is included, but in the near future they promise to add the fsck utility and a set of debugging tools). All component code is distributed under the GPLv2 license.


Unlike general-purpose file systems, the F2FS project is specially designed taking into account the specific features of NAND Flash and is optimized for memory with constant access time. To minimize data overwriting in F2FS, log-shaped structures are used to ensure uniform use of data blocks to reduce NAND Flash wear. It is noted that during the development of F2FS, the problems of previously available specialized FSs based on log-shaped structures were taken into account and every effort was made to eliminate known shortcomings, such as high memory consumption, high overhead during cleaning operations and the snowball effect for Wandering trees (in a situation when instead of overwriting new elements are created (the block number is changed), for trees in which the parent node refers to child nodes, changing a node leads to a rebuild of all overlying nodes). In addition to the traditional UNIX-based access control scheme, F2FS provides mechanisms such as xattr and the POSIX ACL.

F2FS partition is formedof segments of 2 MB in size, segments are grouped into sections, which in turn are combined into zones. To adapt F2FS to various types of NAND Flash, which differ in their characteristics depending on the internal geometry and control scheme, a wide range of parameters are provided for controlling the data distribution structure in the section and the opportunity to choose various cleaning and block allocation algorithms is provided. To perform cleaning operations, a special garbage collector is implemented that runs in the background during system downtime. To ensure integrity, a model with fixation of control points and the possibility of rollback changes (roll-back) in case of problems is used. To speed up operations during operation, the main indexes with information about the distribution of data are stored in RAM.

The results of performance evaluation of EXT4 and NILFS2 file systems are presented in comparison with F2FS , a new file system for Flash drives developed by Samsung. Testing was carried out both on a regular PC with a CPU Core i5 2500, and on a Galaxy S3 smartphone with firmware based on Android 4.0.4. In both configurations, the Transcend 16GB class 10 SD card was used;

F2FS performance was higher than its competitors in tests for random and sequential buffered write, write with flushing buffers via fsync and random data reading . When evaluating the mounting time, the leader was FS EXT4, F2FS was in second place.

buffered write (1GB file)
Desktop pcGalaxy-S 3
sequential (MB / s)random (IOPS)sequential (MB / s)random (IOPS)
EXT47.110736.71073
NILFS26.814624.01272
F2fs10.626756.91682

write + fsync (100MB file)
Desktop pcGalaxy-S 3
sequential (KB / s)random (IOPS)sequential (KB / s)random (IOPS)
EXT4511.8125383.4119
NILFS2545.2112356.772
F2fs1057.9240772.3184

mounting time
Desktop pcGalaxy-S 3
1st mount after formating (msec)after rebooting (msec) 1st mount after formating (msec)after rebooting (msec)
EXT4eleven202040
NILFS2920101316801630
F2fs148616122801570

buffered read (1GB file)
Desktop pcGalaxy-S 3
sequential (MB / s)random (IOPS)sequential (MB / s)random (IOPS)
EXT416.415689.61395
NILFS216.616099.61440
F2fs16.816439.71499

Addition: separate performance comparison of VFAT and F2FS:

buffered write (1GB file), 4KByte write
Desktop pcGalaxy-S 3
sequential (MB / s)random (IOPS)sequential (MB / s)random (IOPS)
EXT47.110736.71073
NILFS26.814624.01272
F2fs10.626756.91682
Vfat7.311087.31075

write + fsync (100MB file), 4KByte write
Desktop pcGalaxy-S 3
sequential (MB / s)random (IOPS)sequential (MB / s)random (IOPS)
EXT4511.8125383.4119
NILFS2545.2112356.772
F2fs1047.9240772.3184
Vfat356.5260474.4373

buffered read (1GB file), 4KByte read
Desktop pcGalaxy-S 3
sequential (MB / s)random (IOPS)sequential (MB / s)random (IOPS)
EXT416.415689.61395
NILFS216.616099.61440
F2fs16.816439.71499
Vfat16.615929.61501


Source: opennet.ru
PS Archlinux already has a package in AUR.
PSS Someone may say that he will have to wear several flash drives with different fs, because it is not universally supported right now, but this fs can be used not badly on stationary ssd disks at the moment.

Also popular now: