Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SIZE=$1
- DEVICE_COUNT=$2
- rmmod zram && modprobe zram num_devices=$DEVICE_COUNT
- for (( i=0; i < $DEVICE_COUNT; i++ )); do
- echo $(($SIZE*1024*1024)) > /sys/block/zram$i/disksize
- mkswap /dev/zram$i
- swapon /dev/zram$i -p 10
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement