In Java (or probably most other languages targeting the JVM) what is a reasonable number of threads to use? Presumably, this will be expressed as a ratio to the number of cores/processors available, is that correct?
At least initially, it seems like twice as many threads as cores might make sense, but 20+ times as many seems unreasonable. Is the ratio likely to be affected by the type and/or architecture of the software? Are there types of software and/or situations in which a much larger number of threads really makes sense?
[And yes, I know that's phrased as a number of separate questions, but I think they're closely enough related for a single answer to cover all of them, since they're all really about how many threads make sense under what circumstances.]