どうでもいいことでもQiitaに入れてみよう実験。
メモメモ。
Swapしちゃった時に開放したい場合。
swapoff -a
swapon -a
もしくは、
sync;echo "3" > /proc/sys/vm/drop_caches
echo "0" > /proc/sys/vm/drop_caches
で。
もちろん元になったプロセスとかはなんとかしましょうね(;´∀`)
解放前
$ free -m
total used free shared buffers cached
Mem: 16041 13577 2464 0 134 5042
-/+ buffers/cache: 8400 7641
Swap: 2047 202 1845
解放後
$ free -m
total used free shared buffers cached
Mem: 16041 12776 3265 0 134 4638
-/+ buffers/cache: 8003 8038
Swap: 2047 0 2047