• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Max. Number of Threads

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
is there any limit on number of threads that we can create??
if yes what happens if i exceed that number??
thanx in advance
-prasanna
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd imagine it depends on lots of factors, but I do know that a couple of years ago the useful limit in a browser applet was about 300
Dave
 
Prasanna KumarBP
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi David
thanx for ur reply.
let assume that there is a limit on the number of threads. then what if i try to create more than that??

-prasanna
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It jams the system and nothing moves.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's not really a single hard limit to the number of threads - as you add more threads, the system will gradually slow down - each thread will accomplish less. Eventually you reach a point of diminishing returns, were the work lost due to slowdown is greater than the work gained by the added threads. The optimum number for performance is best determined by testing your particular application on machines similar to what your application's users will be using. It may also be useful to make maxThreads a user-configurable parameter, since a user with a 900 MHz chip and 256 MB RAM will probably be able to run a lot more threads than one with 233 MHz and 64 MB. (Of course, you'll also want to configure the amount of memory available to the JVM in this case - see the java -mx option.)
 
Prasanna KumarBP
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx Jim Yingst
 
Liar, liar, pants on fire! refreshing plug:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic