Date: Thu, 12 Jan 2006 12:45:12 -0500 From: Chuck Swiger <cswiger@mac.com> To: Wojciech Puchar <wojtek@tensor.3miasto.net> Cc: freebsd-questions@freebsd.org Subject: Re: limiting Buf memory Message-ID: <43C695A8.7050906@mac.com> In-Reply-To: <20060112125658.W35216@chylonia.3miasto.net> References: <20060111112654.O11627@chylonia.3miasto.net> <43C517B7.704@mac.com> <20060112125658.W35216@chylonia.3miasto.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43C695A8.7050906>