rpi-swap is a new package that replaces/deprecates dphys-swapfile for configuring swap on your Raspberry Pi.
Using zram avoids small/frequent writes to /var/swap so as to increase SD card longevity. Memory-constrained platforms (such as Zero 2 W) that typically swap on graphical-boot have also shown reduced boot times.
Whilst a classic /var/swap swapfile can still be configured, the default changes to a zram-based swap configuration that writes back idle pages to /var/swap every 24-hours.
To install/configure rpi-swap (Trixie only):To verify that swap has been configured properly:For configuration details, see /etc/rpi/swap.conf or the swap.conf man page.
rpi-swap depends on some other new packages that may also be of interest: rpi-loop-utils for systemd-based setup of loop devices and udev-based /dev/disk/by-backingfile symlinks; rpi-systemd-config for shell-script based hierarchical parsing of systemd-style INI configuration files.
Using zram avoids small/frequent writes to /var/swap so as to increase SD card longevity. Memory-constrained platforms (such as Zero 2 W) that typically swap on graphical-boot have also shown reduced boot times.
Whilst a classic /var/swap swapfile can still be configured, the default changes to a zram-based swap configuration that writes back idle pages to /var/swap every 24-hours.
To install/configure rpi-swap (Trixie only):
Code:
sudo apt install rpi-swapsudo rebootCode:
sudo systemctl list-units --type swaprpi-swap depends on some other new packages that may also be of interest: rpi-loop-utils for systemd-based setup of loop devices and udev-based /dev/disk/by-backingfile symlinks; rpi-systemd-config for shell-script based hierarchical parsing of systemd-style INI configuration files.
Statistics: Posted by roliver — Thu Aug 07, 2025 1:31 pm — Replies 0 — Views 31