New Linux Technology will Lower RAM usage

microchips memory

A proposal unveiled by Meta engineer Gregory Price could make the Linux kernel dramatically more efficient at handling large volumes of data in memory. Dubbed Compressed RAM (CRAM), the project arrives at a time when memory scarcity is becoming an increasingly pressing issue for both servers and desktop systems.

How Linux Handles Memory Today: ZRAM and Zswap

To understand CRAM’s significance, it helps to know how Linux currently tackles memory compression. Two established approaches dominate: ZRAM and Zswap.

ZRAM creates a virtual block device inside RAM itself — effectively simulating a hard drive or SSD within memory. When physical RAM starts to fill up, inactive or lightly used memory pages are compressed and moved into this ZRAM block. This frees up real RAM while keeping the data accessible. Crucially, ZRAM acts as a swap device, but one that lives entirely in memory rather than on a physical disk.

Zswap takes a slightly different tack. When the operating system tries to send memory pages to a traditional swap space on disk, Zswap intercepts those pages, compresses them, and stores them in a dedicated area of RAM. Only when memory pressure becomes severe does Zswap finally push the compressed pages out to the real swap device.

Both solutions are clever, but they share a fundamental limitation: the constant cycle of compressing and decompressing data for swap operations is considerably slower than accessing uncompressed RAM directly.

What Makes CRAM Different

At first glance, CRAM resembles ZRAM. The crucial distinction is that CRAM’s compressed memory block is treated as genuine RAM by the kernel, not as a swap device.

This architectural shift means the Linux kernel’s native memory-management features are applied directly to the compressed region. As a result, under certain conditions, compressed data can be accessed without triggering a page fault — the expensive kernel operation that occurs when software tries to access a memory page that isn’t currently mapped or ready. The kernel can also migrate compressed pages between addresses more efficiently, reducing interruptions and overhead.

The performance implications are striking. Price presented CRAM at the Linux Plumbers Conference (LPC) 2026, where he shared benchmark results: in a specific test, CRAM achieved 489 million operations per second, compared to just 1.1 million operations per second with ZRAM. That’s a 452× performance advantage over the established ZRAM approach — all without requiring a wholesale rewrite of Linux’s memory-management infrastructure.

It’s worth noting that real-world performance will vary depending on workload and system configuration, but the early data strongly suggests CRAM will consistently outperform existing compression-based swap mechanisms.

Roadmap and Adoption

Despite the impressive results, CRAM remains a work in progress. The project has not yet reached final development, and no official release date has been announced for upstream inclusion in the mainline Linux kernel.

Given its design and the environments where it was tested, CRAM is likely to find its first real-world deployments in professional and server workloads, where memory efficiency directly translates into cost savings and performance gains. Over time, however, desktop and even embedded Linux users could benefit as the technology matures.

For now, the Linux community will be watching closely — and with good reason. If CRAM delivers on its early promise, it could become one of the most significant memory-management advances in recent Linux history.

Source: Tecnoblog

Buy me a Ko-fiBuy me a Ko-fi

Support this blog ❤️

Leave a Reply

Your email address will not be published. Required fields are marked *