V
vzaffiro
Does the magic number of 25 only apply to the thread pool? Does it also
apply to manually creating threads?
apply to manually creating threads?
Naveen said:It applies only to thread pool and not to threads. The threadpool size
also can be changed from 25 to a greater number.
Nope. As I demonstrated earlier this week, the machine crashes long beforemachines
Michael Nemtsev said:Hello Cowboy (Gregory A. Beamer),
Take into accout that they say the 25 is the maximum number if thead that
can give u visible performance.
Increasing that number of thread don't give u any advantage,
notwithstanding the system size and complexity.
In the remoting scenario (and ASP.NET) , the requests are handled by the
Completion port threads not on the worker threads from the thread pool.
You can check this by calling ThreadPool.GetAvailableThreads.
In a remote server application of mine where I have 50 clients
simultaneously calling a remoting server, I get the following values for
the
thread pool threads:
Max worker threads = 50, available = 50
Max I/O threads = 1000, available = 995
Note that this was taken on a dual CPU box (hence the 50 workers), see
there
are no worker threads taken, the number of IOCP threads varies between 2
and
6, but this highly depends on the task, but I never saw more than 10-12
IOCP
threads running on a dual CPU box.
Willy.
Alvin Bruney said:Nope. As I demonstrated earlier this week, the machine crashes long beforeyou will run out of stack space long before you crash the machine on most
machines
the out of memory exception is thrown.
--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
Greg Young said:<splittinghairs>
you will run out of stack space long before you crash the machine on most
machines
A process in windows is generally only allowed 2 gb of memory ... by
default every thread that you start up uses 1 mb of stack space. As such
the maximum would be 2000You can however set the stack size of
threads (in 1.x via a direct call to CreateThread, in 2.0 an overloaded
constructor)
</splittinghairs>
Cheers,
Greg