No description
Find a file
2020-01-19 12:40:58 -08:00
service Support fixed-size swaps. TODO: don't blind overwrite config file 2020-01-03 19:02:15 -08:00
install.sh install.sh: finished config file install routine; code cleanup 2020-01-19 12:40:58 -08:00
LICENSE Initial commit 2019-12-22 22:59:31 -08:00
README.md Support fixed-size swaps. TODO: don't blind overwrite config file 2020-01-03 19:02:15 -08:00
zram-swap.sh draft posix compliance; install.sh: added uninstall routine 2020-01-19 12:34:16 -08:00

zram-swap

Simple zram swap setup + teardown script for modern systemd Linux systems

https://github.com/foundObjects/zram-swap

Installation

git clone https://github.com/foundObjects/zram-swap.git
cd zram-swap && sudo bash install.sh

Usage

zram-swap.service will be started automatically after installation and during each subsequent boot.

The default allocation creates a zram device that should use around half of physical memory when completely full.

Edit /etc/default/zram-swap if you'd like to change compression algorithms or swap allocation and then restart zram-swap with systemctl restart zram-swap.service.

Run zramctl during use to monitor swap compression and real memory usage.

Debugging

Start zram-swap.sh with bash -x zram-swap.sh (start|stop) or ./zram-swap.sh -x (start|stop) to see what's going wrong.

To dump the full execution trace during service start/stop edit /etc/systemd/systemd/zram-swap.service and add -x to the following two lines:

ExecStart=/usr/local/sbin/zram-swap.sh -x init
ExecStop=/usr/local/sbin/zram-swap.sh -x  end