Tuning
Désactivation de modules non utilisés
a2dismod authz_default authz_groupfile status cgi env python
apache2.conf
Timeout 10
KeepAlive Off
<IfModule mpm_prefork_module>
StartServers 3
MinSpareServers 3
MaxSpareServers 10
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 2000
</IfModule>
/etc/init.d/apache2 restart
Benchmark
Server version: Apache/2.2.9 (Debian)
Server built: Jul 14 2009 20:03:28
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
expires_module (shared)
headers_module (shared)
info_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
rewrite_module (shared)
setenvif_module (shared)
ssl_module (shared)
status_module (shared)
Créer un fichier de 10Ko:
dd if=/dev/zero of=/tmp/10K bs=10K count=1
autobench
version: 2.1.2
${HOME}/.autobench.conf
host1 = www.benjaminbaudouin.com
uri1 = /10K
port1 = 80
low_rate = 20
high_rate = 200
rate_step = 20
num_conn = 5000
num_call = 10
timeout = 5
output_fmt = tsv
run.sh
#!/bin/bash
graph_title="Apache/2.2.9"
dir="$(date +%Y%m%d)";
[ -e ${dir} ] && rm -rf ${dir}
mkdir ${dir}
[ ! -e ${dir}/output.tsv ] && autobench --single_host --file ${dir}/output.tsv
[ ! -e ${dir}/output.ps ] && echo -e "[copy/paste] graph title: ${graph_title}" && bench2graph ${dir}/output.tsv ${dir}/output.ps
[ ! -e ${dir}/output.gif ] && convert -rotate 90 ${dir}/output.ps ${dir}/output.gif



Conclusion
La limite basse Apache 2.2.9 (Tuned) est visiblement de 35 req/sec pour des pages de 10ko.
Liens
Autobench
Optimize apache slow vps wordpress
Apache Performance Tuning
Follow Me!