Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* compsize reports that filesystem uses zlib compression, while I set zstd compression everywhere
@ 2022-10-26 10:21 Nemcev Aleksey
  2022-10-26 19:07 ` Chris Murphy
  0 siblings, 1 reply; 6+ messages in thread
From: Nemcev Aleksey @ 2022-10-26 10:21 UTC (permalink / raw)
  To: linux-btrfs

Hello.

Recently I decided to compress the existing Btrfs volume with zstd.

To do this, I set property `compression=zstd` for all subvolumes to 
compress new files with the default zstd:3 compression level.

Then I run `btrfs filesystem defragment -c zstd:12 -v -r` on all 
subvolumes to compress existing files using zstd:12 compression level 
(to spend more time now and save more space later, but don't want to 
keep slow zstd:12 level all the time).

After defragment, I run `btrfs filesystem balance` on all subvolumes to 
make Btrfs happy.

And after all, I run `compsize` on the root subvolume to check the 
compression ratio, and compsize shows me the following:
Processed 1100578 files, 1393995 regular extents (1649430 refs), 666312 
inline.
Type      Perc    Disk Usage  Uncompressed Referenced
TOTAL      77%     169G        217G        226G
none      100%      99G         99G        100G
zlib       52%      54G        102G        109G
zstd       19%      12M         65M         66M
prealloc  100%      15G         15G         16G

I'm very confused why almost all compressed data is compressed with zlib 
while I haven't used zlib at any step.
Why do compsize reports this?
Should I worry about this? It seems zstd offers a much faster 
decompression speed than zlib.
Thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-27 14:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-26 10:21 compsize reports that filesystem uses zlib compression, while I set zstd compression everywhere Nemcev Aleksey
2022-10-26 19:07 ` Chris Murphy
2022-10-26 22:29   ` Nemcev Aleksey
2022-10-27  1:03     ` Zygo Blaxell
2022-10-27 13:21       ` Chris Murphy
2022-10-27 14:32         ` Zygo Blaxell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox