Re: Detecting CPUs and cores
- From: "Daniel Dyer" <"You don't need it">
- Date: Tue, 31 Jul 2007 12:18:25 +0100
On Tue, 31 Jul 2007 12:05:07 +0100, Lew <lew@xxxxxxxxxxxxxxxx> wrote:
Patricia Shanahan wrote:A programmer may have determined experimentally that two threads running
on different cores get significantly more throughput than one, but that
the same two threads running hyper-threaded get less throughput than
one. The program is written so that the number of threads is a free
parameter.
The program should limit the number of threads to be no more than the
number of cores, but cannot because it cannot tell the difference
between two separate cores and a single hyper-threaded core.
It is likely that the two hyper-threaded cores will achieve more throughput than on one of those "cores". The reason Intel provided hyperthreading is that it increases throughput on the chip.
That's the theory, but it's less clear cut than with a "proper" dual core chip. There is anecdotal evidence of people turning *off* Hyper-Threading in the BIOS to improve the performance of their applications.
http://news.zdnet.co.uk/hardware/0,1000000091,39237341,00.htm
http://www.javalobby.org/java/forums/t54590.html
I haven't personally benchmarked the effect of Hyper-Threading but, if your application is relying on the result of availableProcessors() to fine tune it's concurrency strategy, it's important to be aware that 1 HT CPU may behave quite differently from 1 dual-core CPU.
Dan.
--
Daniel Dyer
http://www.uncommons.org
.
- Follow-Ups:
- Re: Detecting CPUs and cores
- From: Eric Sosman
- Re: Detecting CPUs and cores
- From: Lew
- Re: Detecting CPUs and cores
- References:
- Detecting CPUs and cores
- From: Chris
- Re: Detecting CPUs and cores
- From: Joshua Cranmer
- Re: Detecting CPUs and cores
- From: Daniel Dyer
- Re: Detecting CPUs and cores
- From: Lew
- Re: Detecting CPUs and cores
- From: Eric Sosman
- Re: Detecting CPUs and cores
- From: Lew
- Detecting CPUs and cores
- Prev by Date: Re: tomcat log4j
- Next by Date: Need efficient search strategy in list of time intervals
- Previous by thread: Re: Detecting CPUs and cores
- Next by thread: Re: Detecting CPUs and cores
- Index(es):
Relevant Pages
|