You are not logged in.

#1 2020-09-10 14:45:34

chw
Member
Registered: 2020-08-17
Posts: 5

Questions about F2FS on NVMe, discard/TRIM and compression

Hi,

as the title says, I've got a few questions regarding F2FS on NVMe drives.

The first is in regards to discard/TRIM, to which the NVMe wiki entry says this:

Note: Although continuous TRIM is an option (albeit not recommended) for SSDs, NVMe devices should not be issued discards.

If I'm not mistaken the "SSDs" in this sentence should be replaced with "SATA SSDs", at least, all the references here seem to say so.
The only source for this on NVMe that I could find is the linked thread on the Intel community forums.
However, the document linked, dated March 2015, is talking about ext4 and xfs only.

Now, the F2FS wiki entry says this:

By default, F2FS partitions are mounted using a hybrid TRIM mode which behaves as continuous TRIM.
This implementation creates asynchronous discard threads to alleviate long discarding latency among RW IOs.
It keeps candidates in memory, and the thread issues them in idle time.

It's citing the F2FS author here.

So, if I understand this correctly:
The comment on the NVMe wiki entry can be disregarded, and it's perfectly fine to use F2FS with the default discard option, no?


The second is in regards to compression.
If I set the compression option on format, F2FS does not actually compress anything unless the compress_extension mount option or chattr +c is used, correct?
According to this the compress_extension="*" mount option enables compression for all files, but since there are directories like /var/cache/pacman/pkg/ with incompressible files that would be a bad idea, right?

So, how would one go about efficiently using this feature?
Just chattr +c directories like /{etc,var/log}?

Thanks.

Offline

Board footer

Powered by FluxBB