POV-Ray : Newsgroups : povray.off-topic : Hyperthreading : Re: Hyperthreading Server Time
29 Jul 2024 10:26:07 EDT (-0400)
  Re: Hyperthreading  
From: Le Forgeron
Date: 20 Jul 2012 05:58:17
Message: <50092bb9$1@news.povray.org>
Le 20/07/2012 10:03, Invisible a écrit :
> On 20/07/2012 12:45 AM, Darren New wrote:
>> On 7/5/2012 11:22, Orchid Win7 v1 wrote:
>>> (In spite of the fact that I'm actually using ALL the cores available.)
>>
>> You're not, tho. Hyperthreading means you have like 1.5 cores for every
>> "core". I assume you know what hyperthreading does. You could probably
>> see a speed-up by running 5 copies of pov-ray instead of 4.

Well, personal measures about hyperthreading and povray 3.7 seems to
indicate that a HT core is rather between 1.2 and 1.25 core for povray
(see details and graph in povray.benchmarking). at least for the
benchmark scene.

> 
> As I understand it, hyperthreading allows you to schedule 2 threads on
> each core. The first thread gets all available resources. If any are
> unused, they are assigned to the second thread.

HT is: a second set of registers. Nothing more. No additional FPU or
fancy integer units.

> 
> This means that if, say, one thread is using floating-point arithmetic
> and the other is using integer arithmetic, both threads run at nearly
> full speed. On the other hand, if both threads are using integer
> arithmetic, only one thread runs, and the other makes no progress. (At
> least, until the OS reschedules.)

Well, it's more subtle, due to the Intel pipeline, but globally correct:
if they want the same resources at the same time, there is a contention
and the pipeline will rearrange them. The OS is usually unaware of such
issue: the granularity of the OS is far bigger than the small cycle in
the pipeline.

At best, operation of time 1 + another of time 1 could be done in 1 if
they do not use the same units at the same time... At worst it could be
2. Due to the pipeline splitting an instruction in multiple steps, it's
possible to interleave some steps in the empty slots of the first
thread-core.

> 
> Thus, I can believe that running two different applications might see a
> benefit. If they're performing different tasks, they probably use
> different execution unit types. But running two copies of the same
> application is highly unlikely to see any benefit - unless the
> application uses a really variable mix of instruction types...

Guess what, povray is not a single instruction!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.