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)
write + fsync (100MB file)
mounting time
buffered read (1GB file)
Addition: separate performance comparison of VFAT and F2FS:
buffered write (1GB file), 4KByte write
write + fsync (100MB file), 4KByte write
buffered read (1GB file), 4KByte read
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.
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 pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (MB / s) | random (IOPS) | sequential (MB / s) | random (IOPS) | |
EXT4 | 7.1 | 1073 | 6.7 | 1073 |
NILFS2 | 6.8 | 1462 | 4.0 | 1272 |
F2fs | 10.6 | 2675 | 6.9 | 1682 |
write + fsync (100MB file)
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (KB / s) | random (IOPS) | sequential (KB / s) | random (IOPS) | |
EXT4 | 511.8 | 125 | 383.4 | 119 |
NILFS2 | 545.2 | 112 | 356.7 | 72 |
F2fs | 1057.9 | 240 | 772.3 | 184 |
mounting time
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
1st mount after formating (msec) | after rebooting (msec) | 1st mount after formating (msec) | after rebooting (msec) | |
EXT4 | eleven | 20 | 20 | 40 |
NILFS2 | 920 | 1013 | 1680 | 1630 |
F2fs | 1486 | 161 | 2280 | 1570 |
buffered read (1GB file)
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (MB / s) | random (IOPS) | sequential (MB / s) | random (IOPS) | |
EXT4 | 16.4 | 1568 | 9.6 | 1395 |
NILFS2 | 16.6 | 1609 | 9.6 | 1440 |
F2fs | 16.8 | 1643 | 9.7 | 1499 |
Addition: separate performance comparison of VFAT and F2FS:
buffered write (1GB file), 4KByte write
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (MB / s) | random (IOPS) | sequential (MB / s) | random (IOPS) | |
EXT4 | 7.1 | 1073 | 6.7 | 1073 |
NILFS2 | 6.8 | 1462 | 4.0 | 1272 |
F2fs | 10.6 | 2675 | 6.9 | 1682 |
Vfat | 7.3 | 1108 | 7.3 | 1075 |
write + fsync (100MB file), 4KByte write
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (MB / s) | random (IOPS) | sequential (MB / s) | random (IOPS) | |
EXT4 | 511.8 | 125 | 383.4 | 119 |
NILFS2 | 545.2 | 112 | 356.7 | 72 |
F2fs | 1047.9 | 240 | 772.3 | 184 |
Vfat | 356.5 | 260 | 474.4 | 373 |
buffered read (1GB file), 4KByte read
Desktop pc | Galaxy-S 3 | |||
---|---|---|---|---|
sequential (MB / s) | random (IOPS) | sequential (MB / s) | random (IOPS) | |
EXT4 | 16.4 | 1568 | 9.6 | 1395 |
NILFS2 | 16.6 | 1609 | 9.6 | 1440 |
F2fs | 16.8 | 1643 | 9.7 | 1499 |
Vfat | 16.6 | 1592 | 9.6 | 1501 |
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.