This config is for low resources systems. 1. Configure Apache2 worker MPM On most Systems Apache2 consumes most memory (in the basic configuration on most Systems about 480 MB RAM).So we have to change the MPM workers to a lower value: Open your apache2.conf # vi /etc/apache2/apache2.conf Change the worker MPM Part to this: # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_worker_module> StartServers 1 MaxClients 100 MinSpareThreads 1 MaxSpareThreads 50 ThreadsPerChild 10 MaxRequestsPerChild 5000 </IfModule> Restart Apache2 to bring the effect: # /etc/init.d/apache2 force-reload
2. Configure MySQL Modify the my.cnf configuration to make MySQL less RAM intensive. Open your my.cnf # vi /etc/mysql/my.cnf file Change your *Fine Tuning part to this: # # * Fine Tuning # key_buffer = 1M max_allowed_packet = 8M thread_stack = 64K thread_cache_size = 8 #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 8M Restart your MySQL Server: # /etc/init.d/mysql restart |
