WebServer Investigation

The next layer to investigate is Web Server performance. I am considering IBM Http Server (I.H.S) for the investigation.

Enable Web Server Statistics Page

Edit httpd.conf file to enable server status module. Uncomment the below LoadModule if its commented out.

LoadModule status_module modules/mod_status.so
<IfModule mod_status.c>
ExtendedStatus On
</IfModule>

Configure who is allowed to view the server status page.

<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all

Temporarily, you can allow β€œall” to access the page.

Access the page using URL http://servername/server-status

You will also see the information similar to below that could be useful.

Server uptime: 3 minutes 5 seconds
Total accesses: 351 – Total Traffic: 2.7 MB
CPU Usage: u.07 s.02 cu0 cs0 – .0486% CPU load
1.9 requests/sec – 14.9 kB/second – 7.8 kB/request
17 requests currently being processed, 33 idle workers

A table with the following information will also be available on the server status page

Srv Child Server number – generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
Module Module active
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

 

Compress the page data

In httpd.conf file, uncomment the mod_deflate module

LoadModule deflate_module modules/mod_deflate.so

Add the following lines inside <IfModule mod_deflate.c></IfModule>

<IfModule mod_deflate.c>

SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|pdf)$ no-gzip dont-vary

</IfModule>

 

Enable Debug log

In httpd.conf file, change the log level to the desired level. The default level is warn.

LogLevel debug

The possible levels are – debug, info, notice, warn, error, crit, alert, emerg

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*