|
Debuging Apache Performance |
|
|
|
n easy way to debug Apache performance is by enabling Status Support from Apache Web Server. To do that, add the following lines to your httpd.conf file:
ExtendedStatus on
<Location /server-status> SetHandler server-status Order Deny,Allow Allow from all </Location> Then, restart apache, and you will be able to access a status page on the following link (asuming your configured domain is example.com):
http://www.example.com/status-server
You will get something like this:
Apache Server Status for www.example.com - Server Version: Apache/2.2.4 (FreeBSD) mod_ssl/2.2.4 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.3 with Suhosin-Patch
- Server Built: Jul 23 2007 19:40:53
- Current Time: Saturday, 22-Dec-2007 05:04:28 EET
- Restart Time: Saturday, 22-Dec-2007 05:03:23 EET
- Parent Server Generation: 2
- Server uptime: 1 minute 5 seconds
- Total accesses: 48 - Total Traffic: 159 kB
- CPU Usage: u.046875 s.0234375 cu0 cs0 - .108% CPU load
- .738 requests/sec - 2504 B/second - 3392 B/request
- 1 requests currently being processed, 6 idle workers
______W......................................................... ................................................................ ................................................................ ................................................................
Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process | Srv | PID | Acc | M | CPU | SS | Req | Conn | Child | Slot | Client | VHost | Request | | 0-2 | 22671 | 0/4/4 | _ | 0.02 | 9 | 0 | 0.0 | 0.00 | 0.00 | 86.X.Y.Z | webmail.example.com | GET /freebsd-5x-i586-mail-213/versions.dat HTTP/1.1 | | 1-2 | 22672 | 0/2/2 | _ | 0.01 | 2 | 20 | 0.0 | 0.00 | 0.00 | 66.A.B.C | example.com | GET /index.html HTTP/1.1 | | Srv | Child Server number - generation | | PID | OS process ID | | Acc | Number of accesses this connection / this child / this slot | | M | Mode of operation | | CPU | CPU usage, number of seconds | | SS | Seconds since beginning of most recent request | | Req | Milliseconds required to process most recent request | | Conn | Kilobytes transferred this connection | | Child | Megabytes transferred this child | | Slot | Total megabytes transferred this slot |
|---|
|