On Mon, 20 Mar 2006, Jim C. Nasby wrote: > No, this is perfectly fine. Inactive memory in FreeBSD isn't the same as > Free. It's the same as 'active' memory except that it's pages that > haven't been accessed in X amount of time (between 100 and 200 ms, I > think). When free memory starts getting low, FBSD will start moving > pages from the inactive queue to the free queue (possibly resulting in > writes to disk along the way). > > IIRC, Cache is the directory cache, and Buf is disk buffers, which is > somewhat akin to shared_buffers in PostgreSQL. I don't believe that's true. I'm not an expert in FreeBSD's VM internals, but this is how I believe it works: Active pages are pages currently mapped in to a process's address space. Inactive pages are pages which are marked dirty (must be written to backing store before they can be freed) and which are not mapped in to a process's address. They're still associated with a VM object of some kind - like part of a process's virtual address space or a as part of the cache for a file on disk. If it's still part of a process's virtual address space and is accessed a fault is generated. The page is then put back in to the address mappings. Cached pages are like inactive pages but aren't dirty. Then can be either re-mapped or freed immediately. Free pages are properly free. Wired pages are unswappable. Buf I'm not sure about. It doesn't represent that amount of memory used to cache files on disk, I'm sure of that. The sysctl -d description is 'KVA memory used for bufs', so I suspect that it's the amount of kernel virtual address space mapped to pages in the 'active', 'inactive' and 'cache' queues. -- Alex Hayward Seatbooker