Managing userland data pointers in kqueue/kevent

Adrian Chadd adrian at freebsd.org
Mon May 13 18:23:46 UTC 2013


Just as a data point, I managed 50,000 + connections, at 5,000 + a
second, doing a gigabit + of traffic, mid-2000s, with the userland
management of all of the socket/disk FD stuff.

The biggest overhead at the time was actually the read/write
copyin/copyout, NOT the locking overhead of managing this stuff. Why?
Because I architected the HTTP side of things to specifically pin FDs
to threads, and not allow arbitrary threads to deal with arbitrary
FDs. This removed the need for almost all of the state locking that
people are concerned about here.



Adrian


More information about the freebsd-hackers mailing list