F2FS Inline Tail Allows For Saving Space On Small Files & Reducing I/O

Written by Michael Larabel in Linux Storage on 3 September 2024 at 06:56 AM EDT. 4 Comments
LINUX STORAGE
Patches posted to the Linux kernel mailing list today allow for inline tail support within the Flash-Friendly File-System (F2FS). This inline tail support allows for saving space when storing many small files and with reduced I/O can lead to faster data copy times.

Wu Bo posted patches for adding inline tail support to the F2FS file-system. This feature is explained as:
"The inode in F2FS occupies an entire 4k block. For many small files, this means they consume much more space than their actual size. Therefore, there is significant potential to better utilize the inode block space.

Currently, F2FS has two features to make use of the inode block space: inline data and inline xattr.

Inline data stores file which size is smaller then 3.5k in inode block. However, for slightly larger small files, there still have much waste. For example, a 5k file requires 3 blocks, totaling 12k of space, which is more than twice the size of the file itself!

Additionally, the end of a file often does not occupy an entire block. If we can store the end of the file data within the inode block, we can save an entire block for the file. This is particularly important for small files.

In fact, the current inline data is a special case of inline tail, and inline tail is an extension of inline data.

To make it simple, inline tail only on small files(<64k). And for larger files, inline tails don't provide any significant benefits."

The end result with F2FS inline tail? Wu Bo found the inline tail support when copying a source code archive of the Linux kernel that the storage space was reduced by about 8% while the copy time was reduced by about 10% thanks to reduced I/O needs.

SSDs in hand


This F2FS inline tail support is looking quite promising and is now under review on the Linux kernel mailing list.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week