# What is "Buf" in top output?



## arcadius (Nov 9, 2013)

```
$ top
...
Mem: 1491M Active, 12G Inact, 1966M Wired, 414M Cache, 1645M Buf, 114M Free
...
$ sysctl -a | grep mem
device  mem
vm.kmem_map_free: 16568107008
vm.kmem_map_size: 44371968
vm.kmem_size_scale: 1
vm.kmem_size_max: 329853485875
vm.kmem_size_min: 0
vm.kmem_size: 16612487168
vfs.ufs.dirhash_lowmemcount: 11452
vfs.ufs.dirhash_mem: 2206135
vfs.ufs.dirhash_maxmem: 26955776
debug.fwmem_debug: 0
hw.physmem: 17148702720
hw.usermem: 15087255552
hw.realmem: 18253611008
hw.firewire.fwmem.speed: 2
```

Docs say, that a page can be in one of five states: Active, Inactive, Cache, Free or Wired. The Buf state is not described. The only information about Buf I could find is that "The values shown by top(1) labeled as Inact, Cache, and Buf are all cached data at different aging levels."

So, what is "Buf"? How can we use this value from top?


----------



## aupanner (Nov 11, 2013)

Buf is an in-memory representation of on-disk data.  From top(1):


```
Physical Memory Stats
       Active:  number of bytes active
       Inact: number of bytes inactive
       Wired: number of bytes wired down, including BIO-level cached file data pages
       Cache: number of clean bytes caching data that are available for immediate reallocation
       Buf:   number of bytes used for BIO-level disk caching
       Free:  number of bytes free
```

For more info: http://www.freebsd.org/doc/en/books/arch-handbook/vm.html


----------

