In a few words, this repository keeps an automated benchmark for web servers (specially Apache httpd).
Personally, I do not trust in most of the web server benchmarks that I have seen on the Internet. Why? Many of them don't clearly state what kind of configuration and environment was used in their tests. By this reason, I decided to create my own test environment with focus on the reproducibility of the data and honesty with results.
With this in mind, I focused on three things:
- Reproducibility: Provide a structure which everybody can easily reproduce the results;
- Scalability: Structure which everybody can deploy locally in a set of virtual machine (development environment), or in a bunch of computers, or even in any servers in anywhere;
- Extensible: Something easy to add features and behaviours.
- Python 2
- R
- Ansible 2.1
- Rake 11.1
To make easy to reproduce try this benchmark or adapt it, we have the option to run it inside a virtual machine. This setting relies in some additional softwares, that you have to install. First of all, you have to install:
- Virtualbox 5
- Vagrant 1.8
Secondly, you need to configure your public key. If you not have a public key, generate an SSH key. Copy your id_rsa.pub inside /vagrant folder.
cp ~/.ssh/id_rsa.pub /vagrant
The next step, it is create the virtual machine to execute the web server and other to execute the stress script. Just type:
rake vms:configure
The last step is not required every time, only if you destroy all the virtual machines (vms) or if it is the first time you execute this command. The following command it is the required to wake up your vms:
rake vms:wakeup
Finally, It is good to say that we have some additional commands to work with our vms:
rake vms:configure # Configure all machines
rake vms:destroyall # Destroy all vms
rake vms:haltall # Halt all vms
rake vms:wakeup # Start all virtual machines
Ps.: Keep reading, you have to deploy (next section)
Our deploy has two requirements in the remote machine:
- Python 2 installed
- Connecting via SSH
- Root privileges
Finally, you just have to type the following command to deploy:
rake deploy
This command just enters in both machines, install and configure it.
To execute the banchmark just type:
rake benchmark:run
You have to wait a little bit here...
If you want to see the results generated by the benchmark, take a look at the results folder. If you want to plot the results, just type:
rake results:graphs