| Author |
how many threads to create within a jvm?
|
Nick Faiz
Greenhorn
Joined: Oct 12, 2002
Posts: 11
|
|
How does one measure how many threads to create within a given jvm, to provide optimal performance? I ask because Im writing an application that must make a threaded request of SAP for every order number it finds in an database. It seems unreasonable that I allow this to be an open-ended number of threads, even though my employers will never have an infinite amount of orders in their database. I'm thinking of writing some kind of optimization algorithm using Runtime.freeMemory(), totalMemory() and maxMemory(). Is there a better alternative?
|
 |
Mr. C Lamont Gilbert
Ranch Hand
Joined: Oct 05, 2001
Posts: 1170
|
|
|
You will have to test to see the optimum number. But this number will change depending on your environment so your software should be configurable in that sense.
|
 |
 |
|
|
subject: how many threads to create within a jvm?
|
|
|