Welcome! Log In Create A New Profile

Advanced

Re: high "Load Average"

March 13, 2010 11:48AM
On Sat, 2010-03-13 at 02:29 -0500, Sessna wrote:
> Cliff Wells Wrote:
> -------------------------------------------------------
> > You fail to mention what sort of disk subsystem you are using.
> One SCSI disk
>
> > High load is often indicative of I/O bottlenecks.
> > You also don't mention what OS you are using,
> CentOS release 5.4
>
> > you should install iotop and take a look at what process is driving the load
> Here is the snippet from iotop output
> Total DISK READ: 3.33 K/s | Total DISK WRITE: 3.27 M/s
> TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
> 20264 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 21604 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 21605 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 20054 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 20902 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 20275 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
> 20828 be/4 nobody 0.00 B/s 0.00 B/s 0.00 % 99.99 % php-cgi --fpm --fpm-config /etc/php-fp
>
> Looks like php-cgi makes 99.99% IO, but not really sure what this means

This means that php-cgi is spending 99.99% of its time in I/O, not that
it's creating 99.99% of your I/O. It means php-cgi is waiting almost
all the time.

> > (it might be Nginx, but more likely MySQL - restarting Nginx simply
> cancels whatever pending
> > requests MySQL had is my guess).
> MySQL is running on another PC, so php makes network connections to
> DB. It may take a while, of course, but should not php being blocked
> and sleeping while network system is processing request?

Yes, and this is certainly what is happening. You have to remember
that "load" is an indication of how many processes are waiting to be
scheduled, and this includes processes that are waiting on I/O. In this
case it looks like PHP isn't generating a lot of I/O, rather it is
*waiting*, creating a high load, and at the same time, you are running
out of PHP processes to handle new requests, which is why the box slows
down.

I'd follow these steps:

1) check the state of the MySQL server. See if this machine is
overloaded.

2) check MySQL itself. Turn on query logging and see if you have some
query that's taking a long time to complete.

3) take a look at your network to make sure that there isn't an issue
there (saturation, packet loss, etc).

Regards,
Cliff


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

high "Load Average"

Sessna March 12, 2010 12:34PM

Re: high "Load Average"

Cliff Wells March 12, 2010 02:12PM

Re: high "Load Average"

Sessna March 13, 2010 02:29AM

Re: high "Load Average"

Cliff Wells March 13, 2010 11:48AM

Re: high "Load Average"

Sessna March 14, 2010 05:15AM

Re: high "Load Average"

Cliff Wells March 15, 2010 06:36PM

Re: high "Load Average"

Stefan Parvu March 13, 2010 12:10PM

Re: high "Load Average"

Sessna March 14, 2010 07:46AM

Re: high "Load Average"

Stefan Parvu March 14, 2010 12:48PM

Re: high "Load Average"

Sessna March 15, 2010 04:55AM

Re: high "Load Average"

Stefan Parvu March 15, 2010 08:10AM

Re: high "Load Average"

Sessna March 16, 2010 11:53AM

Re: high "Load Average"

Stefan Parvu March 16, 2010 12:40PM

Re: high "Load Average"

Sessna March 18, 2010 06:01AM

Re: high "Load Average"

Cliff Wells March 16, 2010 01:36PM

Re: high "Load Average"

Rob Mueller March 23, 2010 11:04PM

Re: high "Load Average"

Yu Sun March 19, 2010 11:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready