On Fri, Jan 11, 2002 at 01:07:00PM -0500, Greg Ames wrote: > Aaron Bannert wrote: > > > Keep in mind that the multithreaded MPMs will by their very nature have > > higher memory requirements than their single-threaded counterparts. I > > regularly see memory usage in the range you've reported. Yesterday > > while running with 500 threads, I can report that httpd was using 23M > > (20M RSS). If you consider that 500 prefork processes would take on > > the order 500*N, where N is usually 3-5MB, then this is a *significant* > > decrease in memory requirements -- which was one of the major goals of > > the hybrid multiprocess/ multithreaded httpd model. > > Good point. I can see it while worker is getting pounded. > > hmmmn, but what if the traffic dries up completely? Should we expect memory > usage to shrink back down close to where it started?
Nope. Because you can never give memory back to the system, whatever top shows for the SIZE is always a floor. The best you can do is reuse memory (as we do with our pool freelists, and as free() does in libc). The system may decide to steal unused pages from httpd, which shows up in the discrepancy between SIZE and RSS (or RES on solaris) on the top output, but as soon as those pages become active again those two columns should converge. -aaron
