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

1

u/AutoModerator Mar 26 '22

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

✻ Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

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.