Messages in this thread | | | From | "David Schwartz" <> | Subject | RE: Signal driven IO | Date | Tue, 16 Nov 1999 15:12:00 -0800 |
| |
> > No. Switch to poll when enough fds are ready per loop. You > want the queue > > size to be set such that you are using signals most of the > time, but if you > > should fall behind, and have large numbers of fds ready, you can use the > > more efficient 'mass' poll system call. > > Benchmark it for your application. For web and ftp traffic the I/O signals > are a clear winner.
A clear winner regardless of how many file desciptors are ready per "loop pass"? Surely there has to be some number at which poll becomes superior. Certainly with artificial cases where you overload the CPU and deliberately hit multiple links at the same time.
The measure of this inflection point should be the number of signals 'backed up'. Clearly, if the backup number is 100% of the number of file descriptors, poll would be better.
I would imagine for most real-world traffic, you would be unlikely to hit this inflection point unless load was so great that your server was basically dead in the water anyway. But nevertheless, the ability to kick into this more efficient mode under load provides softness in the load characteristics that are very beneficial.
Certainly it's preferential to either losing a signal or just queuing more and more of them.
DS
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |