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
You can use
Runtime.getRuntime().availableProcessors()
But its more of a best guess and even mentioned by the API
This value may change during a particular invocation of the virtual machine. Applications that are sensitive to the number of available processors should therefore occasionally poll this property and adjust their resource usage appropriately.