473,795 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Max. Thread Amount of Windows XP and / or Windows Server 2003

Hi @ll,

I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.

Can i open 10 threads, 100 threads even 1000?

is there a general answer to it. my dev. environment runs on win. xp
and the application will run on a ms server 2003.

Kind regards,
Roni Schuetz

May 1 '06 #1
5 7261
You can open a whole lot of threads (I believe the actual hard limit is
maxshort) but this would not work very well as your threads would just
context switch each other to death. It should be sufficient to say that you
can open as many as you need but remember the more you open, the more
context switching will have to occur.

Cheers,

Greg

"roni schuetz" <sc*****@gmail. com> wrote in message
news:11******** *************@j 73g2000cwa.goog legroups.com...
Hi @ll,

I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.

Can i open 10 threads, 100 threads even 1000?

is there a general answer to it. my dev. environment runs on win. xp
and the application will run on a ms server 2003.

Kind regards,
Roni Schuetz

May 1 '06 #2
hB
I guess at least number of channels (of source of data) would be
limited.
You can break your functionality into out of process workers (separate
exe files), which you invoke them for each channel, and internally they
handle one channel in a multi-threaded way.

Monitor.exe -> Reads Number of Sources and Configs.
-> Invokes ChannelHandler. exe
ChannelHandler. exe -> Handles one channel, as info provided by the
monitor.
-> Does work using multiple threads and all that
synchronization and collaboration amongst the threads.

---
hB

May 1 '06 #3
Greg,
Be aware that each thread consumes 1Meg of virtual address space. In XP,
that means just short of 2048 threads will run you out of memory no matter
how much you have (any process is limited to 2Gig of user space). Now, if
you create 2000 threads it takes FOREVER to exit them all (I'm talking
minutes!) so anyone trying anywhere near that many is nuts.
Bob
"Greg Young" <Dr************ *@hotmail.com> wrote in message
news:uF******** ******@TK2MSFTN GP02.phx.gbl...
You can open a whole lot of threads (I believe the actual hard limit is
maxshort) but this would not work very well as your threads would just
context switch each other to death. It should be sufficient to say that
you can open as many as you need but remember the more you open, the more
context switching will have to occur.

Cheers,

Greg

"roni schuetz" <sc*****@gmail. com> wrote in message
news:11******** *************@j 73g2000cwa.goog legroups.com...
Hi @ll,

I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.

Can i open 10 threads, 100 threads even 1000?

is there a general answer to it. my dev. environment runs on win. xp
and the application will run on a ms server 2003.

Kind regards,
Roni Schuetz


May 1 '06 #4
That is actually the default stack size, you can lower it.

Chris Brumme talks about it here
http://blogs.msdn.com/cbrumme/archiv.../15/51351.aspx

Cheers,

Greg
"Bob Milton" <Do********@new sgroup.nospam> wrote in message
news:eN******** ******@TK2MSFTN GP04.phx.gbl...
Greg,
Be aware that each thread consumes 1Meg of virtual address space. In
XP, that means just short of 2048 threads will run you out of memory no
matter how much you have (any process is limited to 2Gig of user space).
Now, if you create 2000 threads it takes FOREVER to exit them all (I'm
talking minutes!) so anyone trying anywhere near that many is nuts.
Bob
"Greg Young" <Dr************ *@hotmail.com> wrote in message
news:uF******** ******@TK2MSFTN GP02.phx.gbl...
You can open a whole lot of threads (I believe the actual hard limit is
maxshort) but this would not work very well as your threads would just
context switch each other to death. It should be sufficient to say that
you can open as many as you need but remember the more you open, the more
context switching will have to occur.

Cheers,

Greg

"roni schuetz" <sc*****@gmail. com> wrote in message
news:11******** *************@j 73g2000cwa.goog legroups.com...
Hi @ll,

I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.

Can i open 10 threads, 100 threads even 1000?

is there a general answer to it. my dev. environment runs on win. xp
and the application will run on a ms server 2003.

