NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/41019: pthreads: high load when using varnish (locking/unlocking causes 98% WCPU)



The following reply was made to PR lib/41019; it has been noted by GNATS.

From: Andrew Doran <ad%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/41019: pthreads: high load when using varnish 
(locking/unlocking causes 98% WCPU)
Date: Sun, 15 Mar 2009 21:21:56 +0000

 On Sun, Mar 15, 2009 at 11:05:01AM +0000, 
michael+netbsd%stapelberg.de@localhost wrote:
 
 >  9920 nobody    25    0  2400K 4296K RUN/1      3:28 97.85% 97.85% varnishd
 
 Please ktrace it and provide a kdump snippet.
 
 > Enter "param.set diag_bitmap 0x8" and start varnishtop to see this:
 > 4862930.38 Debug          
 > MTX_UNLOCK(wrk_decimate_flock,cache_pool.c,483,&wq[u]->mtx)
 > 4862930.71 Debug          
 > MTX_LOCK(wrk_decimate_flock,cache_pool.c,470,&wq[u]->mtx)  
 
 wrk_decimate_flock() garbage collects threads.
 It is called in a loop from a garbage collector thread.
 This sleeps for wthread_purge_delay after garbage collecting a thread.
 It also sleeps for the same between scans.
 What do you have it set to?
 
         { "thread_pool_purge_delay",
                 tweak_timeout, &master.wthread_purge_delay, 100, 0,
                 "Wait this long between purging threads.\n"
                 "\n"
                 "This controls the decay of thread pools when idle(-ish).\n"
                 "\n"
                 "Minimum is 100 milliseconds.",
                 EXPERIMENTAL | DELAYED_EFFECT,
                 "1000", "milliseconds" },
 


Home | Main Index | Thread Index | Old Index