Re: Non-paged memory
- From: Jeroen Mostert <jmostert@xxxxxxxxx>
- Date: Sat, 15 Mar 2008 20:01:09 +0100
RedLars wrote:
The reason for asking is an application we've developed seems to hit
some sort of limit when creating about 350 tcp connections with a
backlog size of 100.
That's a way, way big backlog, by the way. You're only supposed to hit the backlog when you're not fast enough accepting connections. If you can fill up a backlog of 100, you can probably fill up a much bigger one too, so clients are bound to get connection rejections anyway. The ideal situation is to never have need of the backlog.
A backlog of 5 is normal, and a backlog of 10 should be plenty for most applications. You can use AcceptEx() to improve accept performance, and you can use WSAAsyncSelect() with FD_ACCEPT to have an event signaled whenever you have no pending accept calls to handle incoming connections -- which is a sign that you should be posting more. The idea is to have as much asynchronous accepts in flight as is reasonable, so you can quickly respond to connections. Having the kernel queue up connections is not a good idea.
--
J.
.
- Follow-Ups:
- Re: Non-paged memory
- From: RedLars
- Re: Non-paged memory
- References:
- Non-paged memory
- From: RedLars
- Re: Non-paged memory
- From: Tim Roberts
- Re: Non-paged memory
- From: RedLars
- Non-paged memory
- Prev by Date: Re: Non-paged memory
- Next by Date: Re: DeviceIOControl with Vista and disk serial number...
- Previous by thread: Re: Non-paged memory
- Next by thread: Re: Non-paged memory
- Index(es):
Relevant Pages
|