Samsung new File System F2FS twice as fast as ext4

Shadowriver

Well-known member
Jan 5, 2012
697
9
0
Visit site
I hit on some interesting news by diving in deep linux news and i don't see talk about in Android sites.

In Beginning of October Samsung reviled there new file system on Linux kernel mailing list, called F2FS, which is optimized to work on NAND flash memory. Yestoday benchmark tests results showed up and they are really impressive and promising, speeds are 2.5x to 1.6x faster then ext4 (most popular Linux file system which Android uses too). Test was done on PC and Galaxy S3:

Code:
* test platform
 i) Desktop PC : Linux 3.6.1 (f2fs patched), Intel i5-2500 @3.3GHz quad-core, 8GB RAM, Transcend 16GB class 10 micro SD card
 ii) Galaxy-S3 : Linux 3.0.15 (f2fs ported), Android 4.0.4, DVFS turned off, Transcend 16GB class 10 micro SD card


* experiment 1: buffered write(sequential and random, 4KByte write)
===================================================================
F2FS surpasses other two filesystems in both random and sequential. In desktop and Galaxy S3, 
f2fs exhibits 2.5 and 1.6 times better performance in random write against EXT4, 
respectively. EXT4 is standard Android filesystem.

buffered write (1GB file)
+-------+---------------------------------+----------------------------------+
|       |           Desktop PC            |            Galaxy-S3             |
|       +-----------------+---------------+------------------+---------------+
|       |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      |
+-------+-----------------+---------------+------------------+---------------+

* experiment 2: write + fsync(sequential and random)
====================================================
F2FS surpasses other two filesystems in both random and sequential workload. In desktop and Galaxy S3,
 f2fs exhibits 2 and 1.5 times better performance in write+fsync random write against EXT4, respectively.

write + fsync (100MB file)
+-------+---------------------------------+----------------------------------+
|       |           Desktop PC            |            Galaxy-S3             |
|       +-----------------+---------------+------------------+---------------+
|       |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      |
+-------+-----------------+---------------+------------------+---------------+
write() with fsync is to test the filesystem performance under Android SQLite operation.


* experiment 3: mounting time
===============================
To measure the mount time, we used two different scenarios. First, we mounted file system after formatting without rebooting system.
 Second, we mounted file system after rebooting in order to ensure any data cached in memory is flushed. 
Overall, EXT4 shows fastest mount time, and F2FS shows second best performance; however, 
we observed that F2FS takes longest time to mount right after formatting.

mounting time with Transcend 16GB micro-SD
+-------+-----------------------------------+-----------------------------------+
|       |           Desktop PC              |            Galaxy-S3              |
|       +-----------------+-----------------+-----------------+-----------------+
|       |1st mount after  | after rebooting |1st mount after  | after rebooting |
|       |format (msec)    | (msec)          |format (msec)    | (msec)          |
+-------+-----------------+-----------------+-----------------+-----------------+
| EXT4  |         11      |         20      |         20      |         40      |
+-------+-----------------+-----------------+-----------------+-----------------+
| NILFS2|        920      |       1013      |       1680      |       1630      |
+-------+-----------------+-----------------+-----------------+-----------------+
| F2FS  |       1486      |        161      |       2280      |       1570      |
+-------+-----------------+-----------------+-----------------+-----------------+

Those are write tests on random and sequential data and last one mounting time (preparing partition to access) in which F2FS is a lot slower but 1-2 sec longer boot won't hurt.

Ofcorse this is all early stuff and support of it is yet to be merged to mainline Linux

Sources:

Linux-Kernel Archive: Initial report on F2FS filesystem performance
[Phoronix] Initial F2FS File-System Results Are Impressive
 
Last edited: