How thread-friendly is kevent?

K. Macy kmacy at freebsd.org
Wed Nov 12 22:31:54 UTC 2014


Well, this was 8 cores with 45 or so processes. I'm not saying it
won't scale smoothly, but it did not in the past for lighttpd. Perhaps
it would have with some changes.

-K

On Wed, Nov 12, 2014 at 2:29 PM, J David <j.david.lists at gmail.com> wrote:
> 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.)
>
> Thanks!


More information about the freebsd-questions mailing list