thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-13 Thread Markus Gebert
Hi there We have a pair of servers running FreeBSD 9.1-RC3 that act as transparent layer 7 loadbalancer (relayd) and pop/imap proxy (dovecot). Only one of them is active at a given time, it's a failover setup. From time to time the active one gets in a state in which the 'thread taskq' thread u

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-13 Thread Markus Gebert
On 13.11.2012, at 19:30, Markus Gebert wrote: > To me it looks like the unix socket GC is triggered way too often and/or > running too long, which uses cpu and worse, causes a lot of contention around > the unp_list_lock which in turn causes delays for all processes relaying on > unix sockets

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-13 Thread Adrian Chadd
Oh lordie, just hack the kernel to make IP_BINDANY usable by any uid, not just root. I was hoping that capabilitiies would actually be useful these days, but apparently not. :( Then you can stop this FD exchange nonsense and this problem should go away. :) Adrian On 13 November 2012 16:41, Ma

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-13 Thread Alfred Perlstein
On 11/13/12 4:41 PM, Markus Gebert wrote: On 13.11.2012, at 19:30, Markus Gebert wrote: To me it looks like the unix socket GC is triggered way too often and/or running too long, which uses cpu and worse, causes a lot of contention around the unp_list_lock which in turn causes delays for all

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-13 Thread Konstantin Belousov
On Wed, Nov 14, 2012 at 01:41:04AM +0100, Markus Gebert wrote: > > On 13.11.2012, at 19:30, Markus Gebert wrote: > > > To me it looks like the unix socket GC is triggered way too often and/or > > running too long, which uses cpu and worse, causes a lot of contention > > around the unp_list_loc

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-14 Thread Markus Gebert
On 14.11.2012, at 02:12, Adrian Chadd wrote: > Oh lordie, just hack the kernel to make IP_BINDANY usable by any uid, > not just root. > > I was hoping that capabilitiies would actually be useful these days, > but apparently not. :( > > Then you can stop this FD exchange nonsense and this probl

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-14 Thread Markus Gebert
On 14.11.2012, at 04:30, Alfred Perlstein wrote: > A couple of ideas: Thanks. > 1) convert the taskqueue to a callout, but only allow one to be queued at a > time. set the granularity. I think Konstantin's patch is going in this direction. > 2) I think you only need to actually run garbag

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-14 Thread Markus Gebert
On 14.11.2012, at 08:21, Konstantin Belousov wrote: > On Wed, Nov 14, 2012 at 01:41:04AM +0100, Markus Gebert wrote: >> >> On 13.11.2012, at 19:30, Markus Gebert wrote: >> >>> To me it looks like the unix socket GC is triggered way too often and/or >>> running too long, which uses cpu and wo

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-14 Thread Alfred Perlstein
On Nov 14, 2012, at 2:42 AM, Markus Gebert wrote: > > On 14.11.2012, at 04:30, Alfred Perlstein wrote: > >> A couple of ideas: > > Thanks. > >> 1) convert the taskqueue to a callout, but only allow one to be queued at a >> time. set the granularity. > > I think Konstantin's patch is g

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-14 Thread Adrian Chadd
On 14 November 2012 02:39, Markus Gebert wrote: > > On 14.11.2012, at 02:12, Adrian Chadd wrote: > > Oh lordie, just hack the kernel to make IP_BINDANY usable by any uid, > not just root. > > I was hoping that capabilitiies would actually be useful these days, > but apparently not. :( > > Then yo

Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC

2012-11-19 Thread Markus Gebert
On 14.11.2012, at 11:50, Markus Gebert wrote: > On 14.11.2012, at 08:21, Konstantin Belousov wrote: > >> On Wed, Nov 14, 2012 at 01:41:04AM +0100, Markus Gebert wrote: >>> >>> On 13.11.2012, at 19:30, Markus Gebert wrote: >>> To me it looks like the unix socket GC is triggered way too