Comment 1 for bug 1932329

Revision history for this message
Colin Ian King (colin-king) wrote : Re: Benchmark if we can compress kernel modules

Needed a bit of tweaking to get this benchmarked. Had to enable zstd in kmod package and also apply a hack to the kernel package building. (See attachment).

So, the installed compressed kernel modules are 27.1 MB compared to the uncompressed 99.1 MB. The compressed extra modules are 103 MB compared to the uncompressed modules at 296 MB.

linux-modules-5.13.0-8-generic installed size:
  zstd compressed modules: 27.1 MB
  normal uncompressed: 99.1 MB

linux-modules-extra-5.11.0-18-generic installed size:
  zstd compressed modules: 103.0 MB
  normal uncompressed: 206.0 MB

The downside is that compression for the deb and the initramfs does not do so well. It seems that compressing a lot of uncompressed modules is better than compressing already compressed modules:

linux-modules-5.13.0-8-generic deb size:
  zstd compressed modules: 19.9 MB
  normal uncompressed: 17.5 MB

linux-modules-extra-5.11.0-18-generic deb size:
  zsd compressed modules: 95.08 MB
  normal uncompressed: 48.70 MB (I double checked the contents of the deb)

The initramfs size:
  zsd compressed modules: 49.77 MB
  normal uncompressed: 41.24 MB

For boot times, the kernel + zstd modules for ZSD and uncompressed kernel modules is almost the same, zstd is fractionally faster but this is within the margins of measured error.

*HOWEVER*, the zstd initramfs does not compress already compressed zstd kernel modules well, so the initramfs size is actually larger, so this impacts on the time to load the initramfs, so we end up with slower boots with zstd module compression.

Attached is the data in a libre office spread sheet