Open ihrapsa opened 3 years ago
Updated to my KlipperWRT, will review the performance in next few days.
Updated to my KlipperWRT, will review the performance in next few days.
hmm... Thanks, but actually I configured KlipperWrt as default with zram-swap
. I tried experimenting with different compression algorithms and ram sizes as well as zswap (which seems to be a more efficient way of using ram) but that zram-swap
package/script configures everything depending on the amount of ram you have and I stuck with that. If you manage to get better performance with a different configuration please share 🙂
This is a kind of swap that resides on RAM in a compressed form. It will make swapping and ram usage more efficient and it will increase the lifespan of the sd card as well.
Resources: https://openwrt.org/packages/pkgdata/zram-swap https://openwrt.org/packages/pkgdata/kmod-zram https://forum.openwrt.org/t/retracted-compressed-memory-this-project-is-officially-retracted-take-note-about-its-future/49076 https://forum.openwrt.org/t/mounting-swap-on-zram-with-discard/48451 https://forum.openwrt.org/t/possible-to-use-zswap/8916/6 https://stackoverflow.com/questions/24467604/swapon-failed-trying-to-enable-zram
Interesting read: https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/ https://ikarus.sg/using-zram-to-get-more-out-of-your-raspberry-pi/
Building:
kmod-zram
kmod-lib-lzo
(this is selected by default)kmod-lib-lz4
kmod-lib-zstd
Kernel config:zswap
zbud
z3fold
Enabling zswap: either:
opkg install zram-swap
- will allocate half of ram size to zram0echo 1 > /sys/module/zswap/parameters/enabled;
in /etc/rc.local (if not enabled by default in kernel) or~#echo lz4 > /sys/module/zswap/parameters/compressor;
echo z3fold > /sys/module/zswap/parameters/zpool;
echo 20 > /sys/module/zswap/parameters/max_pool_percent;
echo 75 > /proc/sys/vm/swappiness;~