From owner-freebsd-questions@FreeBSD.ORG Mon May 8 01:43:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0508216A43D for ; Mon, 8 May 2006 01:43:29 +0000 (UTC) (envelope-from jhorne@dfwlp.com) Received: from zeus.int.dfwlp.com (zeus.dfwlp.com [208.11.134.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88CAA43D46 for ; Mon, 8 May 2006 01:43:28 +0000 (GMT) (envelope-from jhorne@dfwlp.com) Received: from hera.int.dfwlp.com (hera.int.dfwlp.com [192.168.125.82]) (authenticated bits=0) by zeus.int.dfwlp.com (8.13.6/8.13.6) with ESMTP id k481hQkC090537 for ; Sun, 7 May 2006 20:43:27 -0500 (CDT) (envelope-from jhorne@dfwlp.com) From: Jonathan Horne To: freebsd-questions@freebsd.org Date: Sun, 7 May 2006 20:43:26 -0500 User-Agent: KMail/1.9.1 References: <200605071209.15390.jhorne@dfwlp.com> <200605071219.41408.jhorne@dfwlp.com> <1147049020.6775.19.camel@genius.i.cz> In-Reply-To: <1147049020.6775.19.camel@genius.i.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605072043.26550.jhorne@dfwlp.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on zeus.int.dfwlp.com Subject: Re: memory usage 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: Mon, 08 May 2006 01:43:29 -0000 On Sunday 07 May 2006 19:43, Michal Mertl wrote: > Jonathan Horne wrote: > > On Sunday 07 May 2006 12:09, Jonathan Horne wrote: > > > i have a server that has 2GB ram, recently upgraded from 1GB ram. it > > > runs apache2.0 with php5, sendmail with spamass-milter, dovecot, > > > mysql5.0, cacti, and a couple other small things (like snmp, my bx irc > > > shell, etc). > > > > > > when ever i look at the memory usage (via phpsysinfo, or cacti graphs), > > > its nearly always showing less than 100mb of ram available. top shows > > > several perls (probably spamassassin), 8 or so httpds (typical), but > > > that would probably only account for (a liberal guess) 500-600 mb of > > > ram. > > > > > > is there a good way to find out where this bottomless ram funnel leads > > > to? or, should this behavior just be considered typical? > > > > > > thanks, > > > jonathan > > > > update... > > > > i just upgraded to the new phpsysinfo rc2, and it shows more detailed > > information about what the memory usage is doing. it shows that 1.57GB > > is being used by buffers. what is the significance of 1.57GB of memory > > being used by 'buffers'? > > I would expect a question like this is somewhere in the FAQ. > > It is typical that you only see a couple of hundred kilobytes of free > memory on a (at least a little used) FreeBSD system. The system > allocates 'physical' memory as needed (as long as there is some free) > and only when there is no free memory, it starts to reuse some of the > 'almost' free memory. 'Almost' free memory is mainly disk cache (your > buffers). > > This is nothing to worry about. You can see there is a memory shortage > when there is some swapping during normal workload (in top there appears > "kb in/out" on the swap line). It is neither anything to worry about > when you have some swap space used - FreeBSD is rather aggresively > copying parts of memory to swap when it feels to. As long as it doesn't > need to use the data in the swap often it's an optimization - even disk > cache is better usage of your memory then inactive parts of your > programs' memory. > > Michal well, i guess my system's top confirms what you say: Swap: 4071M Total, 4071M Free and, i wasnt experiencing any lack in performance, i was just curious. but i admit that i must be forgiven for almost doubting! thanks again, jonathan