Zstandard support in OpenWrt

In Linux Kernel 4.14 was added support for Zstd https://kernelnewbies.org/Linux_4.14#zstd_compression_in_Btrfs_and_Squashfs
This compression algorithm is faster and gives more compression ratio. Is it used somehow by OpenWrt?
If not, then why? Maybe there is some plan to use it feature?
Regards

You need to look a bit more into the details of that article - zstd offers better compression than using the lzo compression format, but squashfs on OpenWrt usually uses squashfs-lzma (which compresses better than zstd). While speed is not much of a concern (the typical OpenWrt has small/ slow flash, the speed of the fs doesn't really matter here, the kernel needs to wait for the flash hardware anyways - and the active set of binaries is cached in RAM).

Another topic is the question which compression formats the OEM bootloader actually supports, as this decides which format must be used for the kernel (or at least a small loader to uncompress the kernel), in most cases this is lzma - for older devices gzip (there a small loader often provides lzma, to gain support for using better compression for kernel and rootfs); the rootfs could theoretically use a different compression format. But the question remains, why - zstd can't quite compete with the compression levels of lzma or xz, but in order to use it, the kernel would have to support lzma (for the kernel itself) and zstd at the same time, which also requires space (flash and RAM) for enabling both.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.