cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl and async I/O

From: Cory Nelson <>
Date: Mon, 18 Aug 2008 20:06:40 -0700

On Mon, Aug 18, 2008 at 7:09 PM, Jamie Lokier <> wrote:
> Andrew Barnert wrote:
>> As I understand things, Microsoft has determined that there's no way
>> to add an epoll-style API to the Windows kernel that scales well to
>> multiple cores, while the linux networking team has determined that
>> there's no way to add aio networking to the linux kernel in a way
>> that's as low-overhead as epoll, so we may be stuck with these two
>> different interfaces forever. (And of course Sun will provide both,
>> and 20 others besides.)
> And neither method is optimal!
> Ideally, you don't want to commit 10000 large receive buffers in
> overlapped reads which may take a long time to receive anything. You
> want to allocate buffers from a smaller pool as data becomes
> available. For writes, similar but less clear cut.

Windows allows you to perform a WSARecv() with a null pointer. It
lowers your overall throughput, but it does let you minimize the
amount of locked pages which can be useful on 32-bit.

Cory Nelson
Received on 2008-08-19