[concurrency-interest] To Hyper-Thread or not
nathan.reynolds at oracle.com
Fri Dec 23 15:40:48 EST 2011
Intel has said that older hyper-threaded cores sometimes showed a gain
and sometimes showed a loss in throughput. They also said that newer
hyper-threaded cores show a 30-50% gain in throughput for the workloads
they tested. I am not sure where the older vs newer line is. A Nehalem
and Westmere CPU is definitely in the newer category.
I am not sure of the impact of hyperthreading on context switches.
I don't think JRockit or HotSpot do any thread scheduling or pinning. I
think the kernel scheduler determines where each thread runs. JRockit
Virtual Edition does thread scheduling since it is a thin "kernel" for
running JRockit as a virtualization guest.
As for detecting shared data/contention, that was the point of
@Contended email chain on this list a while back. Intel and Oracle have
worked on a solution for true/false sharing. The current Intel CPUs
don't quite expose enough information for a fully automated solution.
Consulting Member of Technical Staff | 602.333.9091
Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology
On 12/23/2011 12:57 PM, Rahul Saksena wrote:
> Assuming we have 8 physical cores (intel xeon SMP) and the java
> process has more than 12 threads running through out its life cycle
> (no shared variables),
> Would you enable hyperthreading and have 16 logical cores?
> Does enabling hyperthreading result in far less number of context
> switches in this case?
> Does the jvm recognize that these threads have no shared
> data/contention and pin/bind it to different cores?
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest