[Haskell-cafe] Optimizing a high-traffic network architecture
John Meacham
john at repetae.net
Thu Dec 15 20:14:45 EST 2005
On Thu, Dec 15, 2005 at 02:02:02PM -0000, Simon Marlow wrote:
> With 2k connections the overhead of select() is going to start to be a
> problem. You would notice the system time going up. -threaded may help
> with this, because it calls select() less often.
we should be using /dev/poll on systems that support it. it cuts down on
the overhead a whole lot. 'poll(2)' is also mostly portable and usually
better than select since there is no arbitrary file descriptor limit and
it doesn't have to traverse the whole bitset. a few #ifdefs should let
us choose the optimum one available on any given system.
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-Cafe
mailing list