If you put swap in zram, you are paging from RAM to RAM. May as well just not use swap and save the cycles.
- 0 Posts
- 3 Comments
Joined 2 years ago
Cake day: June 16th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Zram does not impede disk cache, it’s a block device with compression, unavailable to the kernel for anything else.
I do wonder what you’re trying to achieve by moving swap to zram? You’re potentially moving pages in and out of swap for no real reason, with compression, where the swap wouldn’t have occurred if zram weren’t in place.
zswap is specifically built to this end and far better suited to it.
zram is great, but it is simply a ramdisk and inappropriate to ops task. It cannot dynamically grow/shrink or deal with hot/cold pages.