That's correct, it scales with 'RamMultiplier' (which is 1 by default). Size is constrained by 'MaxSizeMiB' (2048 by default) and any swap/backing file is constrained by available disk space (MaxDiskPercent (50 by default)).It seems the default does vary on what you have and what you install
To temporarily disable/re-enable you'd use systemd (example given below). If you wish to make configuration changes then a restart will be required.What are the commands to disable swap and re-enable it, within a logged-in session and persistent across reboots ?
Code:
# View which swap units are runningpi@roliver-trixie-img:~ $ systemctl list-units --quiet --type=swap dev-zram0.swap loaded active active rpi-swap managed swap device (zram+file)# Stop the swap unitpi@roliver-trixie-img:~ $ sudo systemctl stop dev-zram0.swap# Verify that that swap unit is no longer runningpi@roliver-trixie-img:~ $ systemctl list-units --quiet --type=swap# Start swap unit againpi@roliver-trixie-img:~ $ sudo systemctl start dev-zram0.swap# Verify that it's runningpi@roliver-trixie-img:~ $ systemctl list-units --quiet --type=swap dev-zram0.swap loaded active active rpi-swap managed swap device (zram+file)Code:
[Main]Mechanism=noneStatistics: Posted by roliver — Thu Oct 09, 2025 8:57 am