Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Maxed out Swap
PostPosted: Mon Apr 06, 2015 7:15 am 
Offline
Senior Newbie

Joined: Mon Apr 06, 2015 7:06 am
Posts: 8
Hi all,

I've got an odd problem with a 2GB linode running Debian 7.5

The server is used as a basic web/mail/mysql/ftp machine hosting a few low traffic websites.

I've noticed that the machine is using 100% Swap in longview and 74% memory whilst similar machines are using 0% Swap and 24% memory.

Can anyone give me some pointers on where to look to find out what is using the memory and causing swap to run at 100%?

Thanks.


Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 7:22 am 
Offline
Senior Newbie

Joined: Mon Apr 06, 2015 7:06 am
Posts: 8
I should add that even after a reboot, the swap starts at 60% and climbs back up to 100% within a few hours.


Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 7:28 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
What's the output of
Code:
ps aux --sort '-rss'

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 9:17 am 
Offline
Senior Newbie

Joined: Mon Apr 06, 2015 7:06 am
Posts: 8
Code:
root@viking:/# ps aux --sort '-rss'
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
clamav    3670  0.1 19.3 506132 394164 ?       Ssl  12:19   0:09 /usr/sbin/clamd -c /etc/clamav/clamd.conf
web9      3321  0.0  8.4 462640 172352 ?       S    12:19   0:00 php-fpm: pool web9
web16     3296  0.0  8.1 459244 167232 ?       S    12:19   0:00 php-fpm: pool web16
mysql     4669  0.1  7.9 474676 161932 ?       Sl   12:20   0:13 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/my
web18     3277  0.0  7.0 438796 143912 ?       S    12:19   0:00 php-fpm: pool web18
web8      3416  0.0  5.6 468240 116172 ?       S    12:19   0:06 php-fpm: pool web8
web8      3414  0.0  5.0 448912 102768 ?       S    12:19   0:06 php-fpm: pool web8
web9      3305  0.0  4.8 461856 99544 ?        S    12:19   0:00 php-fpm: pool web9
web7      3349  0.0  4.1 445300 84572 ?        S    12:19   0:04 php-fpm: pool web7
web2      3442  0.0  4.1 440780 84480 ?        S    12:19   0:00 php-fpm: pool web2
web7      3354  0.0  3.9 441412 80076 ?        S    12:19   0:04 php-fpm: pool web7
amavis   26639  0.0  3.9 240444 79816 ?        S    13:45   0:01 /usr/sbin/amavisd-new (ch7-avail)
amavis   23236  0.0  3.8 239976 79156 ?        S    13:30   0:01 /usr/sbin/amavisd-new (ch10-avail)
web2      3444  0.0  3.6 459732 73816 ?        S    12:19   0:00 php-fpm: pool web2
amavis   23265  0.0  3.5 234104 73108 ?        S    13:31   0:00 /usr/sbin/amavisd-new (ch9-avail)
amavis   25446  0.0  3.5 233648 72904 ?        S    13:40   0:00 /usr/sbin/amavisd-new (ch9-avail)
root      4841  0.0  3.0 135660 61436 ?        Ss   12:20   0:02 /usr/sbin/spamd --create-prefs --max-children 5 --helper-home-dir -d --pidfile=/v
root      4976  0.0  2.7 135660 57108 ?        S    12:20   0:00 spamd child
root      4978  0.0  2.7 135660 57108 ?        S    12:20   0:00 spamd child
web7     18807  0.0  2.6 444300 55120 ?        S    13:13   0:01 php-fpm: pool web7
web3      3393  0.0  2.6 448760 54308 ?        S    12:19   0:00 php-fpm: pool web3
web22     3432  0.0  2.5 441740 52768 ?        S    12:19   0:01 php-fpm: pool web22
web16     3303  0.0  2.5 443628 52324 ?        S    12:19   0:00 php-fpm: pool web16
web11     3245  0.0  2.5 438776 51808 ?        S    12:19   0:00 php-fpm: pool web11
amavis   25551  0.0  2.4 223716 49944 ?        S    13:42   0:00 /usr/sbin/amavisd-new (ch7-avail)
web22     3434  0.0  2.4 437172 49088 ?        S    12:19   0:01 php-fpm: pool web22
web4      3436  0.0  2.2 450060 46304 ?        S    12:19   0:00 php-fpm: pool web4
root      4524  0.0  2.1 206144 44900 ?        S    12:19   0:05 python -c from pyovpn.sagent.sagent_entry import openvpnas ; openvpnas() --logfil
amavis    3655  0.0  2.1 222428 43284 ?        Ss   12:19   0:01 /usr/sbin/amavisd-new (master)
root      3709  0.0  1.8 525480 37972 ?        Ss   12:19   0:00 /usr/sbin/apache2 -k start
web11     3250  0.0  1.7 438724 36628 ?        S    12:19   0:00 php-fpm: pool web11
web4      3440  0.0  1.6 439304 34020 ?        S    12:19   0:00 php-fpm: pool web4
web19     3402  0.0  1.5 439764 32140 ?        S    12:19   0:00 php-fpm: pool web19
5022      4730  0.0  1.5 166684 31904 ?        S    12:20   0:02 python -c from pyovpn.cserv.wserv_entry import start ; start() -no -u openvpn_as
web21     1092  0.0  1.5 430616 31796 ?        S    14:15   0:00 /usr/bin/php-cgi -d open_basedir=/var/www/clients/client22/web21/web:/var/www/cli
web18     3286  0.0  1.5 437516 31232 ?        S    12:19   0:00 php-fpm: pool web18
web19     3407  0.0  1.5 438968 30944 ?        S    12:19   0:00 php-fpm: pool web19
5003      7229  0.0  1.3 430612 27944 ?        Ss   12:24   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfi
root      3205  0.0  1.1 114480 23456 ?        Ss   12:19   0:04 linode-longview
root      4729  0.0  1.0 135428 22316 ?        S    12:20   0:00 python -c from pyovpn.log.logworker import start ; start()
www-data 23285  0.0  1.0 526780 21016 ?        S    13:32   0:00 /usr/sbin/apache2 -k start
www-data 24442  0.0  1.0 526776 21012 ?        S    13:38   0:00 /usr/sbin/apache2 -k start
www-data 24415  0.0  1.0 526704 20948 ?        S    13:37   0:00 /usr/sbin/apache2 -k start
www-data 28961  0.0  1.0 526712 20924 ?        S    13:56   0:00 /usr/sbin/apache2 -k start
www-data 18790  0.0  1.0 526668 20872 ?        S    13:13   0:00 /usr/sbin/apache2 -k start
www-data 18799  0.0  1.0 526660 20864 ?        S    13:13   0:00 /usr/sbin/apache2 -k start
www-data 32121  0.0  1.0 526740 20788 ?        S    14:07   0:00 /usr/sbin/apache2 -k start
www-data 11678  0.0  0.9 526792 19064 ?        S    12:40   0:00 /usr/sbin/apache2 -k start
www-data 11709  0.0  0.9 526724 18892 ?        S    12:41   0:00 /usr/sbin/apache2 -k start
www-data  7134  0.0  0.9 526752 18816 ?        S    12:21   0:00 /usr/sbin/apache2 -k start
root      4926  0.0  0.7 114824 14920 ?        S    12:20   0:02 python -c from pyovpn.sagent.iptworker import start ; start()
web5      3423  0.0  0.7 435012 14792 ?        S    12:19   0:00 php-fpm: pool web5
root      4899  0.0  0.7 114808 14688 ?        S    12:20   0:00 python -c from pyovpn.sagent.iptworker import start6 ; start6()
5003      7231  0.0  0.6 431464 12704 ?        S    12:24   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfi
list      3948  0.0  0.6  52848 12352 ?        S    12:19   0:01 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s
list      3938  0.0  0.5  52852 12184 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=CommandRunner:0:1 -s
list      3945  0.0  0.5  52872 12172 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s
list      3935  0.0  0.5  52836 12140 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=ArchRunner:0:1 -s
list      3939  0.0  0.5  52812 12128 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s
root      3229  0.0  0.5 435628 12112 ?        Ss   12:19   0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
list      3952  0.0  0.5  52896 12108 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=VirginRunner:0:1 -s
list      3954  0.0  0.5  52892 12044 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s
list      3936  0.0  0.5  52884 11964 ?        S    12:19   0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=BounceRunner:0:1 -s
root      4228  0.0  0.5  51600 11100 ?        Ss   12:19   0:00 munin-node
root      3957  0.1  0.4 181896 10068 ?        Sl   12:19   0:09 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock
list      3931  0.0  0.4  61412  9876 ?        Ss   12:19   0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s -q start
postfix  26643  0.0  0.4  75184  9536 ?        S    13:45   0:00 smtpd -n smtp -t inet -u -c -o stress= -s 2
bind      3116  0.0  0.4 183168  8724 ?        Ssl  12:19   0:00 /usr/sbin/named -u bind
www-data  3722  0.0  0.4 172400  8676 ?        S    12:19   0:00 /usr/sbin/apache2 -k start
www-data  3719  0.0  0.4 171224  8196 ?        S    12:19   0:00 /usr/sbin/fcgi-pm -k start
postfix    808  0.0  0.3  64252  7940 ?        S    14:11   0:00 smtpd -n 127.0.0.1:10025 -t inet -u -c -o content_filter= -o local_recipient_maps
postfix  30114  0.0  0.3  68024  7380 ?        S    14:00   0:00 trivial-rewrite -n rewrite -t unix -u -c
vmail      753  0.0  0.3  39108  6132 ?        S    14:10   0:00 dovecot/imap
clamav    3999  0.0  0.2  69392  6080 ?        Ss   12:19   0:04 /usr/bin/freshclam -d --quiet --config-file=/etc/clamav/freshclam.conf
postfix  30113  0.0  0.2  67832  6040 ?        S    14:00   0:00 proxymap -t unix -u
vmail    32203  0.0  0.2  39112  5816 ?        S    14:09   0:00 dovecot/imap
vmail    32197  0.0  0.2  38456  5552 ?        S    14:09   0:00 dovecot/imap
postfix   5241  0.0  0.2  42484  5500 ?        S    12:20   0:00 tlsmgr -l -t unix -u -c
root      1924  0.0  0.2  71388  5448 ?        Ss   14:15   0:00 sshd: pengimo [priv]
vmail    32195  0.0  0.2  38520  5376 ?        S    14:09   0:00 dovecot/imap
pengimo   1944  0.2  0.2  21320  5284 pts/0    Ss   14:16   0:00 -bash
vmail     9547  0.0  0.2  49560  5232 ?        S    12:34   0:00 dovecot/imap
vmail    25559  0.0  0.2  38292  5200 ?        S    13:42   0:00 dovecot/imap
vmail      773  0.0  0.2  38380  5092 ?        S    14:11   0:00 dovecot/imap
root      3717  0.0  0.2  20660  5016 ?        S    12:19   0:00 vlogger (access log)
postfix   5127  0.0  0.2  59572  4980 ?        S    12:20   0:00 qmgr -l -t fifo -u
vmail     1923  0.0  0.2  37956  4976 ?        S    14:15   0:00 dovecot/imap
web16    12976  0.0  0.2 434900  4936 ?        S    12:49   0:00 php-fpm: pool web16
vmail    32193  0.0  0.2  37948  4924 ?        S    14:09   0:00 dovecot/imap
vmail    27744  0.0  0.2  37956  4904 ?        S    13:50   0:00 dovecot/imap
vmail    26762  0.0  0.2  37920  4880 ?        S    13:49   0:00 dovecot/imap
vmail      775  0.0  0.2  37936  4876 ?        S    14:11   0:00 dovecot/imap
web19     6309  0.0  0.2 434900  4876 ?        S    12:20   0:00 php-fpm: pool web19
vmail    32201  0.0  0.2  37948  4868 ?        S    14:09   0:00 dovecot/imap
vmail    26715  0.0  0.2  37984  4856 ?        S    13:47   0:00 dovecot/imap
vmail    26764  0.0  0.2  37936  4836 ?        S    13:49   0:00 dovecot/imap
www-data  3257  0.0  0.2 434880  4816 ?        S    12:19   0:00 php-fpm: pool www
www-data  3254  0.0  0.2 434880  4800 ?        S    12:19   0:00 php-fpm: pool www
web13     3367  0.0  0.2 434900  4780 ?        S    12:19   0:00 php-fpm: pool web13
web5      3426  0.0  0.2 434900  4772 ?        S    12:19   0:00 php-fpm: pool web5
web1      3333  0.0  0.2 434900  4768 ?        S    12:19   0:00 php-fpm: pool web1
web12     3375  0.0  0.2 434900  4764 ?        S    12:19   0:00 php-fpm: pool web12
web6      3264  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web6
web6      3271  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web6
web23     3325  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web23
web23     3327  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web23
web1      3342  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web1
web13     3365  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web13
web12     3384  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web12
web3      3399  0.0  0.2 434900  4760 ?        S    12:19   0:00 php-fpm: pool web3
vmail    25545  0.0  0.2  37932  4756 ?        S    13:42   0:00 dovecot/imap
dovenull 27465  0.0  0.2  24264  4736 ?        S    13:50   0:00 dovecot/imap-login
dovenull 27676  0.0  0.2  24264  4708 ?        S    13:50   0:00 dovecot/imap-login
vmail    27510  0.0  0.2  37952  4696 ?        S    13:50   0:00 dovecot/imap
vmail    26677  0.0  0.2  37948  4692 ?        S    13:46   0:00 dovecot/imap
vmail    25610  0.0  0.2  37948  4680 ?        S    13:44   0:00 dovecot/imap
vmail    32199  0.0  0.2  37936  4676 ?        S    14:09   0:00 dovecot/imap
vmail    27941  0.0  0.2  37836  4660 ?        S    13:54   0:00 dovecot/imap
root      1903  0.0  0.2  45496  4636 ?        S    14:15   0:00 dovecot/auth -w
vmail    32120  0.0  0.2  37836  4604 ?        S    14:07   0:00 dovecot/imap
dovenull 32194  0.0  0.2  24272  4588 ?        S    14:09   0:00 dovecot/imap-login
dovenull 32189  0.0  0.2  24272  4580 ?        S    14:09   0:00 dovecot/imap-login
dovenull 26676  0.0  0.2  24272  4568 ?        S    13:46   0:00 dovecot/imap-login
dovenull 26714  0.0  0.2  24272  4560 ?        S    13:47   0:00 dovecot/imap-login
dovenull 32196  0.0  0.2  24272  4556 ?        S    14:09   0:00 dovecot/imap-login
dovenull 32200  0.0  0.2  24272  4552 ?        S    14:09   0:00 dovecot/imap-login
dovenull   774  0.0  0.2  24272  4548 ?        S    14:11   0:00 dovecot/imap-login
dovenull 26760  0.0  0.2  24272  4544 ?        S    13:49   0:00 dovecot/imap-login
dovenull   771  0.0  0.2  24272  4528 ?        S    14:11   0:00 dovecot/imap-login
root      7063  0.0  0.2 108532  4520 ?        Sl   12:20   0:01 /usr/bin/monit -c /etc/monit/monitrc
dovenull 32117  0.0  0.2  24272  4504 ?        S    14:07   0:00 dovecot/imap-login
dovenull 25606  0.0  0.2  24272  4476 ?        S    13:44   0:00 dovecot/imap-login
vmail     8276  0.0  0.2  38464  4452 ?        S    12:26   0:00 dovecot/imap
vmail    31002  0.0  0.2  37840  4448 ?        S    14:02   0:00 dovecot/imap
dovenull 26763  0.0  0.2  24272  4440 ?        S    13:49   0:00 dovecot/imap-login
dovenull 31000  0.0  0.2  24272  4440 ?        S    14:02   0:00 dovecot/imap-login
dovenull  1922  0.0  0.2  24272  4436 ?        S    14:15   0:00 dovecot/imap-login
dovenull 27821  0.0  0.2  24272  4428 ?        S    13:52   0:00 dovecot/imap-login
vmail     9437  0.0  0.2  38208  4424 ?        S    12:30   0:00 dovecot/imap
vmail     7143  0.0  0.2  38240  4368 ?        S    12:21   0:00 dovecot/imap
dovenull  8272  0.0  0.2  24272  4320 ?        S    12:26   0:00 dovecot/imap-login
root      5314  0.0  0.2  45512  4268 ?        S    12:20   0:00 dovecot/auth
root      4946  0.0  0.2  42724  4212 ?        Ss   12:20   0:00 pure-ftpd (SERVER)
ntp       6802  0.0  0.2  39084  4164 ?        Ss   12:20   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:103
root      4920  0.0  0.1  23504  4040 ?        S    12:20   0:00 dovecot/config
postfix  30104  0.0  0.1  39956  3992 ?        S    14:00   0:00 pickup -l -t fifo -u -c
postfix    956  0.0  0.1  39956  3932 ?        S    14:15   0:00 showq -t unix -u -c
postfix   5311  0.0  0.1  39956  3916 ?        S    12:20   0:00 anvil -l -t unix -u -c
root      5122  0.0  0.1  37888  3888 ?        Ss   12:20   0:00 /usr/lib/postfix/master
znc       4961  0.0  0.1  41576  3740 ?        Ssl  12:20   0:01 /usr/local/bin/znc -d /var/lib/znc
pengimo   1943  0.0  0.1  71388  3684 ?        S    14:16   0:00 sshd: pengimo@pts/0
root      1959  0.0  0.1  19476  3560 pts/0    S    14:16   0:00 bash
5022      4960  0.0  0.1  36104  3284 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
5022      4975  0.0  0.1  36104  3236 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
5022      4993  0.0  0.1  36100  3188 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
5022      5035  0.0  0.1  36100  3152 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
root      1957  0.0  0.1  33536  3092 pts/0    S    14:16   0:00 sudo su
root      4772  0.0  0.1  49944  2892 ?        Ss   12:20   0:00 /usr/sbin/sshd
root      1958  0.0  0.1  37164  2644 pts/0    S    14:16   0:00 su
root      4153  0.0  0.1   9352  2612 ?        S    12:19   0:00 /bin/sh /usr/bin/mysqld_safe
root      3992  0.0  0.1  22312  2536 ?        S    12:19   0:00 /usr/lib/gamin/gam_server
root      1966  0.0  0.1  16996  2408 pts/0    R+   14:16   0:00 ps aux --sort -rss
nobody    3902  0.0  0.1  67524  2188 ?        Sl   12:19   0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1
root      3832  0.0  0.1  20420  2144 ?        Ss   12:19   0:00 /usr/sbin/cron
root      4913  0.0  0.1  21532  2076 ?        Ss   12:20   0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
root      2957  0.0  0.0  52804  1992 ?        Sl   12:19   0:00 /usr/sbin/rsyslogd -c5
root      4917  0.0  0.0  13188  1896 ?        S    12:20   0:00 dovecot/log
root      1046  0.0  0.0  21240  1808 ?        Ss   12:19   0:00 udevd --daemon
dovecot   4916  0.0  0.0  13060  1732 ?        S    12:20   0:00 dovecot/anvil
statd     2619  0.0  0.0  23356  1724 ?        Ss   12:19   0:00 /sbin/rpc.statd
root      7109  0.0  0.0  14588  1724 hvc0     Ss+  12:20   0:00 /sbin/agetty hvc0
root      5089  0.0  0.0  19628  1700 ?        S    12:20   0:00 iptables-restore -n
root      1902  0.0  0.0  19264  1592 ?        S    14:15   0:00 dovecot/ssl-params
root      2588  0.0  0.0  18984  1580 ?        Ss   12:19   0:00 /sbin/rpcbind -w
root      1136  0.0  0.0  21236  1512 ?        S    12:19   0:00 udevd --daemon
root      1137  0.0  0.0  21236  1472 ?        S    12:19   0:00 udevd --daemon
root      4670  0.0  0.0   4100  1368 ?        S    12:20   0:00 logger -t mysqld -p daemon.error
root      3750  0.0  0.0   4108  1344 ?        Ss   12:19   0:00 startpar -f -- jailkit
root         1  0.0  0.0  10660  1336 ?        Ss   12:19   0:00 init [2]
5022      4965  0.0  0.0  35952   640 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
5022      4981  0.0  0.0  35952   640 ?        S    12:20   0:00 openvpn-openssl --errors-to-stderr --config stdin
112       3809  0.0  0.0  29816   252 ?        Ss   12:19   0:00 /usr/bin/dbus-daemon --system
nobody    3749  0.0  0.0  22868   152 ?        Ssl  12:19   0:00 /usr/sbin/jk_socketd
root         2  0.0  0.0      0     0 ?        S    12:19   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    12:19   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    12:19   0:00 [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S<   12:19   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    12:19   0:00 [kworker/u4:0]
root         7  0.0  0.0      0     0 ?        S    12:19   0:02 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    12:19   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    12:19   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    12:19   0:00 [migration/1]
root        11  0.0  0.0      0     0 ?        S    12:19   0:00 [ksoftirqd/1]
root        12  0.0  0.0      0     0 ?        S    12:19   0:00 [kworker/1:0]
root        13  0.0  0.0      0     0 ?        S<   12:19   0:00 [kworker/1:0H]
root        14  0.0  0.0      0     0 ?        S<   12:19   0:00 [khelper]
root        15  0.0  0.0      0     0 ?        S    12:19   0:00 [kdevtmpfs]
root        16  0.0  0.0      0     0 ?        S<   12:19   0:00 [netns]
root        18  0.0  0.0      0     0 ?        S<   12:19   0:00 [perf]
root        24  0.0  0.0      0     0 ?        S    12:19   0:00 [xenwatch]
root        25  0.0  0.0      0     0 ?        S    12:19   0:00 [xenbus]
root       248  0.0  0.0      0     0 ?        S<   12:19   0:00 [writeback]
root       251  0.0  0.0      0     0 ?        S<   12:19   0:00 [crypto]
root       252  0.0  0.0      0     0 ?        S<   12:19   0:00 [kintegrityd]
root       253  0.0  0.0      0     0 ?        S<   12:19   0:00 [bioset]
root       255  0.0  0.0      0     0 ?        S<   12:19   0:00 [kblockd]
root       272  0.0  0.0      0     0 ?        S<   12:19   0:00 [md]
root       277  0.0  0.0      0     0 ?        S    12:19   0:00 [kworker/1:1]
root       363  0.0  0.0      0     0 ?        S<   12:19   0:00 [rpciod]
root       364  0.0  0.0      0     0 ?        S    12:19   0:00 [kworker/0:1]
root       492  0.0  0.0      0     0 ?        S    12:19   0:02 [kswapd0]
root       561  0.0  0.0      0     0 ?        S    12:19   0:00 [fsnotify_mark]
root       569  0.0  0.0      0     0 ?        S    12:19   0:00 [ecryptfs-kthrea]
root       591  0.0  0.0      0     0 ?        S<   12:19   0:00 [nfsiod]
root       599  0.0  0.0      0     0 ?        S<   12:19   0:00 [cifsiod]
root       612  0.0  0.0      0     0 ?        S    12:19   0:00 [jfsIO]
root       613  0.0  0.0      0     0 ?        S    12:19   0:00 [jfsCommit]
root       614  0.0  0.0      0     0 ?        S    12:19   0:00 [jfsCommit]
root       615  0.0  0.0      0     0 ?        S    12:19   0:00 [jfsSync]
root       620  0.0  0.0      0     0 ?        S<   12:19   0:00 [xfsalloc]
root       622  0.0  0.0      0     0 ?        S<   12:19   0:00 [xfs_mru_cache]
root       624  0.0  0.0      0     0 ?        S<   12:19   0:00 [glock_workqueue]
root       625  0.0  0.0      0     0 ?        S<   12:19   0:00 [delete_workqueu]
root       631  0.0  0.0      0     0 ?        S<   12:19   0:00 [gfs_recovery]
root       722  0.0  0.0      0     0 ?        S    12:19   0:00 [khvcd]
root       819  0.0  0.0      0     0 ?        S<   12:19   0:00 [bioset]
root       820  0.0  0.0      0     0 ?        S<   12:19   0:00 [drbd-reissue]
root       822  0.0  0.0      0     0 ?        S<   12:19   0:00 [rbd]
root       850  0.0  0.0      0     0 ?        S<   12:19   0:00 [kpsmoused]
root       852  0.0  0.0      0     0 ?        S<   12:19   0:00 [raid5wq]
root       856  0.0  0.0      0     0 ?        S<   12:19   0:00 [dm_bufio_cache]
root       880  0.0  0.0      0     0 ?        S<   12:19   0:00 [ipv6_addrconf]
root       895  0.0  0.0      0     0 ?        S<   12:19   0:00 [ceph-msgr]
root       901  0.0  0.0      0     0 ?        S<   12:19   0:00 [bioset]
root       925  0.0  0.0      0     0 ?        S<   12:19   0:00 [deferwq]
root       929  0.0  0.0      0     0 ?        S<   12:19   0:00 [kworker/0:1H]
root       930  0.0  0.0      0     0 ?        S    12:19   0:00 [jbd2/xvda-8]
root       931  0.0  0.0      0     0 ?        S<   12:19   0:00 [ext4-rsv-conver]
root      2631  0.0  0.0  25308     0 ?        Ss   12:19   0:00 /usr/sbin/rpc.idmapd
daemon    3078  0.0  0.0  16684     0 ?        Ss   12:19   0:00 /usr/sbin/atd
root      7133  0.0  0.0      0     0 ?        S<   12:21   0:00 [kworker/1:1H]
root     30922  0.0  0.0      0     0 ?        S    14:00   0:00 [kworker/u4:1]
root@viking:/#



Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 9:33 am 
Offline
Senior Newbie

Joined: Mon Apr 06, 2015 7:06 am
Posts: 8
Ahh!

From that it looks like php-fpm is using lots of resources.

Maybe I should swap the sites over to fast-cgi or mod_php?


Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 10:53 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Looks like you've quite a lot running on there, clamav is your biggest user with 384MB which isn't unusual it's a memory hog. PHP is your next largest culprit but it's not using an excessive amount. You have multiple PHP-FPM pools which from a security point of view is good since you can isolate sites but from a resource point of view it's bad since each site requires it's own pool.

Changing to mod_php will only make things worse since even static files will require a process that has PHP loaded, fastcgi is fpm's predecessor so no benefit there.

Now you say you're using 100% swap, this might not be a bad thing, how big is the swap? And can you see how much swapping you're doing? Linux will put things into swap that aren't being used very often, which is good since it frees up memory for file caches and other things.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: Re: Maxed out Swap
PostPosted: Mon Apr 06, 2015 12:46 pm 
Offline
Senior Newbie

Joined: Mon Apr 06, 2015 7:06 am
Posts: 8
The Swap is 512MB.

I've changed all of the sites to use fast-cgi and it seems that the swap is now sitting at around 20% used with the RAM at around 70%.

I'll keep an eye on this over the next few days and see if it's stable.

Thanks.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group