Select Page

Benchmarking your LAMP server

Benchmarking your LAMP server

The acronym LAMP refers to a solution stack of software, usually free and open source software, used to run dynamic Web sites or servers. It stand for:

  • Linux, for the operating system;
  • Apache, the Web server;
  • MySQL, the database management system (or database server);
  • Perl, Python, and PHP, the programming languages.

 ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
Apache-utils package contains utility programs for webservers and some add-on programs useful for any webserver. These include:

  • ab (Apache benchmark tool)
  • Logresolve (Resolve IP addresses to hostname in logfiles)
  • htpasswd (Manipulate basic authentication files)
  • htdigest (Manipulate digest authentication files)
  • dbmmanage (Manipulate basic authentication files in DBM format, using perl)
  • htdbm (Manipulate basic authentication files in DBM format, using APR)
  • rotatelogs (Periodically stop writing to a logfile and open a new one)
  • split-logfile (Split a single log including multiple vhosts)
  • checkgid (Checks whether the caller can setgid to the specified group)
  • check_forensic (Extract mod_log_forensic output from apache log files)

This package Apache-Utils can be install through apt or YaST depending if you are using a Debian base distro or OpenSuse


  • Define realistic objectives, do not create too much virtual clients if you do not have usually that kind of user traffic..
  • For example an objective could be: number of users served, or percentage of the requests served within a certain time
  • This tool ab do not simulate realistic user behavior, it just hit a page without being able to simulate a complex workflow (like login, navigate and do things users usually do)
  • Try to monitor at the same time the CPU/Memory consumed in order not to make false assumption on apache settings (use top d 1)


It is an iterative process!

  1. Benchmark,
  2. Change settings and
  3. Restart benchmark.

It is very important to only change a setting a time in order to better identify what is really bringing something! By changing only one settings at a time, you can:

  • Better see the influence on CPU, memory (you must look also at resources, a server swapping to disk is never good)
  • There is not so much universal settings bringing a speed kick (except DNSlookup off, keep alive small), some settings are depending on your Linux kernel version, CPU class, disk speed, network latency

Other components

mysql While tuning apache, you will see that most of the time is used in PHP/MySQL, for MySQL recommend to run at the same time, read more here

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments


Would love your thoughts, please comment.x