I was hoping to get some expert advice on the best settings for apache.
Currently our site operates the following way.
- User Request the page with low resolution images.
- The page loads quickly and then javascript will lazy load.
- Ajax is called to perform different functions.
Some pages might have 30 requests for that user.
The servers being used are
- Dual Quad core Xeon Proc
- 8gb ram
- SSD HD
- Mysql is used.
- Redhat
Current apache settings are
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
I am thinking keepalive should be on, but the timeout should be set to 1 second. Any thoughts would be much appreciated.
#httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: Feb 7 2012 09:50:11
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Test, test, test and test.
Grab some decent load generators (no,
ab
is not suited) like siege, jperf, flood or tsung, establish a baseline, then start loading with different combinations of requests and busyness.It is also evident that you have no clue how apache is currently configured, since only one MPM is used at any time; pre-2.4, this is actually compiled-in and cannot be changed after installation.
So first of all, figure out what the current config actually is; update your post with the results of
httpd -V
and we can provide further help.