If you put swap in zram, you are paging from RAM to RAM. May as well just not use swap and save the cycles.
If you put swap in zram, you are paging from RAM to RAM. May as well just not use swap and save the cycles.
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.