I spied that the bookworm image comes with a swapfile configured. Given the uConsole is designed to rum off an SD card I disabled it and swapped it out for zram compressed in memory swap using zram-generator.
While I was at it I also configured some zram block devices for the /tmp, /var/tmp, and /var/log directories and the chromium cache in ~/.cache/chromium. Chromium is a tad snappier as a result.
I had to apply the recommended “high-quality hack” in the zram-generator docs to set the block devices to 1777. I also used bind mounts so I could delete the old data in those mount locations.
Anyone else used/using zram or similar to reduce SD card writes?
Today I took inspiration from the “Reduce SD card writes” option from the pi-apps “Better Chromium” package to better configure chromium caches with my zram-gernerator config.
On boot chromium now automatically creates the relevant directories and symlinks.
Here’s the hook in /etc/chromium.d/reduced_writes: