[gambit-list] Edge triggered I/O with libevent
feeley at iro.umontreal.ca
Tue Aug 30 23:34:58 EDT 2005
Really neat! I haven't tried it yet (I'm mostly using Mac OS X for
development) but it sounds promising. With this patch, heavily
loaded web-servers written with Gambit should have much better
On 19-Aug-05, at 9:54 AM, Adam Langley wrote:
> Gambit uses the select call on POSIX systems to multiplex IO
> operations. This is fine for small numbers of file descriptors, but
> falls apart quickly with large numbers.
> libevent is a wrapper library around a number of modern IO
> multiplexing systems (epoll on Linux, kqueue on the BSDs as well as
> poll and select).
> Attached is a patch which converts Gambit to using edge triggered I/O
> with epoll and libevent. This also requires a patch (attached) of
> libevent since the standard distribution doesn't include edge
> triggering support and the upstream appears to be on holiday.
> (epoll is required because I don't have a BSD box on which to develop
> edge triggering support for kqueue)
> This patch (for Gambit) preprocesses away to nothing unless
> --enable-libevent is passed to the configure script. (Note that, since
> this patches the configure.ac script, you'll need to run autoconf to
> I hope I've not broken anything, but at this stage I've only tested
> that the console and tcp ports work.
> This patch (in the future) should also allow people, who write
> programs which use socket calls directly, to integrate into the main
> event loop at some point.
> Testing is more than welcome and, if you find a form of IO which is
> broken, please email me.
>  http://monkey.org/~provos/libevent/libevent-benchmark2.jpg
>  http://monkey.org/~provos/libevent/
> Adam Langley
> agl at imperialviolet.org
> http://www.imperialviolet.org (+44) (0)7906
> PGP: 9113 256A CC0F 71A6 4C84 5087 CDA5 52DF 2CB6
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
More information about the Gambit-list