On Wed, 2004-12-15 at 17:52 +0000, Gareth Harper wrote: > Having tweaked mod_perl with some preloading and other things a pmap on > solaris shows our apache processes using 4-5Mb of private memory (mainly > heap), the full process size is around 20Mb.
Sorry to break it to you, Gareth, but that's pretty standard. I usually see about 5 MB of unshared memory per process on Linux. I check how much is shared by looking at top, which does take into account the copy-on-write stuff on Linux. > If anyone can give me any pointers how I might track all this info down, > or alternatively any good ways of reducing the memory usage any further, > I would be very grateful. Most of the documentation on reducing memory usage is here: http://perl.apache.org/docs/1.0/guide/performance.html > The issue arises because we need to run up > to 800 apache process on each of our frontend webservers at peak times > (mainly to deal with slow connections) You should handle these with a front-end proxy. You will typically only need a fairly small number of mod_perl processes to keep 800 apache processes busy. The front-end proxy (or reverse proxy) approach is also documented in that same section. > One other issue I had was that I can preload all of the modules in > startup.pl, however each module still retains the extra memory unless I > actually remove the uses/requires from the module which is using it. That means something is wrong with your pre-loading. It should not make any difference at all if you have use/require stuff in your modules after pre-loading them. > ** Yes the obvious solution to this is to go with threaded Actually, reports so far are that running mod_perl 2 with threaded MPMs on Linux actually takes more memory because it breaks the copy-on-write sharing. Preforking is more efficient. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html