I agreee.

In one Enterprise Network test system that i developed, it was supposed to
emulate 1000s of NT users doing file operations/printing, etc. Therades were
created, and LogOnUser(), ImpersonateUser() were called by each thread for
the unique user. There was no other way to emulate thousands of users per
machine. And we were using a number of machines for the same operation. In
one powerful machine 2400 threads were created. In my XP-based laptop,
thread creation failed after 1200 threads (app). Regarding stack size, u can
always limit it in CreateThread() call, and it would automatically expoand
if more required, i believe.

In architecture where at a time, fixed number of threads r expected to work,
it would be better to create a thread pool and send the incoming task to it.
For instance, if u have 7000 users, but a time, only upto 100 can do some
work, then it is better to operate it at thread pool level, rather thna
creating 7000 threads (most of which would be sleeping any way).

Syed




-----Original Message-----
From: David Williams [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 9:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Massive Use of Threads Issue


Thomas

I would question the statement that a hundred threads will effect
performance greatly simply because I just checked the number of threads in
use here on my development machine.  While I do have a number of programs
running that I would never run on a production server, I have no problems
with performance on this system.  I currently have 550+ threads running
(according to the NT Task Manager).  This is a fairly high performance
machine, but it has never been optimized for performance.  (Compaq DeskPro
Workstation with a P4 2.1Ghz with 352MB RDRAM running Win2K Professional.)
I have seen this system running over 1000 threads in the past (though
performance was slowing down at that point.)  I would think that if I was
using the production server hardware (Dual Xeon PIII with 512MB Cache and 1
GB RDRAM) that I would not start to feel problem until over 2000 threads
(of course it depends on what those threads were doing.  If they were all
hitting the disk then sure.  But hitting dedicated hardware with its own
processors - I doubt it.  Hum, time for a benchmark program I think.)

David Williams
Senior Developer
Strohl Systems

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to