Home > OS >  optimize Apache performance mpm_prefork_module
optimize Apache performance mpm_prefork_module

Time:01-29

I have a VPS server that sometimes stop Apache2 because its settings are not well seized

Service specifications: RAM 30 CPU 8

I tried to seize it myself, but I did not succeed The current settings: <IfModule mpm_prefork_module> StartServers 100 MinSpareServers 20 MaxSpareServers 50 ServerLimit 4000 MaxClients 1400 MaxRequestWorkers 8000 MaxConnectionsPerChild 10000 MaxRequestsPerChild 5000 KeepAlive 0 </IfModule>

Can you give me the best settings that suit the server specifications, knowing that it receives huge requests

CodePudding user response:

mod_prefork is an old module. I advise you to use mod_event or mod_worker these module are clearly better. You can see more information here explanation.

About your configuration, it’s depend on you server software stack.
 If you have only Apache with maybe a Php webapp or other. I think you can use this profile, of course with monitoring you can configure it better that my estimation.

StartServers             8
MinSpareServers          10 
MaxSpareServers          40 
KeepAlive                0
ServerLimit              1500
MaxRequestWorkers        1500
MaxConnectionsPerChild   4000

MaxRequestWorkers and MaxClients is the same directive, MaxClients is the old version. MaxRequestsPerChild and MaxConnectionsPerChild is the same too, MaxRequestsPerChild is the old version.

  • Related