30 hours ago
Here is some vmstat output
vmstat
x@x-server:~$ vmstat 1 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 223104 123116 67944 521656 0 1 3 4 16 32 1 0 99 0 0 0 0 223104 123116 67944 521656 0 0 0 0 38 74 0 0 100 0 0 0 0 223104 123116 67944 521656 0 0 0 0 31 64 0 0 100 0 0 0 0 223104 122944 67944 521560 0 0 0 0 126 145 1 0 99 0 0 0 0 223052 122820 67944 521560 64 0 72 0 83 145 0 1 98 0 0 0 0 223000 122820 67944 521560 64 0 64 0 60 114 1 0 99 1 0 0 0 223000 122820 67944 521560 0 0 0 0 44 78 0 1 100 0 0 0 0 223000 122820 67944 521560 0 0 0 0 27 56 0 0 100 0 0 0 0 223000 122820 67952 521552 0 0 0 24 82 145 0 0 100 0 0 0 0 223000 122820 67952 521560 0 0 0 0 42 86 0 1 100 0 0 0 0 222952 122696 67952 521560 32 0 32 0 75 127 1 0 100 0 0 0 0 222952 122696 67952 521560 0 0 0 0 28 58 0 0 100 0 0 0 0 222896 122448 67952 521560 48 0 48 0 90 127 1 0 99 0 0 0 0 222896 122448 67952 521560 0 0 0 0 31 63 0 1 100 0 0 0 0 222896 122448 67952 521560 0 0 0 0 31 62 0 0 100 0 0
And here is free
free
x@x-server:~$ free -m total used free shared buff/cache available Mem: 1430 734 119 25 575 636 Swap: 1467 217 1250
As you can see I got some swap action going on even though I got a bunch of memory (around 50%) available. Why is that and how can I make it use that memory?
6 hours ago
In order to determine which process is using the swap memory use this below command and check. If you don't wanted that process kill it and proceed
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less