Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 2GB RAM, QuadCore server and I'm running nginx as a reverse proxy but what should my apache settings be for best optimization to handle A LOT of requests and how can I test it under load?


Timeout 300
TraceEnable Off
ServerSignature Off
ServerTokens ProductOnly
FileETag All
StartServers 3
<IfModule prefork.c>
MinSpareServers 2
MaxSpareServers 4
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 10000
KeepAlive On
KeepAliveTimeout 300
MaxKeepAliveRequests 100
share|improve this question

Here are my settings below. I like to use Apache Bench to test configurations. See my ab results below.

Timeout 45
KeepAlive Off

# prefork MPM
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          250
    MaxRequestsPerChild 1000

# worker MPM
<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          250
    MinSpareThreads      25
    MaxSpareThreads     150
    ThreadsPerChild      25
    MaxRequestsPerChild   0

Apache Bench results using the command: # ab -n 1000 -c 30

Server Software:        nginx/0.8.54
Server Hostname:
Server Port:            80

Document Path:          /
Document Length:        25501 bytes

Concurrency Level:      30
Time taken for tests:   0.076 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      25983000 bytes
HTML transferred:       25501000 bytes
Requests per second:    13203.06 [#/sec] (mean)
Time per request:       2.272 [ms] (mean)
Time per request:       0.076 [ms] (mean, across all concurrent requests)
Transfer rate:          335014.83 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:     0    2   0.3      2       3
Waiting:        0    1   0.5      1       3
Total:          1    2   0.2      2       3
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.