|
Posted by C. on 07/04/07 21:02
On 4 Jul, 16:07, na <n...@na.na> wrote:
> The following is a lot of information about a specific performance
> tuning related problem I am having with a LAMP web server. I'm not sure
> if this group is appropriate for such discussions, please advise if
> otherwise.
>
I would bank on the problem being more Apache related than PHP
related.
> During testing there appears to be 50% of CPU resouces in idle state,
> with most dedicated to user, some in sys, and almost non in iowait
> states. This tells me that I should have room to process more
> concurrent requests without adversely affecting the response time of the
> web application.
Not necessarily; sometimes it can wait for things other than I/O. But
you should certainly be getting more throughput on the hardware you
cite.
> This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
<snip>
> Concurrency Level: 30
To a certain extent the results you are seeing are due to artefacts in
the way ApacheBench works - it tries to fire off all the requests at
once then waits to see how long it takes for them to come back - but
even still, using a very simple script this box (clunky IDE/1Gb/1800
athlon/X Windows/KDE/...) I can get >100 req/second. You're also not
allowing the system to reach a steady state particularly with regard
to number of processes.
Try a benchmark tool intended for long runs, or at least change the
StartServers/MinSpareServers to the level of concurrency.
> 2 0 208 655920 74548 1169612 0 0 10 0 1486 3482 47
> 3 51 0
Seems a bit of a coincidence that its topping out at 50%, Have you
checked the CPU affinity mask on the httpd process (actually, it'd be
*very* sensible to run httpd on one physical cpu and ab on the
other).
Usually the first thing I check on a new installation that seems to
running slow is that its not doing DNS lookups it shouldn't, and when
it does it can resolve the hostnames.
> KeepAlive Off
For testing only I presume?
> MaxKeepAliveRequests 100
>
> KeepAliveTimeout 2
You're not doing yourself a lot of favours here performance-wise.
> <IfModule prefork.c>
> <IfModule worker.c>
....and which have you got?
> LoadModule status_module modules/mod_status.so
What does it tell you when the tests are running?
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
> combined
> LogFormat "%h %l %u %t \"%r\" %>s %b" common
> LogFormat "%{Referer}i -> %U" referer
> LogFormat "%{User-agent}i" agent
>
> CustomLog logs/access_log combined
Doesn't %h do a PTR lookup on the client while %a returns the address
- or is it the other way round - I'd check.
>
> ĨLoadModule php5_module /usr/local/Zend/Core/modules/apache2/libphp5.so
>
Any significance to the nasty crud at the front of the line there?
(shows as two wee boxes full of stuff seperated by an I with an umlaut
in Google News/Firefox).
The source code of your test page would have been useful.
HTH
C.
Navigation:
[Reply to this message]
|