Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2013 15:29:04 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: Default knote hash table size is too .. small
Message-ID:  <52BE0D40.5020304@freebsd.org>
In-Reply-To: <CAJ-VmomteHhbNv2pLX1cma74hExbtQKhxiRd3D653abneuJwhg@mail.gmail.com>
References:  <CAJ-VmomteHhbNv2pLX1cma74hExbtQKhxiRd3D653abneuJwhg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 12/27/13, 2:41 PM, Adrian Chadd wrote:
> Hi,
>
> The default knote hash table size (KN_HASHSIZE) is 64. When doing
> dirty things with lots of sockets (say, 64k and more) that involve
> plenty of knote insert/remove (ie, oneshot events - think posix AIO
> and my upcoming kqueue sendfile notification stuff) it consumes stupid
> amounts of CPU.
>
> I'd like to make this a tunable so people like Adrian at Netflix can
> bump this to higher values (say 32k) but people like Adrian at
> Embedded can bump this to lower values (say 64.)
>
> Comments? I'll make the change soon if no-one objects.
>
> Thanks,

Cool!  What about auto-tune to maxfiles?

-Alfred



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52BE0D40.5020304>