Re: Thread Practices
- From: dkisting@xxxxxxxxxxxxxx
- Date: 21 Jul 2006 08:51:32 -0700
Well, first of all, thanks for the post. But the server is a shared
Web Server, has a different, legacy Chat Application on it, amongst
others. When I restart the services, it only gets it down to about 580
processes or so. However, I am open to suggestions. I am not
currently with the web service calls using asynchronous calls, but that
shouldn't be hard to implement. That would be the place, correct?
Barry Kelly wrote:
dkisting@xxxxxxxxxxxxxx wrote:
What is the best way to recycle threads (and/or increase the number
allotted threads) from the thread pool. I have c# chat service which
many users connect. I have implemented some better thread managment
because I was seeing tons of "Not enough threads in thread pool to
complete operation" and my application would hang.
Are you using asynchronous I/O (i.e. BeginRead / BeginReceive /
BeginSend / BeginWrite / BeginAccept etc.) to avoid blocking calls to
I/O routines? That is necessary to scale to large numbers of clients.
Now, this seems to have taken care of the enough threads error message
I was seeing, however normally when the Threads in the performance tab
of the task manager hit around 750 (which seems low), the application
bottlenecks and doesn't do anything.
750 is a frighteningly high number, to me! It either means that you've
got ~750 concurrent CPU-bound operations (on a chat server?) - or you're
not using asynchronous I/O when you should be.
-- Barry
--
http://barrkel.blogspot.com/
.
- References:
- Thread Practices
- From: dkisting
- Re: Thread Practices
- From: Barry Kelly
- Thread Practices
- Prev by Date: Re: Building an array type by Reflection.Emit
- Next by Date: Re: Thread Practices
- Previous by thread: Re: Thread Practices
- Next by thread: Re: Thread Practices
- Index(es):
Relevant Pages
|