473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 30652
"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
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...
2
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
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...
3
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...
1
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...
4
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
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...
5
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...
6
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 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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,...
0
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...

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.