From owner-freebsd-stable@FreeBSD.ORG Tue Mar 20 09:44:15 2007 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A79EE16A401 for ; Tue, 20 Mar 2007 09:44:15 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 1704D13C48C for ; Tue, 20 Mar 2007 09:44:14 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (dqfmhm@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l2K9i7Vw044377; Tue, 20 Mar 2007 10:44:13 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l2K9i7YC044370; Tue, 20 Mar 2007 10:44:07 +0100 (CET) (envelope-from olli) Date: Tue, 20 Mar 2007 10:44:07 +0100 (CET) Message-Id: <200703200944.l2K9i7YC044370@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, shoesoft@gmx.net In-Reply-To: <200703181619.53167.shoesoft@gmx.net> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 20 Mar 2007 10:44:13 +0100 (CET) Cc: Subject: Re: Possible memory leak? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, shoesoft@gmx.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2007 09:44:15 -0000 Stefan Ehmann wrote: > Sometimes I'm noticing very high memory usage. Nearly my whole memory (1GB) is > used although I'm running my usual set of processes - normally memory usage > is much lower. That's normal. FreeBSD uses nearly all free memory for buffer cache and other kinds of caches. > I killed most processes but memory usage remains high. How do you measure "memory usage"? The numbers from top(1) are mostly meaningless. Personally I think top should be removed from FreeBSD, because it confuses many people (in fact I think _most_ people don't interpret the numbers correctly), but some people seem to be in love with it. :-) > Summing the VSZ values of the ps aux output gives about 34MB. top reports > 316MB active memory. While summing the VSZ values doesn't make any sense, that number doesn't sound worrying. > dmesg/ps/top output can be found here: > http://stud4.tuwien.ac.at/~e0125637/fbsd/ It all looks perfectly normal to me. If you need to find out whether you're running short of RAM, use "vmstat 5" and watch it for a while (ignore the first line because it contains only averages since reboot). If the "po" (page-out) and "sr" (scan rate, which is an indication of memory pressure) values are constantly very high, then you either need more RAM, or you have a memory leak somewhere. In all other cases (i.e. po and sr are zero most of the time), there's nothing to worry about. Note that the "pi" value is not important, because page- ins happen normally when reading executables, libraries or memory-mapped files. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "... there are two ways of constructing a software design: One way is to make it so simple that there are _obviously_ no deficiencies and the other way is to make it so complicated that there are no _obvious_ deficiencies." -- C.A.R. Hoare, ACM Turing Award Lecture, 1980