Technology1 min read

Do not buy RAM, compress

By · Published by Everything Blog

In short

The current guidance instructs users to utilize compression methods instead of acquiring more memory hardware. By relying on compression, systems can manage data efficiently without the need for additional physical components. This advice explicitly targets users who are considering hardware expansions to meet their computing needs. Following this recommendation allows individuals to maximize their current setup without making further purchases.

Key points

  • Consumers are instructed to avoid buying additional RAM for their computing systems.: Consumers are instructed to avoid buying additional RAM for their computing systems.
  • Utilizing compression is the officially recommended alternative to purchasing more comput…: Utilizing compression is the officially recommended alternative to purchasing more computer memory.
  • Existing system resources should be optimized through compression rather than expanded th…: Existing system resources should be optimized through compression rather than expanded through hardware.

Do not buy RAM, compress!

AI has changed a lot. We do more work in parallel. This increases the memory demand on our workstations.

Also, memory is expensive and often not extendable. So buying more RAM is not an easy option.

Recently I was running out of memory, I found my solution in zram

, a solution to compress memory.

Memory compression is not new. If you have a Windows or Mac device you are already using it. Also, many Android smartphones utilize the technique of using compression to put more data into the RAM. Unfortunately not all Linux environments have RAM compression enabled by default. Fedora, Pop!_OS do, but Ubuntu doesn’t. Amazon Linux only enables zram on smaller virtual machines. Most other distributions do not have it enabled.

Compressing memory does not come with downsides. It takes a little bit more from your CPU and adds latency to some processes. However, what you gain is gigantic amounts of extra capacity. It is not uncommon to see compression ratios up to 1:4.

I remember that in the early days of…

Technology