From owner-freebsd-questions@FreeBSD.ORG Tue Sep 1 23:52:19 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 17AAF1065670 for ; Tue, 1 Sep 2009 23:52:19 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id CFF6C8FC16 for ; Tue, 1 Sep 2009 23:52:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <4A9DB3AE.1000400@intersonic.se> Date: Wed, 02 Sep 2009 01:52:14 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Thunderbird 2.0.0.22 (X11/20090727) MIME-Version: 1.0 To: Dan Nelson References: <4A9D8057.8020307@intersonic.se> <20090901162931.d85ec256.wmoran@potentialtech.com> <20090901204147.GC2855@dan.emsphone.com> In-Reply-To: <20090901204147.GC2855@dan.emsphone.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: memory usage displsy 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: Tue, 01 Sep 2009 23:52:19 -0000 Dan Nelson wrote: > In the last episode (Sep 01), Bill Moran said: >> In response to Per olof Ljungmark : >>> What is a good way to find out how memory is used? Have a 6.4 box where >>> memory is used by something but I fail to see what is using it - tried >>> different switches to ps(1), tried the stat tools but a big chunk of >>> memory does not show at all. >>> >>> A proper tool for analyzing memory usage "live", this is a production >>> box? >> I've always been able to get what I need from top. You can do -o res to >> sort by resident memory usage, which helps. > > ps will sort by memory usage when given the -m flag. Also check ipcs -a to > see if there are any sysv shared memory segments hanging arnound. If you > don't see anything using the memory, where are you seeing that "something" > is using it? What I see is a slapd process using about 150M, then around a hundred imap processes 5-10M each. If the server is restarted, 70-80% will be free, now, after three months we're at 11% free loosing about 20% per month. The exact sum VSZ right now as shown by ps is 1073632k but top says Mem: 3111M Active, 311M Inact, 230M Wired, 144M Cache, 112M Buf, 27M Free Clearly something is grabbing memory and not releasing it. Stopping and starting various programs makes very little difference. No SYSV mem at all. Thanks,