How many threads is Java 1.7 are capable of managing?
In a Server/Client Web Program where clients can login to the server. This login is stateful.
Clients > 3000 per Server
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Java has APIs which limit the number of Threads to Integer.MAX_VALUE. (~ 2 billion)
However your OS/Hardware will be the real restriction. Between 100 and 10K will be your limit depending on what you are doing.
Threads are usually created to improve performance. However they add overhead so you will reach a point where adding threads will decrease performance. In rare cases two threads are not as good as one. The point at which more threads hurts performance depends on your application, your hardware and how it is used.
Note: If you have 16 logical cores, there will only be up to 16 threads running at any given moment.