From owner-freebsd-questions@FreeBSD.ORG Fri Sep 11 20:03:38 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC8CD10656B7; Fri, 11 Sep 2009 20:03:38 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.211.179]) by mx1.freebsd.org (Postfix) with ESMTP id 609C78FC08; Fri, 11 Sep 2009 20:03:38 +0000 (UTC) Received: by ywh9 with SMTP id 9so1980438ywh.32 for ; Fri, 11 Sep 2009 13:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0ZJm3xS8gkm8K3hmGTa/7oSw64UTnB9J3+aNdXmpHK0=; b=eEEGWRe+9zPVhGbZbufA9Nx27gFy6o8yN7OgXmVka+EPBQHxKQ8o/Z+wqUq1eXWvoJ fChRigRqO0S4Qh0+8fIoNezNebFq8P17vv0lcqaSpTXS+BiAC5765xS9QDQ3veAcXg41 8GWqfPZIlMG+8sNkAYK0p9/N/kRXv/aQx6p44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=d+zamQZgioWJQM5OfJj/BgNrrLQ8fZ7bhNuRdN/nYJ08Lav4Tmm6WuAkRdqT+2o8Cu wIm1LdZ8Yg/3sGgR5ezQ4t4nBIchiA1ZhE+wZFjyjLPdQynbOWGYN71MMFrajH7s/99g ENSzeEpx5HwNUCfS6TNzLcH9WyahYckcmSg2E= MIME-Version: 1.0 Received: by 10.150.1.13 with SMTP id 13mr5568834yba.269.1252699417761; Fri, 11 Sep 2009 13:03:37 -0700 (PDT) In-Reply-To: <4AAAA820.4020407@identry.com> References: <4AA9BCF0.6040003@identry.com> <4AAA577A.8070103@identry.com> <4AAA8D60.4000300@identry.com> <237c27100909111105m4ab6fa37v1fa9019d2cd94d2@mail.gmail.com> <4AAAA820.4020407@identry.com> Date: Fri, 11 Sep 2009 15:03:37 -0500 Message-ID: <6201873e0909111303k472b20c2t43d9a635fa0151ee@mail.gmail.com> From: Adam Vande More To: John Almberg Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Linda Messerschmidt , Ivan Voras , freebsd-questions@freebsd.org Subject: Re: reducing size of apache instances X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 20:03:38 -0000 On Fri, Sep 11, 2009 at 2:42 PM, John Almberg wrote: > Linda Messerschmidt wrote: > >> On Fri, Sep 11, 2009 at 1:48 PM, John Almberg >> 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