:: Re: [DNG] f2fs
Etusivu
Poista viesti
Vastaa
Lähettäjä: onefang
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] f2fs
On 2023-12-26 21:49:00, Steve Litt wrote:
> A recent thread had me RTFMing f2fs, and what I found was interesting:
>
> https://darwinsdata.com/is-f2fs-better-than-ext4/
>
> https://en.wikipedia.org/wiki/F2FS
>
> https://www.maketecheasier.com/timedatectl-control-system-time-date-linux/?scr=1
>
> https://www.phoronix.com/review/clear-linux-f2fs
>
> The Wikipedia article mentions that the chance of leaving your
> filesystem in a dirty state after disorderly shutdown is higher on
> f2fs unless you change the fsync_mode from "posix" to something else
> (probably "strict"). Doing so reduces some of the performance
> advantages of f2fs.
>
> From what I've read, f2fs is beneficial to Nand storage only when doing
> write operations. For write operations it's often faster, it reduces
> unnecessary writes on individual Nand gates, and I think it handles
> fstrim automatically.
>
> I've observed two distinct usages of Nand (SSD/NVMe) drives:
>
> 1) SSD/NVMe is the only drive on the computer. Typical of laptops.
>
> 2) SSD/NVMe is root partition, with often written directories mounted
>    on spinning rust.

>
>
> Case #1 cries out for f2fs. F2fs minimizes write activity. In today's
> world, a laptop's typical 1TB to 2TB is very little space, considering
> huge video files, and considering that for drive longevity you
> shouldn't completely populate it. Also, if I understand right, you
> don't need to remember to fstrim / frequently.
>
> In case #2, you're doing very little writing, so f2fs doesn't gain you
> anything except maybe not having to remember to run fstrim, but of
> course you could automatically trim via an entry in /etc/fstab if you
> drive on that side of the road.


This is what I do on my super desktop, the NVMe on the motherboard is the
root partition, ext4 coz I also heard f2fs doesn't cope well with system
crash and power failures.

The rest is mounted in /media/DATA on spinning rust, with symlinks from
places like /home, /var, and /opt to /media/DATA/home etc. Also ext4.

This BTW is why I don't mind the usrmerge symlinks, I already had major
bits of my file systems root directory symlinked elsewhere, /bin and
/sbin etc also being symlinked didn't make any difference to me.

Everything works fine.

I have cron run fstrim for me, didn't know you could do that from
/etc/fstab. Write a two line script once, done, not a big deal for a
programmer like me.

Interestingly my motherboard not only has 4 NVMe slots, it also came with
a plugin board with even more of them. So if I want to RAID my root
partition to a silly level, I could buy lots more NVMe drives. RAID 10
with 10 drives? Though not sure if that level of silly will increase
performance as you might expect, or it starts to trip over it's own feet
and slow down from the overhead of managing all that extra complexity.

On my server on the other hand, it's only got two NVMe slots, no
spinning rust. I RAID them. I'm still using ext4 on it.

My other computers at home, which are rarely used, all have spinning
rust, but are all old and didn't have any SSD options when I bought them.
One is my 2012 Mac Mini, it's still Mac OSX on it, so not ext2 or f2fs.
The other has lots of operating systems on it, not all of them Linux,
it's my test box, though I bought it before the Oculus Rift came out so I
could develop VR software, coz someone paid me to. Which is also why I
have an Oculus Rift Development Kit, which early VR developers like me
could get to do development before the consumer version was released.

--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.