• 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
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

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
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic