sakaki- / gentoo-on-rpi-64bit

Bootable 64-bit Gentoo image for the Raspberry Pi4B, 3B & 3B+, with Linux 5.4, OpenRC, Xfce4, VC4/V3D, camera and h/w codec support, weekly-autobuild binhost
GNU General Public License v3.0
921 stars 126 forks source link

F2FS over EXT4 #25

Closed fordfrog closed 5 years ago

fordfrog commented 6 years ago

Hi, it's just a question. Gentoo wiki documentation on Raspberry Pi mentions that F2FS is suitable filesystem for SD cards. Are there really any benefits to using F2FS over EXT4 for this project?

sakaki- commented 6 years ago

It may help extend the lifetime of the SD card somewhat. Not sure it will be much faster though with modern kernels, see e.g. this set of benchmarks. ext4 is certainly more proven, which is why I used it in the project originally. But, if you try it and find a big improvement, please let me know!

tidux commented 6 years ago

That benchmark is kind of stupid given that F2FS is designed for raw flash characteristics rather than spinning rust. In my own unscientific experience, F2FS is a colossal improvement over ext4 even on UHS-1 media on an i5, comparable to exFAT performance but with nice things like Unix permissions and journaling. For more explanations on why F2FS beats ext4 on SD cards see this neat video from linux.conf.au in 2015.

https://www.youtube.com/watch?v=K3zb6p0thQU

sakaki- commented 6 years ago

OK, perhaps I should take a closer look at this. Now the v1.2.1 image is out, I'll do some comparative benchmarking of F2FS vs ext4 for the root filesystem, under realistic loads, and see how it performs.

sakaki- commented 6 years ago

I have a booting system with an F2FS root working now, 64MiB-aligned sectors etc. Seems to work reasonably well, going to do some benchmarks next. One annoying thing is that resize.f2fs does not appear to support online resizing, as resize2fs does. That would mean using an initramfs during boot to allow the root fs to be expanded.

sedlund commented 5 years ago

Given that The Pi3 would limit the speed of the SD. I really don't see any advantage to switching. And as mentioned you loose online resize.

sakaki- commented 5 years ago

Old issue, closing now in pre 1.5.0 housecleaning f2fs is built into the modern kernels, so if anyone has relevant benchmarking to report that touches on this question, please feel free to report here. Best, sakaki