Originally posted by Beherit
View Post
What they mean is: imagine GRUB reading btrfs to load kernel and RAM drive. Older GRUBs would hit "unknown compression algo" issue when trying to read LZ4-compressed blocks. Systems using older GRUB and other boot loaders relying on fetching kernels, ramdisks and so on from filesystem would just break. Same goes for older filesystem tools. Failing to boot system does not sounds cool, right?
And what justifies these woes? If we take a look around (I gave very extensive testing to both LZ4 and LZO and many others): LZ4 usually compresses a bit worse than LZO, decompresses faster than LZO (on x86 it can be noticeably faster to decompress in some cases, but depends on data, and e.g. on ARMs speed is almost the same). So my overall impression is that LZ4 is in same class like LZO in btrfs compression. With slightly less ratio, exchanged for even more speed. Overall it is nice tradeoff and makes a lot of sense e.g. for zram, where compression and decompressions speed should be comparable to RAM. But it makes much less sense for btrfs.
P.S. as for "successors" of LZ4, it turns out there is LZ5, based on LZ4 code but heavily reworked. It compresses much better, and in terms or ratio beats both LZ4 and LZO to the dust. Its decompress speed is usually around LZO. But it shines on large chunks of data. Filesystems use small blocks to allow random access, so they would not benefit much from things like this. But it can look good for other uses. E.g. compressing kernel or ramdisk itself.
Comment