Tuesday, August 10, 2010

New I/O manager merged into the main GHC tree

Today Simon Marlow merged Bryan O'Sullivan and my I/O manager patches into the main GHC tree. All the tests pass, and it’s performing well.

The new I/O manager is primarily useful in high-performance server applications, where the server maintains many open connections simultaneously and only a small number of those connections are active at any given time. This is the common case for most web applications. As a bonus, timeouts are also handled more efficiently: you can have many more threads calling e.g. threadDelay simultaneously than before.

You don’t need to do change any code to see benefit from the new I/O manager: any code that uses forkIO and runs on a system that supports epoll or kqueue should scale better in terms of the number of open file descriptors.

The limit on number of open file descriptors is also gone: you can now have more than 1024 open file descriptors.

If you find any bugs, please use the GHC bug tracker to report them to me, “tibbe”.

3 comments: