How thread-friendly is kevent?
j.david.lists at gmail.com
Wed Nov 12 22:29:49 UTC 2014
On Wed, Nov 12, 2014 at 5:14 PM, K. Macy <kmacy at freebsd.org> wrote:
> This may not be related, but it's interesting: a client I worked for
> many years ago switched from kqueue to poll for their web server
> because kqueue did not distribute the workload evenly. I imagine this
> is unchanged.
It looks pretty good in testing:
$ ./kqtest server
Server thread ends after 2630979 events.
Server thread ends after 2600452 events.
Server thread ends after 2525542 events.
Server thread ends after 2418386 events.
Server thread ends after 2524895 events.
That's a small-scale test on a VM with two CPU's running five threads,
but the results appear to hold. (This is using the _DISPATCH model.)
More information about the freebsd-questions