📜 ⬆️ ⬇️

New file system for Samsung flash drives and performance comparison

Good day to all!

Engineers from Samsung presented a set of patches with the implementation of the new F2FS (Flash-Friendly File System) file system developed specifically for use on drives using NAND Flash, such as SSD, eMMC and SD cards. In addition to patches for the Linux kernel, the first release of the f2fs-tools package, containing a collection of utilities for servicing F2FS partitions, is also published (for now, only mkfs.f2fs is included, but promise to add the fsck utility and a set of debugging tools). The code for all components is distributed under the GPLv2 license.


Unlike general-purpose file systems, the F2FS project is specifically designed to take into account the specific features of NAND Flash and is optimized for memory with constant access time. To minimize the cases of data rewriting 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, problems of previously accessible specialized filesystems based on log-like structures were taken into account and all efforts were made to eliminate known deficiencies, such as high memory consumption, high overhead during cleaning operations and snowball effect for Wandering trees (in a situation where instead of overwriting new elements are created (the block number changes) for trees in which the parent node refers to child nodes, changing the node leads to the rebuilding of all overlying x nodes). In addition to the traditional UNIX access control scheme, F2FS provides mechanisms such as xattr and POSIX ACL.
')
The F2FS partition is formed from 2 MB segments, the 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 is provided to control the structure of data distribution in the section and the choice of different cleaning algorithms and block allocation is provided. To perform cleaning operations, a special garbage collector is implemented, performed in the background when the system is idle. 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 the execution of operations in the process of work, the main indexes with information about the distribution of data are stored in RAM.

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

The performance of F2FS turned out to be higher than competitors in tests for random and sequential buffered writing, writing co resetting buffers via fsync, and random reading of data . When estimating the mount time, the EXT4 FS became the leader, F2FS came 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: VFAT and F2FS performance comparison is separately carried out :

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 can say that he will have to carry several flash drives with different fs, because it is far from being supported everywhere now, but this fs is currently not badly possible to use on stationary ssd disks.

Source: https://habr.com/ru/post/155885/


All Articles