Meta unveils CRAM memory compression solution
Meta has demonstrated CRAM, an experimental memory compression solution, at the Linux Plumbers Conference. The solution aims to improve read-only performance compared to existing ZRAM alternatives.
Meta Platforms recently presented CRAM (Compressed RAM), an experimental memory compression solution, at the Linux Plumbers Conference 2026 (LPC 2026) held in Prague. The solution is designed not to replace ZRAM or zswap directly, but to keep compressed data in memory, thus avoiding the overhead of traditional swap paths.
CRAM's core innovation lies in its handling of compressed data. Unlike ZRAM, which creates compressed block devices in RAM and processes data via the swap path, CRAM allows compressed data to retain its page table mappings and page cache state. This enables cacheline and byte-level access without triggering software decompression routines through page faults, a key differentiator highlighted at the conference.
Benchmark tests presented at LPC showed significant performance gains in read-only scenarios. CRAM achieved approximately 489 million operations per second in worst-case read tests, a stark contrast to ZRAM's approximately 1.1 million operations per second. The advantage diminishes with write operations, as compressed data cannot be modified in place and requires a temporary transfer back to native NUMA nodes for modification.
Meta engineers acknowledge that CRAM is still a kernel service prototype. The primary challenge is ensuring this "memory with inconsistent physical and apparent capacity" fits within Linux's existing memory management framework. Most of the necessary underlying kernel mechanisms are already in place.
While CRAM is not yet a finalized feature for the Linux mainline, its demonstration signifies Meta's exploration into novel memory management techniques. The focus is on leveraging existing Linux memory management capabilities to support this new form of compressed memory, rather than announcing a product ready for deployment.