From owner-freebsd-questions@FreeBSD.ORG Thu Jan 12 17:45:10 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 94E6816A420 for ; Thu, 12 Jan 2006 17:45:10 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E5C43D4C for ; Thu, 12 Jan 2006 17:45:09 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id E08BF5DAB; Thu, 12 Jan 2006 12:45:08 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02492-05; Thu, 12 Jan 2006 12:45:08 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-122-227.ny325.east.verizon.net [68.161.122.227]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id D255A5D99; Thu, 12 Jan 2006 12:45:07 -0500 (EST) Message-ID: <43C695A8.7050906@mac.com> Date: Thu, 12 Jan 2006 12:45:12 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wojciech Puchar References: <20060111112654.O11627@chylonia.3miasto.net> <43C517B7.704@mac.com> <20060112125658.W35216@chylonia.3miasto.net> In-Reply-To: <20060112125658.W35216@chylonia.3miasto.net> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Re: limiting Buf memory 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: Thu, 12 Jan 2006 17:45:10 -0000 Wojciech Puchar wrote: >>> Mem: 529M Active, 209M Inact, 149M Wired, 38M Cache, 109M Buf, 1772K >>> Free >>> >>> while "Cache" is dynamic, Buf is not and never goes down. >>> >>> how can i get it down to somehow like 40MB? >> >> I think "Buf" corresponds to what NetBSD's top calls "File", it's the >> amount of memory that is bufferring raw blocks from the disk. Your >> traditional VM disk cache is the "Cache" entry. >> > possibly you don't understand my question which is - how to set limits > to "Buf" because it's now always 110MB. i Possibly you don't understand your question, either. "Buf" is not a state which is exclusive: that 110MB of memory is comprised of backing store from the disk which is in the Active or Inactive states. hw.physmem - Wired ~= hw.usermem Active + Inactive + Cache + Free ~= hw.usermem It varies based mostly upon the specific tasks being run because it consists mainly the of read-only pure TEXT segments, so there is only one copy underlying in physical RAM, even if multiple instances of a process are running (ie, the same physical page could be mapped into different places in each process address space, commonly used for PIC shared libraries). If you really want to reduce the amount of RAM the system uses, you can set hw.physmem="256M" or whatever in /boot/loader.conf to force the system to not use all of the physical RAM available. If you want to tune the VM disk cache, see "man tuning" and "sysctl vm". -- -Chuck