Imagine you set up your root filesystem to be btrfs with Ubuntu 14.10 defaults (one subvolume for /
and one for /home
) and you want to compress and deduplicate as much as possible. Which directories should be managed as a proper subvolume and disabled for compression? The two targets "compress as much as possbile" and skip compression of certain parts for performance reasons are mutually exclusive, therefore let me clarify the question:
- Certain sets of files and directories seem to suffer from compression (e.g.
dpkg
takes up to 30 minutes reading the package list after update) (withzlib
compression afterbtrfs filesystem defragment -c
) disabling compression for/var/lib/dpkg/
speeds up things by factor 1000. Are there further examples for such performance impacts (dpkg
's database isn't very performant). - Directories containing source code (
/src/
and others) are good candidates for compression although they will be mostly read when the system compiles and therefore the CPU load will be high and CPU-intensive decompression has to be done. How to estimate or measure the tradeoff?