Does the zswap by default make my zram swap duble compresed? #350
-
This is probly a quite stupid question. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should read the documentation first: https://www.kernel.org/doc/html/latest/admin-guide/mm/zswap.html Basically, zswap reserves 20% of your memory by default for compressed cache. Using a type of LRU algorithm, pages can be pushed to the backing swap device if the memory pool reserved is fully saturated. This means your zram setup is probably fine, but your zram devices will tend to get receive pages that are statistically unlikely to be read again. The part about double compression is not quite right. If pages came from the compressed cache as a result of eviction, they'll be decompressed then recompressed by zram. If the pages skipped the compression pool in zswap, then they're compressed once. Also note, if you're reading carefully, zswap does not compress on the backing device itself. That means there's merit to having zram setup anyways for when whatever workload that pressures the swap subsystem is highly compressable. |
Beta Was this translation helpful? Give feedback.
You should read the documentation first: https://www.kernel.org/doc/html/latest/admin-guide/mm/zswap.html
Basically, zswap reserves 20% of your memory by default for compressed cache. Using a type of LRU algorithm, pages can be pushed to the backing swap device if the memory pool reserved is fully saturated. This means your zram setup is probably fine, but your zram devices will tend to get receive pages that are statistically unlikely to be read again.
The part about double compression is not quite right. If pages came from the compressed cache as a result of eviction, they'll be decompressed then recompressed by zram. If the pages skipped the compression pool in zswap, then they're compβ¦