limiting Buf memory
Chuck Swiger
cswiger at mac.com
Thu Jan 12 09:45:10 PST 2006
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
More information about the freebsd-questions
mailing list