Reducing the Memory of Apache

I have been running a bot on a Linux cloud service.

A quarter of the memory was from the apache2 process.

 

Reduced it by changing maxclients to 1, as only I use it.

That was done by adding these lines to my /etc/apache2/apache2.conf file:

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 1
MaxRequestsPerChild 0
</IfModule>

And then running

    apache2ctl graceful-stop && apache2ctl start

Source: http://www.inetservicescloud.com/knowledgebase/setting-maxclients-in-apacheprefork-mpm/

 

About quantitativenotes

About Me
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment