Skip to main content

Table 3 Setting value of zRam

From: A study on implementation of real-time intelligent video surveillance system based on embedded module

modprobe zram num_devices = 4
totalmem = free | grep –e “^Mem:” | awk ‘{print $2}’
mem = $(($totalmem/4)*1024)
echo $mem > /sys/block/zram(0 ~ 3)/disksize
mkswap /dev/zram(0 ~ 3)
swapon –p 5 /dev/zram(0 ~ 3)