Re: how many threads? network programming design .NET
From: David Levine (noSpamdlevineNNTP2_at_wi.rr.com)
Date: 08/21/04
- Next message: David Levine: "Re: StockOverflowException in Win98"
- Previous message: Andy Fish: "Re: MailMessage and address book entries"
- In reply to: Parahat Melayev: "how many threads? network programming design .NET"
- Next in thread: Alvin Bruney [MVP]: "Re: how many threads? network programming design .NET"
- Reply: Alvin Bruney [MVP]: "Re: how many threads? network programming design .NET"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 21 Aug 2004 04:12:30 -0500
You are probably running out of virtual address space. .NET maps each thread
to an underlying operating system thread, and allocates 1M of virtual
address space for each one. By default each app gets a max of 2G of virtual
address space from the operating system, so you are probably bumping into
this limit.
As others have mentioned, no one writes code that uses so many threads, most
of which are blocked waiting on other operations to complete. Use a
threadpool, either the .NET pool (recommended) or roll your own.
"Parahat Melayev" <parahat@momenttech.com> wrote in message
news:%23VGU17dhEHA.1888@TK2MSFTNGP10.phx.gbl...
> Hi
>
> I am programming a multi-threaded asyncronous server with .NET
>
> But when systems thread count reaches to 1350 system can't respond.
>
> Simply my design is creating a Reading Thread after every Accept.
> And creating a Writing Thread when server sends data.
>
> Can you share your experience with me on Network Programming and
> Multi-Threading.
>
>
- Next message: David Levine: "Re: StockOverflowException in Win98"
- Previous message: Andy Fish: "Re: MailMessage and address book entries"
- In reply to: Parahat Melayev: "how many threads? network programming design .NET"
- Next in thread: Alvin Bruney [MVP]: "Re: how many threads? network programming design .NET"
- Reply: Alvin Bruney [MVP]: "Re: how many threads? network programming design .NET"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|