Re: Timings for optimised poll(2)

Richard Gooch (rgooch@atnf.CSIRO.AU)
Tue, 26 Aug 1997 17:40:10 +1000


David S. Miller writes:
> 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.

I agree: poll(2) is more scalable than select(2), even if select(2)
has some advantages over poll(2) (like shifting less bits around).

However, what do you think of my idea to add a poll_event field to the
file struct so we can avoid calling those damn indirect poll
functions? Will people accept yet another change to the polling
interface? I'd consider starting to code up a patch to provide the
basics if I knew the idea would not be rejected :-)

Regards,

Richard....