Paul Walker on 17 Jan 2012 12:24:40 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Tuning Apache/PHP memory use...


I'm running a linode VPS that's serving about 8-10 medium/low traffic Drupal sites via Apache 2.2.  I'm running into a memory bottleneck: Apache opens ~8 running processes that each swell to nearly 100MB of (virtual) memory each; stuff starts getting swapped to the swapdisk, and everything grinds to a halt. I've set the mysql and apache settings to those recommended by the linode faq: 

mysql
key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K
Apache
StartServers 1
MinSpareServers 3
MaxSpareServers 6
ServerLimit 24
MaxClients 24
MaxRequestsPerChild 3000
I'm thinking that I may need to institute some sort of caching so that Apache is serving static pages and not calling the PHP scripts on every request, but I'm not sure what strategy is here. Has anyone come up with a good strategy for limiting Apache and PHPs memory usage in a similar situation?

Any help appreciated!

Paul

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug