Re: Non-paged memory
- From: RedLars <Liverpool1892@xxxxxxxxx>
- Date: Sun, 16 Mar 2008 05:21:26 -0700 (PDT)
On 15 Mar, 20:01, Jeroen Mostert <jmost...@xxxxxxxxx> wrote:
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.
Thanks for your response.
First of all, I'm not the author of the application and secondly I
agree its very high number.
Any thoughts on what limit the application is hitting? WinXP should
handle several 1000's concurrent connections, the total nonpaged
memory usage is 'only' 35 MB (computer has 1GB RAM).
.
- Follow-Ups:
- Re: Non-paged memory
- From: Jeroen Mostert
- Re: Non-paged memory
- References:
- Non-paged memory
- From: RedLars
- Re: Non-paged memory
- From: Tim Roberts
- Re: Non-paged memory
- From: RedLars
- Re: Non-paged memory
- From: Jeroen Mostert
- Non-paged memory
- Prev by Date: Re: GET KPROCESS from user mode
- Next by Date: Re: Non-paged memory
- Previous by thread: Re: Non-paged memory
- Next by thread: Re: Non-paged memory
- Index(es):
Relevant Pages
|