Slashdot has reported:

Meta engineers are developing Compressed RAM, or CRAM, for Linux amid memory shortages, high prices and growing demand for memory capacity. Meta engineer Gregory Price presented the work this week at the Linux Plumbers Conference in Prague. The system uses hardware-offloaded compression while preserving access to compressed memory at cacheline and byte level.

In results described in the presentation, read-only data accessed through CRAM performed as fast as raw DRAM. The source account says CRAM delivered near-native DRAM speeds for users who might otherwise rely on ZRAM or Zswap, and that memory writes were much faster than with either system or plain swap.

CRAM is stored in RAM and treated as RAM, allowing Linux to retain its memory-management semantics. Tom’s Hardware described its structure as using “a private NUMA node (essentially, a ghost CPU) instead of pretending to be a block device,” which allows Linux to manage it through mechanisms including migration and ballooning. Hardware-offloaded compression adds some delay to read-only access, according to the account.

The reported performance advantage reached 452 times the comparison speed in the read-only case. With writes enabled, CRAM was still 5.4 times faster in the worst tested scenario, which involved 20 per cent writes. The drop from the read-only result is attributed to the need to trigger a page fault and migrate folios back to their original NUMA domain. The system cannot write directly to compressed data because doing so would corrupt it.

“Most of the individual pieces needed to support CRAM are already mainline,” the article points out. The remaining implementation questions have not been detailed in the source account, and CRAM’s arrival in the Linux kernel is not confirmed.

The work’s origin at Meta Platforms makes large Linux servers an obvious target. ZRAM and Zswap, however, are used across the Linux ecosystem, including on constrained machines such as the Steam Deck. Many Linux distributions enable one of the two by default. CRAM could offer some of those systems a substantial speed increase if it makes its way into the kernel after the outstanding implementation questions are resolved.