Low RAM Servers - LeandroTheDev/arch_linux GitHub Wiki
SWAP usage
- Force usage of memory swap even if the process doesn't like it
echo "vm.overcommit_memory=1" | sudo tee /etc/sysctl.d/99-overcommit.conf
- Force memory SWAP usage to the limits
echo "vm.swappiness=100" | sudo tee /etc/sysctl.d/99-swappiness.conf
- View configs:
sudo sysctl --system
RESET
echo "vm.overcommit_memory=0" | sudo tee /etc/sysctl.d/99-overcommit.conf
echo "vm.swappiness=60" | sudo tee /etc/sysctl.d/99-swappiness.conf
ZRAM
Compress ram to reduce the size
- sudo pacman -S zram-generator
- sudo vim /etc/systemd/zram-generator.conf
[zram0]
zram-size = ram / 2
compression-algorithm = zstd
- sudo systemctl daemon-reexec
- sudo systemctl start dev-zram0.swap
-
Please check if everthing is ok with the system after enabling, if is ok, them use
enable
instead ofstart
to automatically run in system boot