Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Sun, 7 May 2006 15:16:41 -0400
On Sun, May 07, 2006 at 10:00:41PM +0300, Sven Petai wrote:

> The results in my mail were mean values over 2 runs,
> only once did I see really huge (more than 10%) differences between several 
> subsequent runs with same settings, this case was clearly mentioned in the results.

FYI, 2 is not really enough, you should do at least 10 repetitions of
each test to reduce variance (which can be a lot, despite what you
saw!) and so that differences between them can be accurately
estimated.  Ministat is really helpful for this.

> most contended locks:
>    max        total       count   avg     cnt_hold     cnt_lock name
>   8143    926138412    36000820    25    111228313     34861067 /usr/src/sys/kern/uipc_usrreq.c:309 (unp)
>      9         1359         223     6          167     31657721 /usr/src/sys/kern/uipc_usrreq.c:709 (unp)
>   6107    123376889     4000519    30     12373564      3900209 /usr/src/sys/kern/uipc_usrreq.c:364 (unp)
>  34045    553265364     7972969    69      3951680      3101074 /usr/src/sys/kern/kern_descrip.c:378 (Giant)
> 1893100    355809996    44119592     8       602861       927204 /usr/src/sys/kern/kern_descrip.c:2011 (filedesc structure)
> 807479    389358045    44119592     8      1399635       853369 /usr/src/sys/kern/kern_descrip.c:1990 (filedesc structure)
>    146         1629          86    18           28       544914 /usr/src/sys/kern/kern_conf.c:311 (Giant)
> 991109     37883055     8003082     4       615328       509225 /usr/src/sys/kern/kern_descrip.c:385 (filedesc structure)
>  33986     33267790     7972969     4       244622       405542 /usr/src/sys/kern/kern_descrip.c:438 (filedesc structure)
>     13        16943        5357     3          475       381640 /usr/src/sys/kern/sys_generic.c:691 (filedesc structure)

Another patch that helps a lot (gets rid of the Giant in the above
trace and gives me a modest performance boost) is here:

  http://people.freebsd.org/~csjp/kern_descrip.c.1145074052.diff

He hasn't committed it yet because there is some evidence it helps to
make an unrelated devfs bug more common in certain test loads.  I've
come to the opinion that it should just be committed since the problem
does not seem to be directly caused by this change.

Kris
Received on Sun May 07 2006 - 17:16:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:55 UTC