POV-Ray : Newsgroups : povray.off-topic : Semantics? : Re: Semantics? Server Time
8 Jul 2024 06:24:35 EDT (-0400)
  Re: Semantics?  
From: clipka
Date: 22 Sep 2015 10:56:47
Message: <56016c2f$1@news.povray.org>
Am 22.09.2015 um 15:06 schrieb scott:

> Yes, I think the additional HT'd threads being worth 41% of a real core
> thread, is the same thing as saying that if you only use the real cores
> you're utilising about 70% of the total CPU performance available. I
> assume that modern compilers optimise code to be hyperthread nicely?

Most unlikely - there's nothing much to optimize there.

In a hyperthreaded CPU, you actually /do/ have the number of cores that
the task manager claims you have, but they're not independent; instead,
they are organized in pairs that share various resources; for instance,
there might only be one floating-point arithmetics unit for each pair of
cores.

Any thread that needs any such shared resource /will/ compete for it
with any other thread running on the pair's other core. And as you
typically can't optimize away such resource requirements, you can't
optimize away the competition. In addition, different CPU types might
share different resources among core pairs, so you don't even know what
resources to try to avoid.

There might be ways for an application developer to optimize an
application for hyperthreading; the strategy would be to separate the
application's workload into two groups of threads that use different
sets of CPU resources, and coax the OS to run one thread from each group
in each pair of HT cores; this way, competition for resources will be
reduced. However, it might not be easy to partition the workload in such
a manner.


Post a reply to this message

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