Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
F2FS vs ext4 for RPi3 root filesystem?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Thu Apr 05, 2018 8:15 am    Post subject: F2FS vs ext4 for RPi3 root filesystem? Reply with quote

Hello,

I've had some queries from users regarding the possible use of the F2FS filesystem for root, rather than ext4, on the gentoo-on-rpi3-64bit image.

Has anyone had any experience with this filesystem on the RPi3? Does it have any issues like the not-enough-inodes problem you can get with ext4 on Gentoo? How about reliability, performance?

Many thanks!
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2022

PostPosted: Fri Apr 06, 2018 8:38 am    Post subject: Reply with quote

I've used F2FS on a Pi B and a Pi B3 as root fs, as mentioned elsewhere in the fora. Not hit the inode problem, so can't comment apart from saying choose the right parameters to mkfs.ext4...

One "issue" with F2FS that I think is a feature: each kernel update causes the fs to appear dirty, triggering a need to fsck. It appears to be caused by storing the creating/last updating kernel ID in the fs, and I guess the intention is that the resulting fsck might apply some tweaks for the the new kernel. (That's a model that makes more sense on "release" oriented distros like ubuntu than continuous upgrade ones like Arch and Gentoo). Last time I had to reboot the Pi B3 twice to run fsck twice before it was happy.

My Pi B system's runs a CUPS print server, radicale calendar server and ntp client, 24/7, and I've had no problems over the last year or so, but it's hardly a stress-test!
_________________
Greybeard
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Sat Apr 07, 2018 9:37 am    Post subject: Reply with quote

I had read this some time ago:
An f2fs teardown
It's a bit old but maybe useful.

Quote:
One area of difficulty is that the shape of an f2fs (such as section and zone size) needs to be tuned to the particular flash device and its FTL; vendors are notoriously secretive about exactly how their FTL works. f2fs also requires that the flash device is comfortable having six or more concurrently "open" write areas. This may not be a problem for Samsung, but does present some problems for your average techno-geek — though Arnd Bergmann has done some research that may prove useful. If this leads to people reporting performance results based on experiments where the f2fs isn't tuned properly to the storage device, it could be harmful for the project as a whole.


So to be efficient you still have to determine the erase block size used internally by the flash FTL using flashbench:

Optimizing Linux with cheap flash drives


When you buy the SD card is preformatted by the vendor that knows the size of the erase block and optimizes the fat filesystem for it. If you reformat it the optimization is lost and the card becomes slow.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Tue Apr 10, 2018 4:51 pm    Post subject: Reply with quote

Thanks both, for the feedback and links.

I'm currently trialing a F2FS root system on an RPi3 B+, with 64 MiB-aligned partitions. Seems somewhat faster in real-world tests (emerge ops with distcc etc.) than the ext4 version, although things seem to gum up quite badly if the partition is nearly full (as is expected I think per the teardown cited earlier, section "Knowing when to give up").

One slight issue is that resize.f2fs does not appear to support online resizing. That would mean using an initramfs during boot, to allow the root fs to be increased to fill the target micro SD card (the current image uses ext4, the resize2fs command for which does support online resizing).
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3178

PostPosted: Tue Apr 10, 2018 7:28 pm    Post subject: Reply with quote

Quote:
One slight issue is that resize.f2fs does not appear to support online resizing.
AFAIR it does not allow shrinking either.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum