|
@@ -0,0 +1,23 @@
|
|
|
+#!/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
|