linux:apache
Apache settings
This article descripes some optimal settings when running apache on a VPS whith limited memory. The setup was testet on a VPS server from Surftown with aprox 1Gb memory. The symptoms was from time to time slow performance on the hosted websites. CPU usage was low, and memory utilization looked fine. These settings can probably help solving performance issues.
First install the package apache-mpm-fork
$ apt-get install apache-mpm-fork
Then edit the /etc/apache2/apache.conf and find the following section and overwrite it with these settings.
<IfModule mpm_worker_module>
StartServers 2
MaxClients 50
MinSpareThreads 2
MaxSpareThreads 4
ThreadsPerChild 25
MaxRequestsPerChild 5000
</IfModule>
Now restart apache
$ /etc/init.d/apache2 restart
And you're done.