zram for swap, /tmp and logs
Replace the swapfile with compressed RAM block devices via zram-generator to cut SD-card writes — Chromium gets a little snappier.
What it takes
- Software only
- Config change
Difficulty 1 of 3 — easy.
Details
blaknite's zram-generator config (July 2024) creates four devices on the Bookworm image: a 1,024 MB swap plus /var/compressed (256 MB), /var/tmp (256 MB) and /var/log (128 MB) as mounted zram filesystems, using bind mounts to keep the existing directory contents and the 1777 permission trick for tmp-style directories. The point is fewer writes to the SD card and faster temporary storage; the reported effect is a slightly snappier Chromium and no stability problems.
It is a systemd configuration exercise — get the permissions and the bind-mount migration right or logs and temp files go missing.





