Linux Kernel & OS

LZ4 1.11 adds multi-threaded compression to liblz4 library for multi-core CPUs

Key Takeaway

LZ4 1.11 moves multi-threaded compression from the command-line tool into the core liblz4 library, allowing any application using the library to parallelize compression across CPU cores.

Summary

LZ4 1.11 has been released, extending multi-threaded compression from the lz4 CLI tool into the core liblz4 library. Applications that link against liblz4 can now automatically distribute compression work across multiple CPU cores without implementing their own threading logic. A new API field lets developers control the number of worker threads. The lz4 CLI tool also gains a --memory option to cap RAM usage during multi-threaded operations. The project reports promising performance results from testing on AMD EPYC server hardware.

This release builds on LZ4 1.10, which introduced multi-threading only for the standalone command-line utility. By moving the capability into the library itself, the LZ4 project removes a significant integration burden for developers who want faster compression in databases, filesystems, network protocols, and other performance-sensitive software that depends on LZ4.

What changes in LZ4 1.11

  • Thread control API: A new field in the library API allows applications to specify and control the number of worker threads used during compression.
  • Memory budgeting for CLI: The lz4 command-line tool now supports a --memory option to constrain RAM consumption during multi-threaded compression operations.

Why it matters

Linux distributions and applications that embed LZ4 for fast compression—including the Linux kernel's zram, Btrfs, and various database engines—can now leverage multi-core parallelism without custom threading code. This reduces development effort for maintainers while potentially improving compression throughput on modern server and desktop processors across x86_64, ARM64, and other architectures where LZ4 is deployed.

Original reference: www.phoronix.com →