php-fpm high disk read

kimbo

Verified User
Joined
Apr 23, 2013
Messages
57
Today I received a notification that my sites were down. I was not able to open directadmin, it kept on loading.
So I've opened a shell and saw a very high load:

top - 16:22:03 up 14 days, 17:00, 0 users, load average: 112.44, 86.50, 44.69
Tasks: 282 total, 1 running, 281 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.6 us, 2.9 sy, 0.0 ni, 0.0 id, 88.6 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1881904 total, 213456 free, 1510708 used, 157740 buff/cache
KiB Swap: 4145148 total, 2355548 free, 1789600 used. 215072 avail Mem

Then I saw a very huge disk read load:
7146 be/4 client1 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
6984 be/4 client1 146.48 K/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
7165 be/4 client2 73.24 K/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client2
7440 be/4 client3 73.24 K/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client3
6967 be/4 client1 73.24 K/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
7376 be/4 client1 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
7372 be/4 client1 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
7374 be/4 client1 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
6981 be/4 client1 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-fpm: pool client1
6604 be/4 dovecot 73.24 K/s 0.00 B/s 99.99 % 0.00 % dovecot/imap-login
7028 be/4 mysql 73.24 K/s 0.00 B/s 99.99 % 0.00 % mysqld
7313 be/4 client2 439.45 K/s 0.00 B/s 0.00 % 0.00 % php-fpm: pool client2
4986 be/4 nobody 73.24 K/s 0.00 B/s 99.99 % 0.00 % directadmin d
7588 be/4 root 73.24 K/s 0.00 B/s 99.99 % 0.00 % lfd - child closing
7626 be/4 root 58.51 M/s 0.00 B/s 99.99 % 0.00 % php-fpm: master process (/usr/local/php74/etc/php-fpm.conf) :eek:

No idea what was happening at that moment but the usage doesn't match the load of the clients.
This happened also the past other days.

Anyone experiencing the same? Any advice?
 
This is an old topic you brought up CocaCola guy. It could happen if he is out of resources, best bet is to see fpm logs.
 
So I was busy on a website today and it was stalling, the site didn't load.
Average load was almost 4, so too high.
This happens a few times a day and I need to solve this issue. Maybe I need to install monit to have a better idea.
 
KiB Swap: 4145148 total, 2355548 free, 1789600 used. 215072 avail Mem
1789600 used. - here your problem - all swapped
---
what is your config? nginx_apache? all PHP FPM? opcache installed?
sysctl -a | grep swa
shows 60% ?
 
KiB Swap: 4145148 total, 2355548 free, 1789600 used. 215072 avail Mem
1789600 used. - here your problem - all swapped
---
what is your config? nginx_apache? all PHP FPM? opcache installed?
sysctl -a | grep swa
shows 60% ?

output:
sysctl: reading key "net.ipv6.conf.all.stable_secret" sysctl: reading key "net.ipv6.conf.default.stable_secret" sysctl: reading key "net.ipv6.conf.eth0.stable_secret" sysctl: reading key "net.ipv6.conf.lo.stable_secret" vm.swappiness = 30

Which config info do you need.
 
wait few minutes till it collect cache, and the load will decrease.
Also you can tune it:
/usr/local/php73/lib/php.conf.d/10-directadmin.ini
/usr/local/php74/lib/php.conf.d/10-directadmin.ini
if you don't use CLI - you may disable it,
also set opcache.revalidate_freq XX (sec) as you wish (I use 30)
to apply changes - restart php-fpm
 
I'm beginning to think that another VPS is using a lot of disk and my VPS comes in wa... daily base I have issues.

cpu wa hoog.png
 
what type of disk used? what type of virtualization? ask hoster are there i/o limits to prevent neighbors load impact, try to stop all services and check iostat
 
Back
Top