Ubuntu 16.04 unexplained swap usage
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I fail to understand why my swap
is getting full on my Ubuntu 16.04 although I have plenty of available memory:
When looking at what processes are actually using swap
:
************************************
Swap's process in count 1
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/opt/otrs/bin/c : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 2
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 3
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 4
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
Can anyone please explain my why it is happening? Can a process by itself swap even if there is plenty available memory?
EDIT:
Running vmstat
shows 0 for both si
an so
(note that the output is truncated and I have run the command for a fair amount of time):
swap
add a comment |Â
up vote
1
down vote
favorite
I fail to understand why my swap
is getting full on my Ubuntu 16.04 although I have plenty of available memory:
When looking at what processes are actually using swap
:
************************************
Swap's process in count 1
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/opt/otrs/bin/c : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 2
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 3
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 4
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
Can anyone please explain my why it is happening? Can a process by itself swap even if there is plenty available memory?
EDIT:
Running vmstat
shows 0 for both si
an so
(note that the output is truncated and I have run the command for a fair amount of time):
swap
2
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I fail to understand why my swap
is getting full on my Ubuntu 16.04 although I have plenty of available memory:
When looking at what processes are actually using swap
:
************************************
Swap's process in count 1
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/opt/otrs/bin/c : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 2
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 3
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 4
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
Can anyone please explain my why it is happening? Can a process by itself swap even if there is plenty available memory?
EDIT:
Running vmstat
shows 0 for both si
an so
(note that the output is truncated and I have run the command for a fair amount of time):
swap
I fail to understand why my swap
is getting full on my Ubuntu 16.04 although I have plenty of available memory:
When looking at what processes are actually using swap
:
************************************
Swap's process in count 1
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/opt/otrs/bin/c : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 2
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
otrs.Daemon.pl : 36841 : VmSwap: 3708 kB
otrs.Daemon.pl : 36847 : VmSwap: 2976 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 3
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
************************************
Swap's process in count 4
systemd : 1 : VmSwap: 520 kB
otrs.Daemon.pl : 21002 : VmSwap: 3324 kB
systemd-journal : 2326 : VmSwap: 2356 kB
lvmetad : 2353 : VmSwap: 8 kB
systemd-udevd : 2358 : VmSwap: 3052 kB
/usr/sbin/apach : 25162 : VmSwap: 176 kB
/usr/sbin/apach : 28879 : VmSwap: 176 kB
bash : 30064 : VmSwap: 1460 kB
/usr/sbin/apach : 34334 : VmSwap: 180 kB
/usr/sbin/apach : 39489 : VmSwap: 176 kB
/usr/sbin/apach : 39491 : VmSwap: 176 kB
/usr/sbin/apach : 39493 : VmSwap: 176 kB
/usr/sbin/apach : 39494 : VmSwap: 176 kB
/usr/sbin/apach : 39496 : VmSwap: 176 kB
/usr/sbin/apach : 39497 : VmSwap: 176 kB
/usr/sbin/apach : 39498 : VmSwap: 176 kB
otrs.Daemon.pl : 43266 : VmSwap: 4320 kB
sshd : 43477 : VmSwap: 12 kB
sshd : 43555 : VmSwap: 72 kB
bash : 43556 : VmSwap: 1328 kB
bash : 43577 : VmSwap: 212 kB
ldapsearch : 43623 : VmSwap: 672 kB
ldapsearch : 43625 : VmSwap: 648 kB
ldapsearch : 43741 : VmSwap: 636 kB
sshd : 44183 : VmSwap: 12 kB
sshd : 44257 : VmSwap: 48 kB
bash : 44258 : VmSwap: 1044 kB
otrs.Daemon.pl : 44373 : VmSwap: 5912 kB
otrs.Daemon.pl : 45169 : VmSwap: 4344 kB
lxcfs : 4987 : VmSwap: 2208 kB
vmtoolsd : 4991 : VmSwap: 27168 kB
cron : 5044 : VmSwap: 136 kB
snapd : 5053 : VmSwap: 4728 kB
systemd-logind : 5055 : VmSwap: 48 kB
accounts-daemon : 5057 : VmSwap: 52 kB
dbus-daemon : 5059 : VmSwap: 4 kB
rsyslogd : 5082 : VmSwap: 44 kB
otrs.Daemon.pl : 50961 : VmSwap: 4348 kB
sshd : 5141 : VmSwap: 588 kB
polkitd : 5149 : VmSwap: 4 kB
mysqld : 5153 : VmSwap: 675748 kB
mdadm : 5162 : VmSwap: 4 kB
master : 5459 : VmSwap: 360 kB
qmgr : 5462 : VmSwap: 68 kB
otrs.Daemon.pl : 57161 : VmSwap: 4324 kB
systemd : 57265 : VmSwap: 896 kB
(sd-pam) : 57274 : VmSwap: 572 kB
otrs.Daemon.pl : 57937 : VmSwap: 56068 kB
/usr/sbin/apach : 8414 : VmSwap: 176 kB
Can anyone please explain my why it is happening? Can a process by itself swap even if there is plenty available memory?
EDIT:
Running vmstat
shows 0 for both si
an so
(note that the output is truncated and I have run the command for a fair amount of time):
swap
edited Mar 23 at 9:27
terdonâ¦
122k28229400
122k28229400
asked Mar 23 at 8:24
yesOrMaybeWhatever
267
267
2
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26
add a comment |Â
2
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26
2
2
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Yes, processes can be swapped even when there's memory available. This is controlled by the virtual memory swappiness
value which, as you show, is set to 60 on your system (the default on many installations). The Red Hat documentation has a nice explanation (this is applicable to any Linux):
swappiness
A value from 0 to 100 which controls the degree to which the system
favors anonymous memory or the page cache. A high value improves
file-system performance, while aggressively swapping less active
processes out of physical memory. A low value avoids swapping
processes out of memory, which usually decreases latency, at the cost
of I/O performance. The default value is 60.
A low swappiness value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness value of 10.
If you want to set it to a lower value, 10 for example, edit /etc/sysctl.conf
and add a line like this:
vm.swappiness=10
Note that for newer versions of systemd
, you need to edit/create files in /etc/sysctl.d/
instead. As explained in the Arch Wiki:
Note: From version 207 and 21x, systemd only applies settings from
/etc/sysctl.d/*.conf
and/usr/lib/sysctl.d/*.conf
. If you had customized/etc/sysctl.conf
, you need to rename it as/etc/sysctl.d/99-sysctl.conf
. If you had e.g./etc/sysctl.d/foo
, you need to rename it to/etc/sysctl.d/foo.conf
.
However, bear in mind that swapping is not necessarily a problem. It all depends on what your machine is doing. There is a nice and detailed answer addressing this issue on Ask Ubuntu, which I suggest you read. Basically, unless your machine feels sluggish, let it be.
Further reading:
- Ubuntu SwapFaq
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Yes, processes can be swapped even when there's memory available. This is controlled by the virtual memory swappiness
value which, as you show, is set to 60 on your system (the default on many installations). The Red Hat documentation has a nice explanation (this is applicable to any Linux):
swappiness
A value from 0 to 100 which controls the degree to which the system
favors anonymous memory or the page cache. A high value improves
file-system performance, while aggressively swapping less active
processes out of physical memory. A low value avoids swapping
processes out of memory, which usually decreases latency, at the cost
of I/O performance. The default value is 60.
A low swappiness value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness value of 10.
If you want to set it to a lower value, 10 for example, edit /etc/sysctl.conf
and add a line like this:
vm.swappiness=10
Note that for newer versions of systemd
, you need to edit/create files in /etc/sysctl.d/
instead. As explained in the Arch Wiki:
Note: From version 207 and 21x, systemd only applies settings from
/etc/sysctl.d/*.conf
and/usr/lib/sysctl.d/*.conf
. If you had customized/etc/sysctl.conf
, you need to rename it as/etc/sysctl.d/99-sysctl.conf
. If you had e.g./etc/sysctl.d/foo
, you need to rename it to/etc/sysctl.d/foo.conf
.
However, bear in mind that swapping is not necessarily a problem. It all depends on what your machine is doing. There is a nice and detailed answer addressing this issue on Ask Ubuntu, which I suggest you read. Basically, unless your machine feels sluggish, let it be.
Further reading:
- Ubuntu SwapFaq
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
add a comment |Â
up vote
2
down vote
Yes, processes can be swapped even when there's memory available. This is controlled by the virtual memory swappiness
value which, as you show, is set to 60 on your system (the default on many installations). The Red Hat documentation has a nice explanation (this is applicable to any Linux):
swappiness
A value from 0 to 100 which controls the degree to which the system
favors anonymous memory or the page cache. A high value improves
file-system performance, while aggressively swapping less active
processes out of physical memory. A low value avoids swapping
processes out of memory, which usually decreases latency, at the cost
of I/O performance. The default value is 60.
A low swappiness value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness value of 10.
If you want to set it to a lower value, 10 for example, edit /etc/sysctl.conf
and add a line like this:
vm.swappiness=10
Note that for newer versions of systemd
, you need to edit/create files in /etc/sysctl.d/
instead. As explained in the Arch Wiki:
Note: From version 207 and 21x, systemd only applies settings from
/etc/sysctl.d/*.conf
and/usr/lib/sysctl.d/*.conf
. If you had customized/etc/sysctl.conf
, you need to rename it as/etc/sysctl.d/99-sysctl.conf
. If you had e.g./etc/sysctl.d/foo
, you need to rename it to/etc/sysctl.d/foo.conf
.
However, bear in mind that swapping is not necessarily a problem. It all depends on what your machine is doing. There is a nice and detailed answer addressing this issue on Ask Ubuntu, which I suggest you read. Basically, unless your machine feels sluggish, let it be.
Further reading:
- Ubuntu SwapFaq
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Yes, processes can be swapped even when there's memory available. This is controlled by the virtual memory swappiness
value which, as you show, is set to 60 on your system (the default on many installations). The Red Hat documentation has a nice explanation (this is applicable to any Linux):
swappiness
A value from 0 to 100 which controls the degree to which the system
favors anonymous memory or the page cache. A high value improves
file-system performance, while aggressively swapping less active
processes out of physical memory. A low value avoids swapping
processes out of memory, which usually decreases latency, at the cost
of I/O performance. The default value is 60.
A low swappiness value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness value of 10.
If you want to set it to a lower value, 10 for example, edit /etc/sysctl.conf
and add a line like this:
vm.swappiness=10
Note that for newer versions of systemd
, you need to edit/create files in /etc/sysctl.d/
instead. As explained in the Arch Wiki:
Note: From version 207 and 21x, systemd only applies settings from
/etc/sysctl.d/*.conf
and/usr/lib/sysctl.d/*.conf
. If you had customized/etc/sysctl.conf
, you need to rename it as/etc/sysctl.d/99-sysctl.conf
. If you had e.g./etc/sysctl.d/foo
, you need to rename it to/etc/sysctl.d/foo.conf
.
However, bear in mind that swapping is not necessarily a problem. It all depends on what your machine is doing. There is a nice and detailed answer addressing this issue on Ask Ubuntu, which I suggest you read. Basically, unless your machine feels sluggish, let it be.
Further reading:
- Ubuntu SwapFaq
Yes, processes can be swapped even when there's memory available. This is controlled by the virtual memory swappiness
value which, as you show, is set to 60 on your system (the default on many installations). The Red Hat documentation has a nice explanation (this is applicable to any Linux):
swappiness
A value from 0 to 100 which controls the degree to which the system
favors anonymous memory or the page cache. A high value improves
file-system performance, while aggressively swapping less active
processes out of physical memory. A low value avoids swapping
processes out of memory, which usually decreases latency, at the cost
of I/O performance. The default value is 60.
A low swappiness value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness value of 10.
If you want to set it to a lower value, 10 for example, edit /etc/sysctl.conf
and add a line like this:
vm.swappiness=10
Note that for newer versions of systemd
, you need to edit/create files in /etc/sysctl.d/
instead. As explained in the Arch Wiki:
Note: From version 207 and 21x, systemd only applies settings from
/etc/sysctl.d/*.conf
and/usr/lib/sysctl.d/*.conf
. If you had customized/etc/sysctl.conf
, you need to rename it as/etc/sysctl.d/99-sysctl.conf
. If you had e.g./etc/sysctl.d/foo
, you need to rename it to/etc/sysctl.d/foo.conf
.
However, bear in mind that swapping is not necessarily a problem. It all depends on what your machine is doing. There is a nice and detailed answer addressing this issue on Ask Ubuntu, which I suggest you read. Basically, unless your machine feels sluggish, let it be.
Further reading:
- Ubuntu SwapFaq
edited Mar 23 at 9:48
answered Mar 23 at 9:26
terdonâ¦
122k28229400
122k28229400
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
add a comment |Â
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
thank you for such a great answer! Might it be that my swap size is not enough comparing to available RAM?
â yesOrMaybeWhatever
Mar 23 at 11:06
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
@yesOrMaybeWhatever I don't see why. Is this actually a problem? Is your system slow and unresponsive?
â terdonâ¦
Mar 23 at 11:57
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
we have an application running on it (OTRS) and it became slow in responding but it turned out that the LDAP Server used for lookups was unavailable - after correcting it, the application started to behave normal but their support claims that we should have 60% free space in swap but sa you mentioned, when the system decides itself when to swap how can we even control it ?
â yesOrMaybeWhatever
Mar 23 at 12:29
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
@yesOrMaybeWhatever you can control it by setting the vm.swappiness value to something lower for les aggressive swapping. I don't see why you would need to have X% free swap though. That sounds weird. The important point here is that swap != bad. In fact, often swap = good! So unless you are really seeing swap causing a problem, leave it as it is. I would lower it for a personal system, but not for a server.
â terdonâ¦
Mar 23 at 12:58
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433016%2fubuntu-16-04-unexplained-swap-usage%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.
â terdonâ¦
Mar 23 at 9:26