I want to make some tuning for multithreaded program.
If I know how much threads can really work in parallel I can make the program much more effective.
Is there
One note about the availableProcessors() method, it does not distinguish between physical cpus and virtual cpus. e.g., if you have hyperthreading enabled on your computer the number will be double the number of physical cpus (which is a little frustrating). unfortunately, there is no way to determine real vs. virtual cpus in pure java.