IO Completion Ports - the UNIX equivalents

Yesterday I was complaining about IO Completion Ports, and I mentioned that I wasn’t aware of any UNIXy equivalent. I didn’t look very hard — I’ve had a few emails linking me to several sources (nice to know people actually read this stuff!) It seems the UNIX world is a bit fragmented in how it achieves high performance networking:

On Linux 2.6 there’s epoll and kevent. There’s also a proposal by Ulrich Drepper for a new network interface.

On older versions of Linux (Linuces?) you might consider using Realtime signals.

On FreeBSD and NetBSD there’s kqueue.

Additionally, it’s possible to use standard signals or asynchronous I/O to acheive similar results. I’ve always found signals to be unwieldy and cumbersome, so I wouldn’t recommend these.

The main source of this information is this handy web page that describes various ways of getting good network performance on UNIX systems.

Filed under: Coding
Posted at 15:08:01 BST on 18th July 2008.

About Matt Godbolt

Matt Godbolt is a C++ developer living in Chicago. He works for Hudson River Trading on super fun but secret things. He is one half of the Two's Complement podcast. Follow him on Mastodon or Bluesky.