Benchmarking kqueue() performance?

Yaoping Ruan yruan at cs.princeton.edu
Sat Oct 18 14:13:32 PDT 2003


Hi,

We've done some sort of tests in terms of the performance of kqueue( )
and select( ). We used a event-driven web server, which has both
kevent() and select() implementation. We designed a workload called
hot-cold test, which has multiple clients machines request up to
thousands of persistent connections, but only dynamically pick some of
them(1%, 2%, 5%, 15%) issue HTTP requests (hot connections), others just
stay idle (cold connections). Thus a high cost event driven mechanism
may spend more time picking up the right connections having real
requests. The results show that the kqueue( ) has neglectable cost on
throughput. But the select( ) version server has about 20% of the full
bandwidth when 1% of the workloads are hot, but jump to 90% of the full
bandwidth when 15% of the workloads are hot.

I've put the two result graphs on:
www.cs.princeton.edu/~yruan/flexiclient

But I have to admit that we didn't scale the demand too much, just up to
2000 connections. (but the FD set for the queue should be larger since
there're open files.)

- Yaoping Ruan
Computer Science Dept.
Princeton University



More information about the freebsd-hackers mailing list