0

My web server has configuration 16 GB RAM 8vCPU (Hexcore). Apache version 2.4.

There will be massive site visit. So what will be the best and recommended Apache tuning configuration ? I am using worker MPM.

My current configuration:

<IfModule mpm_worker_module>
    ServerLimit             550
    StartServers             8
    MinSpareThreads          90
    MaxSpareThreads         350
    ThreadLimit              80
    ThreadsPerChild          64
    MaxRequestWorkers        512
    #MaxClients             448
    MaxRequestsPerChild   10000
</IfModule>

Hoping for you quick and genuine response. :-)

Barry Pollard
  • 4,461
  • 14
  • 26
Anand Shrestha
  • 41
  • 4
  • 12

1 Answers1

2

First up, switch to Event MPM - there is no reason to be in Worker MPM (there is some reason to be on Prefork MPM if you are using mod_php but if you are on worker then this must be a problem). More details: How do I select which Apache MPM to use?

Other than that it's a massive topic beyond the scope of a single question, but here's some tips (full disclosure many links to my own blog site where I blog about improving performance - feel free to Google for alternative sources if you want):

You should disable .htaccess, ensure your HTTPS config is up to scratch, ensure you are on the latest Operating System (as there are regular TCP tweaks added to Linux Kernel) and ensure on latest Apache while you are at it which will give you access to HTTP/2 which you should strongly consider.

Optimize your website itself by with compression (using precompressed files can have further benefit), ensuring the right media format and use decent caching.

If there really "will be massive site visit" then consider CDNs or LoadBalancers.

Barry Pollard
  • 4,461
  • 14
  • 26