Ubuntu: Strange Swap behaviour on Ubuntu 14.04 LTS



Question:

I have an Ubuntu 14.04 machine with an application (OsTicket) Apache+PHP+MySQL.

The VM has a Total of 12GB of RAM. Only 4GB is used but I have SWAP at 100%. If I launch: swapoff -a && swapon -a to empty the swap partition, after a couple of Hour, the used swap reaches again 100%. I've also tried to change the vm.swappiness parameter but no change has happened.

This is my actual state:

root@osticket# free -m                 total       used       free     shared    buffers     cached    Mem:         12017       8310       3706         33         33        338    -/+ buffers/cache:       7939       4077    Swap:         3061          0       3061      root@osticket:~# cat /proc/sys/vm/swappiness    10  

I've also found a script that show me the processes that have swapped and how many swap each of them are using:

Overall swap used: 3134772 kB

kB pid name  51332 1011 mysqld  35180 12641 php  32476 14498 php  30920 10373 php  26696 12384 php  26688 10904 php  25824 20956 php ........ ........  

Any ideas?


This is thr output of the command you have suggested.

root@osticket:~# vmstat -Sm 10  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   3210   6640     23    221    0    0    30    55   13   13  1  0 99  0  0     0  0   3210   6640     23    221    0    0     1    95  109  196  0  0 100  0  0     0  0   3210   6639     23    221    0    0     0     1   73  129  0  0 100  0  0     0  0   3210   6647     23    221    0    0     0     7  567  761  0  1 99  0  0     0  0   3210   6573     24    222    0    0    16   119  316  404  1  1 98  0  0     0  0   3210   6485     24    277    0    0  5355   260 1558 2484  3  1 94  1  0     0  0   3210   6534     25    308    0    0  2954   679 1204 1836  5  1 92  1  0     0  0   3210   6534     25    308    0    0     0    92   86  128  0  0 100  0  0     0  0   3210   6534     25    308    0    0     0    11   84  129  0  0 100  0  0     0  0   3210   6534     25    308    0    0     0     1  140  229  0  0 100  0  0     0  0   3210   6534     25    308    0    0     0     1   88  132  0  0 100  0  0     1  0   3210   6524     25    308    0    0    62     1  233  196  1  0 99  0  0     0  0   3210   6523     25    319    0    0  1088   101  290  441  1  0 97  1  0     0  0   3210   6522     25    319    0    0     0    58   94  156  0  0 100  0  0     0  0   3210   6522     25    319    0    0     0    45  111  177  0  0 100  0  0     0  0   3210   6522     25    319    0    0     0     0  516  703  0  0 99  0  0     0  0   3210   6522     25    319    0    0     0     6   73  124  0  0 100  0  0     0  0   3210   6522     25    319    0    0     0     1   74  126  0  0 100  0  0     0  0   3210   6521     25    319    0    0     0     2  118  189  0  0 100  0  0  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »