Alternatives
Alternatives
Posted Aug 4, 2013 11:58 UTC (Sun) by pjm (guest, #2080)Parent article: Transparent decompression for ext4
Alternatives to consider for similar use cases (e.g. not requiring writing) are squashfs or cramfs. These are more transparent because they don't require applications to read the whole file from a single read(2) call, and they allow mmapping of individual pages.
Note that these are read-only filesystems. To mix with writability, the obvious suggestion would be a unionfs, but consider simpler alternatives: e.g. using essentially a writable filesystem but using an /opt scheme to allow individual pieces to be compressed. Mountpoints allow a per-directory choice between compression or writability. Symlinks can provide a simple form of compressing an individual file, perhaps comparable in convenience in practice to the scheme discussed in the parent article.
Purely read-only filesystems might offer performance advantages over filesystems that have to allow for writes. It isn't a straightforward "never needs more reads" (e.g. files are more likely to span hardware block boundaries in a filesystem that aims for compression), but it's different enough from a writable filesystem to be worth testing for a given use case.
