[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: vmstat buckets
From:       John Baldwin <jhb () freebsd ! org>
Date:       2013-12-26 16:28:03
Message-ID: 201312261128.03527.jhb () freebsd ! org
[Download RAW message or body]

On Wednesday, December 25, 2013 6:02:42 am Mark van der Meulen wrote:
> Hi All,
> =

> I have question about buckets in vmstat -z output which I haven=92t been =
able =

to find an answer for online=85
> =

> I have 6 FreeBSD 9 boxes running as routers and they are seeing varying =

results in vmstat -z. I=92m interested in understanding what the Buckets =

represent/mean and how I can influence usage of them.
> =

> Some of the routers show 0 free buckets under 64 or 128 Bucket and so I d=
id =

some research and haven=92t been able to find out what it means - most peop=
le =

who have asked online have received an answer that it is nothing to worry =

about, which is meaningless to me.
> =

> It seems that the higher the usage of the router, especially when it is a=
lso =

running userspace applications the less Bucket availability there is. Also =
I =

found someone speculating it was related to free kernel memory so that was =

updated on some routers however I saw little difference(although not sure i=
f =

adding it in /etc/sysctl.conf actually does anything as some haven=92t had =
the =

vm.kmem_size value change at all, despite reboots).
> =

> Can anyone explain what the buckets (16,32,64,128) do and what they =

represent? Also if you know anything about troubleshooting bucket failures? =

There doesn=92t appear to be anything useful online despite many searches.
> =

> I am aware that it may not have anything to do with the problems I am =

seeing, but I would still like to understand.

They are used to back malloc(9).  The in-kernel malloc(2) rounds allocations
smaller than a page up to the next power of two and then allocates that from
a UMA zone for that power of two.  For example, the '128' bucket is used fo=
r =

all calls to malloc(9) for a size between 65 and 128.

vmstat -m can give you a sense of which buckets each malloc type uses, but
it doesn't give you a very detailed breakdown.  However, if you compare
snapshots of vmstat -m taken along with your vmstat -z snapshots, you might
be able to infer which malloc buckets are seeing activity and use that to s=
ee
which malloc types correspond to the stats you care about from vmstat -z.

-- =

John Baldwin
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic