Exposing Zone Sleeps

jhell jhell at dataix.net
Tue May 25 18:26:44 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/25/2010 10:01, jhell wrote:
> 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,
> 

This patch instead pardon the early.post but there was a problem with
the last patch that I attached for stable/8 r208530 with arguments 10 &
11 to function sysctl_vm_zone where it wanted a long unsigned integer
rather than u_int64_t.

This patch satisfies that. Whether its correct is left to the reader but
compiles cleanly & runs smoothly.

Regards,

- -- 

 jhell
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJL/BZfAAoJEJBXh4mJ2FR+AqkH/2feS63nkRTGvYBNWUXMl/5t
th4JJWXF0nvN5KjcLlP79mSI06Enc3W3+EFooPZyZugOKUHhM/ex14nGYjQUzA8f
S3JPpLmF4Mqga1kiK55NQd+OiGtfn74qrRE8MeDR8ravcUpQjN3rbbZtoPYIMe0G
lX7JVXVvmKEL5YvWULEEaU7ckVCb+fAR44t1JOEmFYI7xew7bbvdEno728ZHxO8V
gt291dC+MNUqIDsj52LgEPZ4zet/CuU6MeQ7D0SJ5YUDzQ1GH8qlCJ/8jxg0c3/a
IIXEmRRH494YHMQrVsrOZgho6YRs1x1B6x2Tqm8mlAqpDDAEKETlJ2CCtXvGt5M=
=fd+F
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sleep_stat_stable8_r208530.diff
Type: text/x-patch
Size: 8791 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100525/0c712d69/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/0c712d69/sleep_stat_stable8_r208530.diff.obj


More information about the freebsd-hackers mailing list