Re: Non-paged memory

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
.



Relevant Pages

  • Re: Non-paged memory
    ... some sort of limit when creating about 350 tcp connections with a ... That's a way, way big backlog, by the way. ... backlog when you're not fast enough accepting connections. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Inbound connections limit in Windows XP
    ... > backlog" is fixed to 3 entries. ... single TCP server socket on which it accepts connections ... > Of course this is only an issue if you have big surges of new ... four clients, ...
    (borland.public.delphi.non-technical)
  • Re: what does backlog parameter to listen do?
    ... Though does not make 'backlog' very ... Our application is supposed to accept only 5-10 connections and then ... Closing listener works pretty well. ... our channel this way :-The quick fix solution was not to bring up ...
    (comp.os.linux.development.apps)
  • Re: Winsock2 accept queue depth
    ... just be aware that backlog is stack of not yet accepted connections ... >> have a listening socket in a thread to accept connections to an array of ... > Windows NT 4 Server, etc) have different limits on the backlog. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Non-paged memory
    ... some sort of limit when creating about 350 tcp connections with a ... backlog size of 100. ... handle several 1000's concurrent connections, ... Some obscure resource whose limits are not widely known? ...
    (microsoft.public.win32.programmer.kernel)