Hi currently you need to remove the zram module because it's autoloaded in case you want to use the zram num_devices-param maybe it should not be autoloaded implicitly /usr/sbin/rmmod zram 2> /dev/null > /dev/null /usr/sbin/modprobe -q zram num_devices=$num_cpus 2> /dev/null > /dev/nul ______________________________________ [root@testserver:~]$ cat /usr/sbin/zramstart #!/usr/bin/bash num_cpus=$(grep -c processor /proc/cpuinfo) [ "$num_cpus" != 0 ] || num_cpus=1 last_cpu=$((num_cpus - 1)) FACTOR=20 [ -f /etc/sysconfig/zram ] && source /etc/sysconfig/zram || true factor=$FACTOR memtotal=$(grep MemTotal /proc/meminfo | awk ' { print $2 } ') mem_by_cpu=$(($memtotal/$num_cpus*$factor/100*1024)) /usr/sbin/rmmod zram 2> /dev/null > /dev/null /usr/sbin/modprobe -q zram num_devices=$num_cpus 2> /dev/null > /dev/null for i in $(seq 0 $last_cpu); do echo $mem_by_cpu > /sys/block/zram$i/disksize /usr/sbin/mkswap /dev/zram$i /usr/sbin/swapon -p 100 /dev/zram$i done
_______________________________________________ kernel mailing list kernel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/kernel