Re: libc_r is deprecated

From: David Xu (davidxu_at_freebsd.org)
Date: 10/27/05

  • Next message: Robert Watson: "Re: libc_r is deprecated"
    Date: Thu, 27 Oct 2005 09:05:42 +0800
    To: Robert Watson <rwatson@FreeBSD.org>
    
    

    Robert Watson wrote:

    > ...
    > I'll try to set up and run Apache2 with various configurations as a
    > substitute for the performance measurement httpd I have in
    > src/tools/tools/netrate, and see how its mpms interact with our
    > threading implementations.
    >
    > My increasing suspicion is that the performance issue for threads is
    > heavy access to the file descriptor related locks, resulting in
    > significant contention. I need to look at traces and profiling some
    > more to decide which are the biggest problems, and whether there are
    > useful ways to improve them that help. In the libthr vs. libpthread
    > measurements, it could well be that libpthread reduces kernel lock
    > contention by allowing a thread to compete less with itself for locks:
    > i.e., it introduces additional kernel threads only when blocked on a
    > real sleep, not a mutex wait, whereas with libthr, threads will yield
    > to each other on a CPU as they sleep on mutexes, resulting in more
    > mutex contention. This is just a conjecture, however.
    >
    You sample program is nothing to do with libpthread or libthr, you never
    have userland
    locking code, in kernel they should be same, in fact. I have done a
    simple test, on my
    dual PIII machine, libthr is faster than libpthread, if I use ULE,
    libpthread is far behind
    than libthr, I recommend you to try different file sizes, I have got
    very different result, for
    small file size, e.g /usr/src/sys/sys/umtx.h, libthr beats libpthread,
    I can not test big file,
    because my 100M network is very easy to be saturated.

    If you suspect fd locking overhead, try to use fork() model, though it
    will introduce more
    context switch overhead, but it still worthy to do.

    > Robert N M Watson

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Robert Watson: "Re: libc_r is deprecated"