Default knote hash table size is too .. small

Adrian Chadd adrian at freebsd.org
Fri Dec 27 23:39:57 UTC 2013


On 27 December 2013 15:29, Alfred Perlstein <alfred at freebsd.org> wrote:

> Cool!  What about auto-tune to maxfiles?

Well, ideally it'd be tunable per actual kqueue rather than a global.
That way some crazy ioctl could be done to set the knote hash size per
queue.

I'm just worried that for some people doing say, high throughput UDP
with one connected socket, it's just wasted RAM. But for mad parallel
TCP the hash has to be bigger. But then if yo'ure doing say, 30 worker
processes versus 1000 sockets each versus say, 8 worker processes
doing 4000 sockets each, you need a different hash size.

See? It's not as easy as tune to maxfiles. the only thing that is that
simple is "can we massively overspecify it." :-)

I'll do a followup at some point to allow an ioctl to set/get it on a
per-kqfd basis. Then we won't need the build limit.

Thanks,



-a


More information about the freebsd-arch mailing list