Hi,

I plan to use NVMe SSD on my desktop and I'm quite puzzled with
the filesystem choice :/ So community input on this matter will be
very valuable.

Typical anticipated workload: root filesystem, a lot of small and
middle sized files (e.g. source code), tons of compiling, ccache,
testing and similar dev activity. Large and media files will be
stored on another dedicated host.

What I want (just random order, so last is not the least):

1. Reasonable reliability. I'll have regular backups on an external
media, but I don't want to have my root corrupted often.

2. Minimized media wear-out. Filesystem should be friendly to NVMe:
for 512GB size it have only 400 TBW warranty :/

3. Performance. This is natural to strive to get full speed and
minimal latency from such a yummy storage.

For now I consider the following solutions:
a) EXT4
b) XFS
c) F2FS
d) BTRFS

a) EXT4 is a good extremely robust solution. Reliability is out of
the questioning: on my old box with bad memory banks it kept my data
safe for years, almost all losses were recoverable. And it has some
SSD-oriented features like discard support, also stripe and stride
with can be aligned to erase block size to optimize erase
operations and reduce wear-out.

b) In some tests XFS is better than EXT4 ([1] slides 16-18; [2]).
Though I had data loss on XFS on unclear shutdown events in the
past. This was about 5 years ago, so XFS robustness should have
improved, of course, but I still remember the pain :/

c) F2FS looks very interesting, it has really good flash-oriented
design [3]. Also it seems to beat EXT4 on PCIe SSD ([3] chapter
3.2.2, pages 9-10) and everything other on compile test ([2] page 5)
which should be close to the type of workload I'm interested in
(though all tests in [2] have extra raid layer). The only thing
that bothers me is some data loss reports for F2FS found on the
net, though all I found is dated back 2012-2014 and F2FS have fsck
tool now, thus it should be more reliable these days.

d) I'm not sure about BTRFS, since it is very sophisticated and I'm
not interested in its advanced features such as snapshots,
checksums, subvolumes and so on. In some tests [2] it tends to
achive better performance than ext4, but due to its sophisticated
nature it is bound to add more code paths and latency than other
solutions.


So, for now I tend to use F2FS for / and test other filesystems for
some load (e.g. compile chromium or libreoffice there). It will be
hard to do good tests, though, because the drive has built-in DDR3
512 MB memory cache which will affect results and I have now idea
how to flash it other than reboot the host.

But all these considerations are based on theory and tests found on
the net. I have little practical experience with SSDs other than USB
sticks and SD cards, so any feedback and practical experience share
is appreciated.

P.S. Is aligning to erase block size really important for NVMe? I
can't find erase block size for this drive (Samsung MZ-VKV512)
neither in official docs nor on the net...

[1] 
https://videos.cdn.redhat.com/summit2015/presentations/17856_getting-the-most-out-of-your-nvme-ssd.pdf
[2] https://www.phoronix.com/scan.php?page=article&item=linux_raid_fs4
[3] https://www.usenix.org/system/files/conference/fast15/fast15-paper-lee.pdf

Best regards,
Andrew Savchenko

Attachment: pgp0EoCKWlCF3.pgp
Description: PGP signature

Reply via email to