If you ever created redirection rules in Apache htaccess or configuration file, you probably know that things can easily turn ugly. Without debugging tools and with long testing cycle, the debugging can be painful.
The htaccess tester tool can solve your issues: just place your requested URL and the actual htaccess that is being used, and you will get the actual result.
Keep Performing,
Moshe Kaplan
News, Personal view and perspective of the software performance field, cloud computing and industry based on my experience
Showing posts with label Apache httpd. Show all posts
Showing posts with label Apache httpd. Show all posts
Jul 16, 2013
Detecting Performance Bottlenecks in Apache httpd Server
“a problem well put is half solved.” ― John Dewey
One of the most important things to well detect a performance issues in a LAMP system is understand the actual processes that causing the issues.
What should we do?
One way to start with is properly configure the Apache logging in a way that we will get fine details about every request performance.
Key Apache httpd Parameters
%B Size of response in bytes, excluding HTTP headers.
%D The time taken to serve the request, in microseconds.
%{VARNAME}e The contents of the environment variable VARNAME.
%T The time taken to serve the request, in seconds.
%X Connection status when response is completed
How to Configure?
Modify your httpd.conf file according to the following article:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
How do we Analyze it?
Apache log files can be huge (a common case in systems that have some performance challenges).
A useful tool for analyzing the Apache logs, which Cnaan Aviv introduced to me, is GoAccess.
This tool generates reports, statistics and detects errors.
Bottom Line
When done right, solving performance issues is not a black magic. It just need to be done using a well defined method and the right tools.
Keep Performing,
Moshe Kaplan
One of the most important things to well detect a performance issues in a LAMP system is understand the actual processes that causing the issues.
What should we do?
One way to start with is properly configure the Apache logging in a way that we will get fine details about every request performance.
Key Apache httpd Parameters
%B Size of response in bytes, excluding HTTP headers.
%D The time taken to serve the request, in microseconds.
%{VARNAME}e The contents of the environment variable VARNAME.
%T The time taken to serve the request, in seconds.
%X Connection status when response is completed
How to Configure?
Modify your httpd.conf file according to the following article:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
How do we Analyze it?
Apache log files can be huge (a common case in systems that have some performance challenges).
A useful tool for analyzing the Apache logs, which Cnaan Aviv introduced to me, is GoAccess.
This tool generates reports, statistics and detects errors.
Bottom Line
When done right, solving performance issues is not a black magic. It just need to be done using a well defined method and the right tools.
Keep Performing,
Moshe Kaplan
Labels:
Apache,
Apache httpd,
GoAccess,
Logging,
Monitoring,
Performance Tuning
Subscribe to:
Posts (Atom)

