vmstat -m strangeness

John Baldwin jhb at freebsd.org
Wed Nov 25 02:27:07 UTC 2015


On Tuesday, October 20, 2015 03:59:46 PM Ian Lepore wrote:
> root at wand:~ # vmstat -m | egrep "busdma|bounce|devbuf|Type"
>          Type InUse MemUse HighUse Requests  Size(s)
>        devbuf   125    10K       -      166  16,32,64,256,512,1024
>        busdma   922   116K       -      922  128
>        bounce   385   775K       -      385  32,128
> 
> How do 385 allocations of 32 or 128 bytes add up to 775K?  The
> answer... 768K of individual pages each allocated via contigmalloc() do
> n't show up in that output.  Why is that, and is it something that
> should be fixed?

Hmm.  The output is "correct", it's just that these small allocations have
relatively high overhead (PAGE_SIZE - 32 for a 32 byte allocation, etc.).

Not sure if there's a way to explain (in vmstat output) why the overhead for
certain malloc buckets is so high.  Perhaps the vmstat(8) manpage could be
expanded to explain what MemUse is and list the contigmalloc() case explicitly
as one possible reason for high overhead?

-- 
John Baldwin


More information about the freebsd-hackers mailing list