Stress test with apache ab

I didn’t know at all apache ab sine yesterday when a guy who is working with us told me about this tool included in apache distribution.
Then I used with my site on localhost using this command line:

ab -n 9000 -c 900 localhost:8080/index.php

I got this results:

 Completed 900 requests Completed 1800 requests Completed 2700 requests Completed 3600 requests Completed 4500 requests Completed 5400 requests Completed 6300 requests Completed 7200 requests Completed 8100 requests Finished 9000 requests

 Server Software:        Apache/2.0.55 Server Hostname:        localhost Server Port:            8080

 Document Path:          /index.php Document Length:        37949 bytes

 Concurrency Level:      10 Time taken for tests:   407.890625 seconds Complete requests:      9000 Failed requests:        25    (Connect: 0, Length: 25, Exceptions: 0) Write errors:           0 Total transferred:      342093375 bytes HTML transferred:       340598850 bytes Requests per second:    22.06 [#/sec] (mean) Time per request:       453.212 [ms] (mean) Time per request:       45.321 [ms] (mean, across all concurrent requests) Transfer rate:          819.03 [Kbytes/sec] received

 Connection Times (ms)               min  mean[+/-sd] median   max Connect:        0    0   2.7      0      78 Processing:   140  452 217.8    359    2265 Waiting:       31  402 194.0    328    2218 Total:        140  452 218.0    359    2265

 Percentage of the requests served within a certain time (ms)   50%    359   66%    390   75%    421   80%    515   90%    750   95%    968   98%   1156   99%   1281  100%   2265 (longest request)

Mmhh.. 25 errors with 9000 connection and 900 concurrency level?
I must admit I never used stress test tool at all by my own, just one time I see it used when working for a big java based project.
Do you use some kind of benchmarking tool?

Installing PHP5 on Apache server

Today i was trying to install the new PHP5 module on my local apache server.
It’s really simple at least, but when searching for instructions i discovered WAMP5, which includes in the installation:

  • Apache 1.3.31
  • PHP 5.0.0
  • MySQL 4.0.18
  • PhpMyAdmin 2.5.7
  • sqlitemanager

I’ve immediately installed it 😉
Once installed you’ll see a new tray icon with some options for your installed services.
I sugges it if you are thinking to install PHP5 on your local machine (i have also a separate apache/php4/mysql3 framework on my machine too, in this way i can always switch trought the two version of PHP/MySQL)