Re: Reducing load for LAMP app?



Gilles Ganault wrote:
On Sun, 06 Jan 2008 15:54:17 -0500, Jerry Stuckle
<jstucklex@xxxxxxxxxxxxx> wrote:
It's already in seconds.

OK. I can live with the trailing E :-)


The training E is not in the number - that's how very small floating point numbers are displayed.

Looks like a very busy host:
======
load average: 61.88, 51.08, 74.30
Tasks: 476 total, 7 running, 467 sleeping, 0 stopped, 2 zombie
Cpu(s): 78.8% us, 18.7% sy, 0.0% ni, 0.7% id, 0.3% wa, 0.5% hi,
1.0% si
Mem: 1015484k total, 993344k used, 22140k free, 76920k
buffers Swap: 514040k total, 101032k used, 413008k free, 208496k
cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
10685 ze-card 19 19 984 736 724 R N 93.3 0.0 5671m webalizer
32072 nobody 9 0 16932 15M 12156 S 6.0 0.3 0:01 httpd
32196 nobody 9 0 16224 14M 12144 S 3.5 0.3 0:01 httpd
1868 nobody 9 0 16284 14M 12620 S 3.1 0.3 0:00 httpd
2136 nobody 9 0 16080 14M 12164 S 2.5 0.3 0:00 httpd
32205 nobody 9 0 16300 14M 12136 S 2.3 0.3 0:00 httpd
32231 nobody 9 0 16316 14M 12172 S 2.3 0.3 0:00 httpd
32124 nobody 9 0 16620 14M 12184 S 1.9 0.3 0:01 httpd
======

If I understood what I read on top and vmstat, this host has enough
RAM, but the CPU is heavily used (load average much higher than 1),
with lots of sleeping processes.

I have to find out if it's just PHP or MySQL, or even the network that
is the bottleneck.


Lots of sleeping processes is normal. To me, memory looks a bit marginal. Not enough to necessarily cause problems, because you're only using a little swap space. The real question would be if this is normal, a peak - or maybe a lull in the traffic. In the last case it could be a problem.

And yes, the CPU usage is high, but not necessarily that high.

I'm really wondering if your host is trying to put too many people on your server. Monitoring the results of top over a period of time will help show you.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: Reducing load for LAMP app?
    ... PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND ... If I understood what I read on top and vmstat, this host has enough ... RAM, but the CPU is heavily used (load average much higher than 1), ... first and that would likely be your first clue. ...
    (comp.lang.php)
  • Re: Relationship between load average and CPU busy or CPU idle
    ... > Is there some kind of relationship between the load average figure and CPU ... Because Unix expects disk I/O to finish really soon ... idle time is computed by looking at what the processors are ...
    (comp.unix.solaris)
  • Re: unixware 7.1.4 sendmail issues
    ... daemon Daemon0: load average: 36 ... By which my esteemed colleague means that it seems like a sendmail ... Find cpu hogs: ...
    (comp.unix.sco.misc)
  • Re: [opensuse] top Load average figures
    ... top Load average figures ... load of 2.00 to fully be using the CPU. ... Like if a room is dark, that only tells you that the room ... it is possibly a clue ...
    (SuSE)
  • Re: How can this top command output make sense? Load over 7 and total CPU use ~5%
    ... would indicate 50% CPU utilization overall (1 process using only 1 ... Meaning a load average of 1.00 on a single-core versus dual-core means ... it might take that long to load up L2/L3 cache ...
    (freebsd-questions)