473,529 Members | 4,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Maximum number of Threads

I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close.
Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
2. Does the JVM open a native thread for each java thread?

I know both question is OS and JVM dependent,
so I'm not expecting exact numbers here. The client will probably run on Solaris or NT.

Thanks.
Jul 17 '05 #1
5 30659
"Tzach" <tz***@phonedo.com> wrote in message
news:m1************@netra01.phonedo.co.il...
I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close. Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
2. Does the JVM open a native thread for each java thread?

I know both question is OS and JVM dependent,
so I'm not expecting exact numbers here. The client will probably run on Solaris or NT.
Thanks.


On the first question, I've had upwards of 7000 threads running
simultaneously on Win XP Home before I got an OutOfMemoryException. I never
tried changing the memory usage from the command line, though.
Jul 17 '05 #2
"Tzach" <tz***@phonedo.com> wrote in message
news:m1************@netra01.phonedo.co.il...
I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close. Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
2. Does the JVM open a native thread for each java thread?

I know both question is OS and JVM dependent,
so I'm not expecting exact numbers here. The client will probably run on Solaris or NT.
Thanks.


On the first question, I've had upwards of 7000 threads running
simultaneously on Win XP Home before I got an OutOfMemoryException. I never
tried changing the memory usage from the command line, though.
Jul 17 '05 #3
Tzach <tz***@phonedo.com> wrote in message news:<m1************@netra01.phonedo.co.il>...
I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close.
Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
AFAIK this is OS dependent. I'm not aware that Java has a limit, but
your OS probably does.
2. Does the JVM open a native thread for each java thread?


Depends upon the implementation you are running, but many JVM's are
very close to the OS when it comes to threading, so the number of
threads used by your application will probably match the number of OS
threads running (don't forget to include Java's own threads like the
garbage collector!)
-FISH- ><>
Jul 17 '05 #4
Tzach <tz***@phonedo.com> wrote in message news:<m1************@netra01.phonedo.co.il>...
I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close.
Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
AFAIK this is OS dependent. I'm not aware that Java has a limit, but
your OS probably does.
2. Does the JVM open a native thread for each java thread?


Depends upon the implementation you are running, but many JVM's are
very close to the OS when it comes to threading, so the number of
threads used by your application will probably match the number of OS
threads running (don't forget to include Java's own threads like the
garbage collector!)
-FISH- ><>
Jul 17 '05 #5
You are right in saying this is both JVM and OS dependent. Its been some
time since I worked with threads, so here is what my memory serves me

I think in your situation what you might need is a Thread que and submit
jobs to this que as they come in. It would definately be a more controlled
approach in your client app. Usually there is a limit (based on OS, JVM
hardware etc) after wich the JVM performance drops dramatically. I have seen
this happen on one of my past projects. The server came to a screching halt
after around 300+ threads, but this was back in 98. Both hardware, OS and
JVMs have evolved since then.

Now about Threads JVM and OS
JVM, There are green_thread and native_thread JVMs
There is also np-threads implementation (I think from IBM) where in n native
threads map to p number of JVM threads (I think the JDK1.4 mixed-mode JVM is
of this type).
Then comes the OS, I belive linux has a per process restriction (built into
the kernel) of around 128 native threads (I don't recall the exact number).

If a JVM is spawning native thread for every thread in the JVM then the
performace is based on the OS, behaviour, number and everything else is
dependent on the OS. Native threads are better in performance than
green_threads implementation where the JVM manages its own threads. On the
other hand greenthreads behave exactly the same on multiple platforms, since
the JVM is managing them.

cheers
Haider
"Ryan Stewart" <zz********@gSPAMo.com> wrote in message
news:8p********************@texas.net...
"Tzach" <tz***@phonedo.com> wrote in message
news:m1************@netra01.phonedo.co.il...
I'm developing a simple Java client that runs over a CORBA server.
The main client thread is waiting for notification from this server.
On each notification,
The client creates a new thread executing some logic with the server and close.
Each session spend most of the time waiting for the server.
At most there can be ~1000 open session.
My questions are:
1. How many threads can be open at the same time
(with response time of up to ~1 second)?
2. Does the JVM open a native thread for each java thread?

I know both question is OS and JVM dependent,
so I'm not expecting exact numbers here. The client will probably run on

Solaris or NT.

Thanks.


On the first question, I've had upwards of 7000 threads running
simultaneously on Win XP Home before I got an OutOfMemoryException. I

never tried changing the memory usage from the command line, though.

Jul 17 '05 #6

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

Similar topics

0
2996
by: David.Tymon | last post by:
>Description: MySQL v4.1.0-alpha only allows a client to prepare a maximum of 254 statements. On the 255th mysql_prepare() call, a failure is returned with no information returned by mysql_error(). This occurs even if the statements are closed after each use. >How-To-Repeat: The following program highlights the problem. Just change the...
2
28534
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
1
1911
by: K. Davis | last post by:
I need to increment the maximum value of a field of a table by 1 when a form opens a blank record. (e.g. =max(!![trip_number}) so the logic and references are working at the form level. I've tried a number of variants tied to the before update event, but always get the message "The field 'tripmain.trip_number' can't contain a Null value...
3
12207
by: Raghu Rudra | last post by:
By default, the machine.config contains following information: <system.net> ....... <connectionManagement> <add address="*" maxconnection="2"/> </connectionManagement> </system.net> This limits the number of connections to web server to 2. For example, if
1
9595
by: Dominic | last post by:
I'd like to tune the performance of my application in a web garden. Our server has dual processors. Is there any guideline to set this "maximum number of worker processes" for web garden? In my application, stress test shows that setting it to 2 gives a better performance result. In other words, web garden helps. My first question is if it...
4
6889
by: Amir Shitrit | last post by:
What is the maximum number of threads Windows supports (for all processes), and what's the maximum number of threads available per process? Thanks.
12
18968
by: Paul Sijben | last post by:
I have a server in Python 2.5 that generates a lot of threads. It is running on a linux server (Fedora Core 6). The server quickly runs out of threads. I am seeing the following error. File "/home/sijben/ORCA/src/libmercury_mt.py", line 565, in __init__ MercuryObject.__init__(self,mylink) File "/home/sijben/ORCA/src/libmercury_mt.py",...
5
2555
by: linda.chen | last post by:
Hi all, We have a webservice (service1), which calls another webservice(service2) from another orginization. Our end users make requests throught service1. When service2 receives a quest, it puts all the request information into a database. The request will be picked up from a sheduler which is installed in 8 different servers. The...
6
10648
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value = m_vScrollBar.Maximum; The scroll bar is set to start from the bottom.
0
7353
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7277
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...
0
7673
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...
1
7263
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...
0
7626
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...
0
5814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3339
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...
0
3333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
902
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.