Kind regards,
Roni Schuetz



May 2 '06 #5
If you use a ThreadPool then you can specify how many it should actually
run at once.
Remember that each processor only truly runs one thread at a time. The OS
will emulate threads, but if you're on a 2 CPU machine then the third
thread will not run in parallel (although if you run two DUO's then you
will get 4 threads :) ), so plan any channel buffering carefully.

Cheers,
Jason

On 30 Apr 2006 17:22:45 -0700, roni schuetz wrote:
Hi @ll,

I'm working on a web project which has to use multiple channels to
connect to receive several sources at once. The problem is, that I'm
not aware of the maximum amount of Threads i can allocate to my
channels.

Can i open 10 threads, 100 threads even 1000?

is there a general answer to it. my dev. environment runs on win. xp
and the application will run on a ms server 2003.

Kind regards,
Roni Schuetz

May 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
3665
by: BlackHawke | last post by:
Hello! This is my second post. Ppl really helped me with the first. I hope there are answers for this one as well I own a game company (www.aepoxgames.net) releasing the beta for our first sci-fi space game in about 2 weeks (www.andromedaonline.net) We have multiple servers, but the game engine (Game Server Program) is a Java program (don't ask why) on a windows 2003 enterprise system with dual
9
2421
by: Harald Armin Massa | last post by:
I need to do some synchronisations like in a cron.job import time from threading import Thread class updater(Thread): def run(self): while True: do_updates() time.sleep(600)
0
2070
by: Marco Nicosia | last post by:
Hello gang, My coworker and I are writing a Python class for the other developers within our team. This class is supposed to encapsulate several things, including daemonizing, setting up logging, and spawning a thread to host an XML-RPC server. I'm having a real problem with logging.Logger and threading.Thread. In the main thread, we set up two loggers, each with file handlers. We then spawn the xml-rpc server thread, and allow the...
0
2300
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX page.I am using the Custom thread pool as given in the article's sample. Implementation: =============== In AsyncPage.aspx I inhereted AsyncPage class instead of System.Web.UI.Page. SyncPage.aspx is like any other Web page which inherits
6
2328
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something more sophisticated), and what situations might perturb it. Even a hint as to what would be considered normal scheduling might help. The root of our problem is that we observed a normally well-behaved web application suddenly limit itself to a...
13
2070
by: Paul | last post by:
Hi, How do I wait until a thread is finished his job then continue to the original thread? public void main(string args) { Thread t = new Thread(new ThreadStart(DoWork)); t.Start();
5
1260
by: tonyreynolds | last post by:
I have an asp.net application that needs to spawn a new thread but return the response back to the user before the thread finishes. My application works fine on my machine (XP pro) and on a win 2000 server, but I can't get a thread to start on a new win 2003 server. I've posted some sample code below. I've made sure that the user this runs under has permission to write the test file to the c: drive. This code works on all the servers...
1
1471
by: Razvan | last post by:
This problem occurs in ASP.Net application, only on Windows 2000. Everything works fine on Windows Server 2003. Here is the scenario: I configured the application to use impersonation and integrated security to connect to the database. These are the corresponding lines in web.config <identity impersonate="true" userName="our_domain\our_user" password="the_password" />
9
1857
by: schuetz | last post by:
Hi @ll, I'm working on a web project which has to use multiple channels to connect to receive several sources at once. The problem is, that I'm not aware of the maximum amount of Threads i can allocate to my channels. Can i open 10 threads, 100 threads even 1000? is there a general answer to it. my dev. environment runs on win. xp
4
2333
by: =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?= | last post by:
I'm wrestling with a problem that I'm hoping someone can help me with. I have a web application written in VS.2003 and running on version 1.1 of the .NET Framework on XP pro and Windows server 2003 that connects to a SQL server database and authenticates itself using windows authentication. The web application is configured to impersonate a local user account that has been granted access to the database. Here's the impersonation snip...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.