From owner-freebsd-questions@FreeBSD.ORG Sat Sep 12 03:25:34 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 8F7831065670 for ; Sat, 12 Sep 2009 03:25:34 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 301C78FC17 for ; Sat, 12 Sep 2009 03:25:34 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.0/8.14.0) with ESMTP id n8C3PXha083896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Sep 2009 22:25:33 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id n8C3PX2W004549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Sep 2009 22:25:33 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id n8C3PWNt004548; Fri, 11 Sep 2009 22:25:32 -0500 (CDT) (envelope-from dan) Date: Fri, 11 Sep 2009 22:25:32 -0500 From: Dan Nelson To: John Almberg Message-ID: <20090912032532.GB54762@dan.emsphone.com> References: <4AAA577A.8070103@identry.com> <4AAA8D60.4000300@identry.com> <237c27100909111105m4ab6fa37v1fa9019d2cd94d2@mail.gmail.com> <4AAAA820.4020407@identry.com> <6201873e0909111303k472b20c2t43d9a635fa0151ee@mail.gmail.com> <4AAAB124.8050908@identry.com> <237c27100909111515s70310092ua980038b3f16983e@mail.gmail.com> <4AAAE7F6.2060806@identry.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AAAE7F6.2060806@identry.com> X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email2.allantgroup.com [199.67.51.78]); Fri, 11 Sep 2009 22:25:33 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: 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: Sat, 12 Sep 2009 03:25:34 -0000 In the last episode (Sep 11), John Almberg said: > > In this case you don't want to look at processes with big RES, you > > want to find processes with a big difference between RES and SIZE > > and/or the ones with flat-out largest SIZE. Try sorting top by SIZE > > and see what bubbles up. (Ignore rpc.statd if it's running.) > > Huh... okay. That's interesting. > > Well the biggest SIZE process is mysql, followed by three mongrel > instances (for a ruby on rails app), and then a bunch of httpd processes. > > Mysql is optimized for a small server, there isn't much I can do about the > size of the Rails app, so the apache instances seemed like the logical > place to start. > > I'm starting to wonder about the Swap info from top... it never changes. > It has said the same thing all day, since I've been watching it. Does > that make sense? > > Swap: 2008M Total, 150M Used, 1858M Free, 7% Inuse If you previously ran some memory-intensive program, the system would have pushed some unused data out to disk ( login processes for unused VTYs, other daemons that are rarely used, etc ), but it won't free up that swap space until those processes exit. As long as you don't see "###K Out, ###K In" on that swap line, you're not actively using the swap space and don't have to worry. -- Dan Nelson dnelson@allantgroup.com