Update: enabling zram seems to have substantially improved stability on my Beryl 7, running firmware 4.9.0.
I initially also added GOMEMLIMIT=100MiB and GOGC=40 to AdGuard’s startup environment. I have since removed those overrides and restarted AdGuard, leaving zram enabled.
AdGuard Home and the bundled Tailscale have now run together for over three hours without those overrides. Previously, my router became unusable within roughly 10–15 minutes.
Latest measurements:
-
Load average:
0.21 / 0.29 / 0.34 -
Available RAM: approximately 57 MiB
-
Zram: approximately 90 MiB stored using 24 MiB of physical RAM
Installation through the UI
Go to Applications → Plug-ins, refresh the package list, search for zram, and install zram-swap. It depends on kmod-zram, so installing the kernel module alone is insufficient. GL.iNet documents package installation here (https://docs.gl-inet.com/router/en/4/interface_guide/plugins/).
For the explicit configuration I used, run the UCI commands below over SSH.
Installation and configuration through SSH
For a fresh setup, using the router’s configured package repositories:
opkg update
opkg install zram-swap
uci set system.@system[0].zram_size_mb='240'
uci set system.@system[0].zram_comp_algo='lzo'
uci set system.@system[0].zram_priority='100'
uci commit system
modprobe zram
/etc/init.d/zram enable
/etc/init.d/zram start
If zram is already active, these configuration changes do not resize it immediately. Avoid restarting active swap under memory pressure.
Verify activation and usage:
cat /proc/swaps
cat /sys/block/zram0/comp_algorithm
cat /sys/block/zram0/mm_stat
/proc/swaps should show /dev/zram0. The first three mm_stat values are uncompressed data size, compressed data size, and physical RAM used, in bytes.
This remains a promising workaround, not a confirmed fix or a controlled benchmark. I’m continuing to monitor it and will report any recurrence.