Re: benchmarking, how ?
| From: | (Stig Sæther Bakken) | Date: | Wed, 02 May 2001 22:59:15 +0000 |
| Subject: | Re: benchmarking, how ? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-106@lists.php.net to get a copy of this message | ||
["Eduardo Dominguez" <lalo_dominguez@yahoo.com>]
> I need to find out what the limits are for my php
> based web site. Specifically, I need to know how
> many visitors it can the server can handle in a day.
>
> There are several scripts/apps that I have found
> to benchmark (ab, httperf and httpload) but they dont
> come with a nice documentation less tips and techniques
> as to how do it and what to look for.
>
> The server is running redhat 6.2 with php4.0.4pl1
> with a MySQL DB.
>
> Any help is appreciated as in to what to statistics
> to gather, what to monitor, what parameters are good
> to pass to the above mentioned utilities etc. Any pointer
> is good.
For a meaningful test, you need to try to get as close as possible to
user behaviour. One way of testing is to set up a number of "users"
who "click" on your site every-so often. For example, 500 users
clicking every 5 seconds makes for 100 requests per second. Then
measure the min/average/max and distribution of response times. If
you find a benchmarking tool with good enough logging, you can just
make it generate traffic and script the reporting part yourself.
Another thing that is helpful to avoid being fooled by bottlenecks is
to do checkpointing during each request, especially before and after
database operations and other external calls.
> Also, I would be playing with the configuration of the
> box trying to squeeze every drop of performance out of
> apache, php and mysql. Any tips in this area are also
> welcome.
One thing that will help you bunches on a site using PEAR code is
ZendCache. It's expensive, but it's also very effective.
- Stig
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway