What's the cost of using hundreds of threads?

Cameron Laird claird at lairds.us
Tue Mar 1 19:08:04 EST 2005


In article <4R5Vd.37291$%U2.33444 at lakeread01>,
Steve Holden  <steve at holdenweb.com> wrote:
			.
			.
			.
>> I've read somewhere (I cann't recall where, though, was it MSDN?) that 
>> Windows is not well suited to run more than 32 threads per process. Most 
>> of the code I saw doesn't spawn more threads than a half of this.
>> 
>This is apocryphal. Do you have any hard evidence for this assertion?
>
>Apache, for example, can easily spawn more threads under Windows, and 
>I've written code that uses 200 threads with excellent performance. 
>Things seem to slow down around the 2,000 mark for some reason I'm not 
>familiar with.
			.
			.
			.
I'll support Mr. Zgoda's apocrypha.  The thing is, as so often
obtains, you're both right--early Windows flavors could dismember
themselves entertainingly when a process launched a few dozen
threads, but WinXP vastly improves that condition.

I assert that I could substantiate my claims with appropriate
references.  I choose not to do so today.



More information about the Python-list mailing list