My CPU is 8x2600 MHz (Intel Xeon CPU E5-2670 0 @ 2.60GHz).
I have a data processing algorithm which can run in parallel written in Java. This function determines the number of concurrent threads during runtime with
Runtime.getRuntime().availableProcessors()
which returns 8.
This algorithm is 100% non-blocking. The CPU supports hyper threading with 2 threads per core.
Now should I run the algorithm with 8 threads because Java sees only 8 cores, or should I use 16 Java threads taking in to consideration the hyper threading provided by the CPU?
Runtime.getRuntime().availableProcessors()
will return 16 if HT is enabled on an 8core CPU. – alzee