Benchmarking your server for traffic

D

DaReaper

Guest
Hello

I was wonder if there were ways to benchmark your server and get a report of how many requests your server can handle.

I'm using lighttpd and i've heard that it's good at handling lots of request for smaller servers.

i've tried the apache benchmarking tool which can be ran using this command -

Code:
 ab -kc 1000 -n 10000 http://www.yoursite.com/index.html  
or

ab -kc 1000 -n 10000 http://www.yoursite.com/index.php

This is the report i got for my homepage - index.html

Code:
Document Path:          /index.html
Document Length:        16378 bytes

Concurrency Level:      1000
Time taken for tests:   1.341 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9412
Total transferred:      166187060 bytes
HTML transferred:       163780000 bytes
Requests per second:    7459.22 [#/sec] (mean)
Time per request:       134.062 [ms] (mean)
Time per request:       0.134 [ms] (mean, across all concurrent requests)
Transfer rate:          121057.28 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   6.1      0      53
Processing:     0   37 120.5      0     861
Waiting:        0   36 120.5      0     861
Total:          0   38 121.0      0     861

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%     22
  80%     33
  90%     55
  95%    304
  98%    600
  99%    645
 100%    861 (longest request)


Basically for a PHP webpage hosted on myserver even though the server has plently of RAM left i get " 500 Internal server errors" once i make it to loads of 4.00 - 5.00

I don't know why ? Is it possible to increase the scale of the load so that it shows the error only at 10 or maybe 15 .

Thank you
 


Performance tuning that you are looking for takes many forms:
  • Application Performance Testing - Is the application setup optimally
  • Are the other services I am using configured optimally? PHP, Apache, etc......
  • System Performance Testing - Is my system configured optimally for what I am trying to do
  • Network Performance Testing - Is my network configuration ideal for what I am doing.
  • File System Performance Testing - Do I have the right file system options and the right file system
  • Code Optimization - Is the code that I am running properly done
  • Datbase Optimization - Am I being efficient in my queries? Am I being efficient about loading data? Am I using the right table layouts?

There are many pieces to this animal. Keep in mind that once you fix one thing you may break something else. There will come a point where you will determine the happy medium for what you are trying to do.

I don't do much with PHP, but I would look at your PHP configuration, HTTPd configuration, and network configuration. Those are the places that I would start.
 
Performance tuning that you are looking for takes many forms:
  • Application Performance Testing - Is the application setup optimally
  • Are the other services I am using configured optimally? PHP, Apache, etc......
  • System Performance Testing - Is my system configured optimally for what I am trying to do
  • Network Performance Testing - Is my network configuration ideal for what I am doing.
  • File System Performance Testing - Do I have the right file system options and the right file system
  • Code Optimization - Is the code that I am running properly done
  • Datbase Optimization - Am I being efficient in my queries? Am I being efficient about loading data? Am I using the right table layouts?

There are many pieces to this animal. Keep in mind that once you fix one thing you may break something else. There will come a point where you will determine the happy medium for what you are trying to do.

I don't do much with PHP, but I would look at your PHP configuration, HTTPd configuration, and network configuration. Those are the places that I would start.

Brilliant list of points! I would like to thank you for building that list for me.

I've been monitoring the working of different applications , LFD helps me identify which application or process uses more memory and what application is unusual.

I've done system load tests from online load testers and it turned out that most of it went fine with HTML pages, but pages that had PHP or any heavy content would usually go down after a certain amount of requests.

I need to learn how to optimize queries so that it takes lesser time to process. I'll also have to work on code optimization and i believe there are great tools available online for me.

Overall the factors that i need to do to maintain a stable server have been specified by you. Thank you :)
 

Members online


Top