runaway thread count and asynchronous sockets
From: Matthew Groch (mgroch_at_brisksystems.com)
Date: 10/01/04
- Next message: Richard Blewett [DevelopMentor]: "Re: .NET Remoting question"
- Previous message: Mark Allison: "Re: How to derive from TreeNode?"
- Next in thread: Richard: "RE: runaway thread count and asynchronous sockets"
- Reply: Richard: "RE: runaway thread count and asynchronous sockets"
- Messages sorted by: [ date ] [ thread ]
Date: 1 Oct 2004 08:58:23 -0700
Hi all,
I've got a server that handles a relatively high number of concurrent
transactions (on the magnitude of 1000's per second). Client
applications establish socket connections with the server. Data is
sent and received over these connections using the asynchronous model.
The server is currently in beta testing. Sporadically over the course
of the day, I'll observe the thread count on the process (via perfmon)
start climbing. (Let's say that on average, a 'normal' thread count is
around 80). But when it climbs, well.. Today, for example, I saw it
peak at around 355 threads.
Now, I don't explicitly spawn these threads in my code. I'm assuming
they're being spawned by the CLR to handle the high volume of async
socket sends. The count stays high for some (arbitrary?) period of
time and then, automagically, comes back down to normal levels again.
When the thread count is high, the system is obviously taxed and
performance goes down. I've written code specifically so that I keep a
flag associated with a socket session such that a session will not
initiate an async send if one is currently in progress, if that's
worth mentioning at all.
I'm hoping to hear from _anyone_ that might have encountered a similar
situation!! I'm not exactly sure what to do at this point. I'd love
any help and am particularly looking for responses like "Hey, have you
thought about this?" or "Hmm, maybe you're misunderstanding some
fundamental concept in async socket comm", or best, "Yeah, that sounds
similar to something we ran into last year; here's the strategy we
used to get around it.."
Thanks in advance-
- Next message: Richard Blewett [DevelopMentor]: "Re: .NET Remoting question"
- Previous message: Mark Allison: "Re: How to derive from TreeNode?"
- Next in thread: Richard: "RE: runaway thread count and asynchronous sockets"
- Reply: Richard: "RE: runaway thread count and asynchronous sockets"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|