Analyzes compression types and ratios for files on btrfs filesystems.
compsize is a command-line tool for btrfs filesystems that analyzes compression types and ratios on files or directories. It helps users understand how effectively their data is being compressed by reporting disk usage, uncompressed size, and compression algorithms like zlib and zstd. The tool is particularly useful for optimizing storage and evaluating compression performance on btrfs volumes.
System administrators and Linux users managing btrfs filesystems who need to monitor compression efficiency and storage usage.
compsize provides accurate compression statistics by counting extents exactly once, ensuring reliable disk usage metrics even with reflinked or partially used files, unlike traditional tools like du or tar.
btrfs: find compression type/ratio on a file or set of files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Counts each referenced extent exactly once, ensuring precise disk usage metrics even with reflinked or partially used files, unlike tools like du or tar that may overcount.
Reports specific compression algorithms (none, zlib, zstd) and calculates effective ratios from the output table, helping users assess storage savings directly.
Generates a clear table with columns for type, percentage, disk usage, uncompressed, and referenced sizes, making compression analysis straightforward and readable.
The ioctl used requires root privileges, as stated in the README, limiting usability for non-administrative users or in security-restricted environments.
Only works on btrfs, making it useless for analyzing compression on other filesystems or in heterogeneous storage setups.
Requires specific btrfs userspace headers and kernel versions (3.16+), which can complicate installation and lead to compatibility issues on older systems.