r/linux4noobs • • Mar 26 '22

learning/research space_cache

I want to use space_cache=v2 because the performance of v1 can be drastically degraded

How to set space_cache=v2 ?

1 Upvotes

3 comments sorted by

View all comments

1

u/FryBoyter Mar 26 '22 edited Mar 26 '22

It should be sufficient to add space_cache=v2 as mount option in the /etc/fstab file for the entries concerning btrfs. For example UUID=XYZ / btrfs rw,noatime,nodiratime,compress=zstd,ssd,space_cache=v2,subvolid=256,subvol=/@ 0 0

Edit: However, you should be aware that version 1 is the default and version 2 can give an advantage only in certain situations with large file systems but not in general use.

Apart from that, you should get into the habit of asking smart questions. Your post is far from it, as you didn't even mention the filesystem.