1234567891011121314151617181920212223 |
- #!/bin/bash
- set -x
- free
- mkdir /data -p
- dd if=/dev/zero of=/data/swap bs=512 count=8388616
- df
- mkswap /data/swap
- cat /proc/sys/vm//swappiness
- sysctl -a | grep swappiness
- sysctl -w vm.swappiness=60
- sysctl -a | grep swappiness
- cat /etc/sysctl.conf | grep swap
- cp /etc/sysctl.conf ~/sysctl.conf
- sed -i 's/vm.swappiness = 0/vm.swappiness = 60/' /etc/sysctl.conf
- diff /etc/sysctl.conf ~/sysctl.conf
- swapon /data/swap
- df
- free
|