Exposing Zone Sleeps
jhell
jhell at dataix.net
Tue May 25 14:01:41 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/24/2010 18:26, Sean Bruno wrote:
> Find attached a patch against -CURRENT.
>
> This update exposes a counter that indicates the number of times that we
> sleep when attempting to allocate a slab from the keg. In other words,
> the number of times we BLOCK and wait, which is bad.
>
> This allows differentiation between times when we failed to allocate and
> it was ok and times where we were forced to sleep. The current FAIL
> counter does not make this distinction.
>
> Exposes this information via uma_zone_t->uz_sleeps.
>
> Add a new sysctl to retrieve this information.
> Enhance vmstat -z to retrieve this information.
>
> We've found this *extremely* useful here at Yahoo in the past and would
> like to commit this if it is acceptable.
>
> Tested on 32bit and 64bit architectures on 6/7/CURRENT.
>
Hi Sean,
Nice work on this. I applied this to stable/8 r208530 and I am in the
process of compiling the kernel right now. Everything else has built &
runs as expected "i386". Attached is the adjusted patch which was one
modification to the line number for uz_sleeps in sys/vm/uma_int.h.
8 files changed, 106 insertions(+), 7 deletions(-)
For those wishing to apply this patch and test for them self:
cd /usr/src
patch </path/to/sleep_stat_stable8_r208530.diff
cd /usr/src/include
make obj && make depend && make includes && make install
cd /usr/src/lib/libmemstat
make obj && make depend && make includes && make install
cd /usr/src/usr.bin/vmstat
make obj && make depend && make install
cd /usr/src
make kernel KERNCONF=YOUR_KERN_CONF
reboot
Can't wait to see some results from this & I will report back with
either negative results of the build & run or positive results from the
stats collected.
If there is anything needed feel free to let me know and I will do what
is possible ASAP.
Thanks again,
- --
jhell
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iQEcBAEBAgAGBQJL+9g3AAoJEJBXh4mJ2FR+1UoIAJnJ0gvQBOVjvccj2DueHedg
gk9SCeebEys2xjrqlTP3HrsaWl+zJcZoR6qJbJnSw3sIAkXbSAptaVH7xOx7o3vj
cngqEVGcq99w8NILFjCvpMJBIs7iBY0ZqRFgloIdoNdB1DNugwKNZVtvd17WUlWJ
MstE/kSGVmYVqIVARXx6ucEMrxI1wWgNOPDmI3dZWxDD/gZi5m3hvhyQt2Ub6oQu
kAagDeVIluk4fMHk5KkwQjJajciaaXLTd50FakhWcpMOH1sFd2Ks4eJRh3RI70Eo
UpgIrOJZWMFH7G9mtoYRk6hxd6Qgw+8lqoJP+P/i322wPJ4vPHciqaIOxWiERCA=
=acrJ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sleep_stat_stable8_r208530.diff
Type: text/x-patch
Size: 8714 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100525/a9573349/sleep_stat_stable8_r208530.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sleep_stat_stable8_r208530.diff.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100525/a9573349/sleep_stat_stable8_r208530.diff.obj
More information about the freebsd-hackers
mailing list