Re: Timings for optimised poll(2)

David S. Miller (davem@jenolan.rutgers.edu)
Tue, 26 Aug 1997 03:32:33 -0400


Date: Tue, 26 Aug 1997 17:06:43 +1000
From: Richard Gooch <rgooch@atnf.CSIRO.AU>

With the two major improvements I've outlined above, we can check
1021 descriptors using poll(2) in 850 microseconds. *Then* we can
argue about select(2) vs. poll(2) vs. poll2(2). Until then, we're
only talking about a few percent here and there.

I've been watching this conversation from afar, and there is one point
I need to state.

Fact of the matter is, once you've planed down the networking code to
run as fast as it possibly can (ie. you've coded the TCP logic in
assembly ;-), guess what the next bottleneck is on 1,200 connection
per second web servers? It's select()/poll() and a lot of Unix
engineers know this already. Most of them (including me ;-) agree
that the sysv poll() is the only way to a more scalable solution to
this problem, at least in the kernel. If select() can be
reimplemented (as it pretty much is in 2.1.x) in terms of poll,
scalability will get better.

Just from a raw calling semantic standpoint, look at the old
select'ish implementation in 2.0.x or whatever, it is 3 times slower
just on the number of calls that need to be made into the
implementation level select probes per fd.

Later,
David "Sparc" Miller
davem@caip.rutgers.edu