Help needed - compression level for btrfs file system on my ubuntu 23.10
10 hours ago, johnny45 said:im not sure if im reading it right if the lzo line means ther compression enabled
Yes, it does. Btrfs currently supports three different compression algorithms: ZLIB, LZO and ZSTD. LZO doesn't compress as well as ZLIB or ZSTD and has no levels, but it is faster. ZSTD requires at least btrfs 4.14 to work, and if you want to use levels you need btrfs 5.1.
So the first thing to check would be if you're using btrfs 5.1 or newer, so you can use ZSTD and you can specify compression levels.
See: https://btrfs.readthedocs.io/en/latest/Compression.html
Type Perc Disk Usage Uncompressed Referenced TOTAL 79% 1.4G 1.8G 1.9G
This line tells you that, on average, files are compressed down to 79% of their original size. They use 1.4G on disk, their uncompressed size would be 1.8G
none 100% 1.0G 1.0G 1.0G
This line tells you there are 1G of files on your drive that were not compressed by btrfs. So the size on disk is 100% of their original size.
These would be files where compression is not worth it, most likely because they are already compressed, e.g. files such as .rar, .zip, .7z, .jpg, .png, .mp3, .mpeg, .mkv, etc. Effectively any file format that is compressed internally. See: https://btrfs.readthedocs.io/en/latest/Compression.html#incompressible-data
lzo 53% 446M 833M 843M
This line tells you that files compressed with lzo could, on average, be compressed down to 53% of their original file size. They use 446M on disk and would take 833M when uncompressed.
10 hours ago, johnny45 said:this is what my fstab file looks like
It would be a easier to work with if you used a code tag, rather than an image. You can simply redact the UUIDs there (though there's no real reason to). In any case, you need to set "compress=zstd:4" where it currently says "defaults". Those are the mount options. It's a bit easier to see what you're doing if you align the contents with the comment at the very top.
# <file system> <mount point> <type> <options> <dump> <pass> UUID=<redacted> / btrfs compress=zstd:4 0 2
more mount options: https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#man-btrfs5-mount-options
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now