Date: Fri, 11 Sep 2009 15:03:37 -0500 From: Adam Vande More <amvandemore@gmail.com> To: John Almberg <jalmberg@identry.com> Cc: Linda Messerschmidt <linda.messerschmidt@gmail.com>, Ivan Voras <ivoras@freebsd.org>, freebsd-questions@freebsd.org Subject: Re: reducing size of apache instances Message-ID: <6201873e0909111303k472b20c2t43d9a635fa0151ee@mail.gmail.com> In-Reply-To: <4AAAA820.4020407@identry.com> References: <4AA9BCF0.6040003@identry.com> <h8dek8$tsa$1@ger.gmane.org> <4AAA577A.8070103@identry.com> <h8dq3n$4pi$1@ger.gmane.org> <4AAA8D60.4000300@identry.com> <237c27100909111105m4ab6fa37v1fa9019d2cd94d2@mail.gmail.com> <4AAAA820.4020407@identry.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 11, 2009 at 2:42 PM, John Almberg <jalmberg@identry.com> wrote: > Linda Messerschmidt wrote: > >> On Fri, Sep 11, 2009 at 1:48 PM, John Almberg<jalmberg@identry.com> >> wrote: >> >>> As a sanity check... I've been studying these processes all morning. When >>> I >>> use 'top', the column RES shows the amount of RAM used for the process, >>> correct? This is the value I'd like to get down. >>> >> >> How many Apache processes are involved, total? Because I'm really not >> sure how much success you're going to have with this. You're at 22mb >> already (by comparison mine are 44mb *without* mod_php). How much >> improvement are you looking for? A couple of megs? >> > > Yup... that's about what I got for my troubles. After turning off all the > unneeded modules, they are now running about 17mb. Not a huge improvement... > > I definitely need more ram and I have it on order. While I'm waiting for > it, I figured I'd see what processes I could slim down. > > My basic problem is at peak usage times (usually in the afternoon), the > server starts using swap space, and then response times really bog down. > > This is on a 'spare' server that is temporarily in service while one of our > 'big' servers is out for repair. This 'spare' server only has 1G ram and was > never really meant for web server service. > > It's trying it's best. I'm just trying to lighten the load for it. > > -- John > > > You've misunderstood what you've done. You have not saved a couple of MB, you've saved one. Of the 18 MB, nearly all of it is shared memory which is only loaded once. This is a bit hypothetical but take the following > 1160 vandemorea 1 46 0 18M 83108K select 1 51:18 2.39% httpd 1482 vandemorea 11 44 0 18M 220M ucond 1 104:47 2.20% httpd 37776 vandemorea 20 44 0 18M 1179M select 1 95:43 1.76% httpd 1301 vandemorea 1 45 0 18M 28856K select 1 167:00 1.07% httpd 1311 vandemorea 2 47 0 18M 128M select 1 53:39 0.68% httpd 1407 vandemorea 2 44 0 18M 49284K select 1 3:41 0.20% httpd 38613 vandemorea 1 44 0 18M 31220K select 0 8:16 0.00% httpd 1320 vandemorea 2 44 0 18M 53788K ucond 1 5:20 0.00% httpd 5455 vandemorea 1 44 0 18M 1292K select 0 4:26 0.00% httpd 64974 vandemorea 21 52 0 18M 241M ucond 0 4:20 0.00% httpd from your posts, I understand you read that as httpd using a total of 180 MB of RAM. This is incorrect. The RES column also included shared mem which is only loaded once but counted on each line. So if the size of the shared mem in use by httpd is 17MB, in total it would be consuming 27MB, not the 180. So chasing memory savings here is probably not pursuing low hanging fruit. 1GB web server is more than enough for basic www server, even more. -- Adam Vande More
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6201873e0909111303k472b20c2t43d9a635fa0151ee>