0

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?

current:

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

1 Answer 1

0

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
</IfModule>

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

Apache Bench results using the command: # ab -n 1000 -c 30 http://example.com/

Server Software:        nginx/0.8.54
Server Hostname:        example.com
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .