It seems unlikely this would be of any benefit. If I understand correctly it is primarily used for performance reasons on systems that place a swap file on disk or flash storage. AFAIK Merlin's firmware doesn't use any swap space, and when users add it themselves they place it on an external flash drive. The performance gains would come at the expense of reducing the amount of available RAM and increasing the CPU load, on devices that are already hampered by a lack of both.If this would be effective on this device, It would be useful to having the required modules compiled in considered in a future release.
There's an idea to use some small "cloud storage" (file container?) on USB-less devices, so ZRAM was implemented on some local brand recently.ZRAM can have a performance impact on memory limited devices - the primary benefit is to reduce write pressure on flash, but that benefit does come at a cost.
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/zram.sh and make me executable
# then run "sudo update-rc.d zram.sh defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
echo 268435456 >/sys/devices/virtual/block/zram0/mem_limit
echo 536870912 >/sys/devices/virtual/block/zram0/disksize
mkswap /dev/zram0
swapon -p 0 /dev/zram0
sysctl vm.swappiness=10
I played around with it on my desktop computer, for the very same reason you describe - to reduce wear and tear on my new SSD.ZRAM can have a performance impact on memory limited devices - the primary benefit is to reduce write pressure on flash, but that benefit does come at a cost.
An interesting discussion. My goal is to reduce wear on the usb flash drive and to "bump up" the effective memory before the fairly slow and limited life flash drive enters into the swap game, given a reasonable cpu cost.
SW Rev => 4.9.28-v7+ #998 SMP Mon May 15 16:55:39 BST 2017
FW Rev => May 15 2017 16:57:15
Copyright (c) 2012 Broadcom
version 9469ea3706e34c4de62f38a5008f69a429b4b43e (clean) (release)
===============
ARM Mem => arm=880M
GPU Mem => gpu=128M
===============
top - 15:41:40 up 5:17, 2 users, load average: 0.63, 0.16, 0.09
Tasks: 167 total, 1 running, 166 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 880556 total, 614112 used, 266444 free, 24220 buffers
KiB Swap: 626680 total, 0 used, 626680 free. 387116 cached Mem
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!