Default knote hash table size is too .. small

Adrian Chadd adrian at freebsd.org
Fri Dec 27 22:41:33 UTC 2013


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,


-a


More information about the freebsd-arch mailing list