All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Understanding Linux Compressed Swap: zswap vs zram Technical Comparison and Recommendations

By

javierhonduco

2mo ago· 33 min readenInsight

Summary

This article provides expert guidance on Linux memory management technologies zswap and zram, explaining their fundamental differences and offering practical recommendations. The author clarifies that zswap and zram are distinct approaches with different philosophies: zswap compresses pages before writing them to swap on disk, while zram creates a compressed block device in RAM. The key recommendation is to prefer zswap in most cases, reserving zram only for specific, well-understood use cases. The article addresses common misconceptions and provides technical explanations to help users make informed decisions about compressed swap technologies on Linux systems.

Key quotes

· 4 pulled
If in doubt, prefer to use zswap. Only use zram if you have a highly specific reason to.
zswap and zram are fundamentally different approaches with different philosophies.
I read your articles about memory management (swap) on Linux, finally some words from the expert :) instead of internet experts 'you have 32GB - disable it'.
It'd be nice to have a follow-up about zswap or zram … :) if they're good (on desktop with 32GB RAM or more), which one is better and why …
Snippet from the RSS feed
zswap and zram are fundamentally different approaches with different philosophies. If in doubt, use zswap.

You might also wanna read