ZRAM & read_ahead_kb

Fred Bauer fred.w.bauer at gmail.com
Mon Jan 2 21:21:39 UTC 2017

Could I request a small change to zram-config?
The default setting for /sys/block/zramN/queue/read_ahead_kb seems to
be 128 on my system.
It should really be zero since there's no point in reading RAM ahead of time.

diff for bin/init-zram-swapping:
  for i in $(seq ${NRDEVICES}); do
    DEVNUMBER=$((i - 1))
    echo $mem > /sys/block/zram${DEVNUMBER}/disksize
+   echo "0" >  /sys/block/zram${DEVNUMBER}/queue/read_ahead_kb
    mkswap /dev/zram${DEVNUMBER}
    swapon -p 5 /dev/zram${DEVNUMBER}

My apologies if I'm not in the right place.

Fred W. Bauer
fred.w.bauer at gmail.com

More information about the Ubuntu-devel-discuss mailing list