Article 5AX3A [Call for testing] Swap in zram

[Call for testing] Swap in zram

by
Didier Spaier
from LinuxQuestions.org on (#5AX3A)
Hello,

swapinzram allows you to set up a swap space in RAM instead of or in addition to swap partitions and/or swap files. Expected benefits:
1. Way faster than swapping on any mass storage device.
2. Do not contribute to wear out devices like USB sticks, SD cards or MMC drives.
3. Increases your usable RAM size, as the files are compressed.

These benefits should be more important if you have a small RAM and/or the swap file or partition is on a flash drive like those mentioned above, and when you run something using a lot of RAM. Raspberry Pi users are welcome! The cost is just a small overhead for compression/decompression, with a ratio benefit/cost in terms of performances way greater than 1.

The swap space can be created or removed at any time, just running as root "swapinzram start" or "swapinzram stop" and configured editing the file /etc/swapinzram.conf. To know more, read after installation: /usr/doc/swapinzram-1/README

Caveats:
1. Tested on Slackware current, not on Slackware 14.2 (but should work there, let me know any issue).
2. If you use a huge kernel, set in /etc/swapinzram.conf COMPRESSION_ALGORITHM to anything other than zstd, like e.g. lzo-rle, cf. this request for -current.
3. Don't hibernate the machine while swap in zram is active.

Don't be afraid to test (and this is just a shell script so it's easy to check what it does), the most important issue that you could come across, I think, is a deadlock needing a hard reboot (I have not seen one reported using zram, though).

Feedback is more than welcome, of course!latest?d=yIl2AUoC8zA latest?i=7IdOG9ErrWY:-eCrxAYXaus:F7zBnMy latest?i=7IdOG9ErrWY:-eCrxAYXaus:V_sGLiP latest?d=qj6IDK7rITs latest?i=7IdOG9ErrWY:-eCrxAYXaus:gIN9vFw7IdOG9ErrWY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments