Replacing select() in the non-threaded RTS?
Bryan O'Sullivan
bos at serpentine.com
Thu May 31 00:21:36 EDT 2007
I notice that select is a bit of a bottleneck in the non-threaded RTS
once lots of sockets are in play. Between kernel and userspace, many a
cycle are wasted once we go past a few hundred clients. On some
operating systems, the fixed nature of fd_set imposes a surprisingly low
ceiling on the maximum number of concurrently open file descriptors.
I gather there's some kind of longish-term plan to build a more
pluggable RTS, but it seems like a nearer-term solution could be
implemented relatively cheaply, and wouldn't conflict with the ultimate
goal.
Would the GHC team be interested in receiving a patch that replaced
select, where possible, with an operating system's native, and hopefully
faster, event wait mechanism?
<b
More information about the Glasgow-haskell-users
mailing list