Hyperthreading hurts 5.3?

Andrea Venturoli ml.diespammer at netfence.it
Thu Jan 13 12:37:17 PST 2005

Anthony Atkielski wrote:
> Andrea Venturoli writes:
> AV> Not exactly the same algorithm and on different set of data.
> But similar machine instructions, perhaps?

Yes, both numerical computations.
Basically one thread would model geometry and the other would mesh it.
Frequent stall would arise, as the two process would only by chance 
require the same time, even so the two CPUs were always at full load 
(!?!?!?). I also tried different combinations, e.g. three modelling 
threads and one mesher with, again, equal timings.

BTW, it's worth to mention, I *have* to use a compiler that knows 
nothing about SSE or the like, so all is done with FPU instructions as 
in the old 387s...

> Just the contention for the FPU alone might have had the effect of
> single-threading the workload.

I've come to the same conclusion. Still I can't put this together with 
100% load on both processors. If, as someone said, there is only one 
FPU, *how* are these figures coming out??? I would have expected 
something like 50%-50% (instead of 100%-0% of the single threaded 
version). *If* there is only one FPU, I'd expect both virtual processors 
being frequently idle waiting for each other.

> That plus the SMP overhead might give
> you a zero or negative gain with HT.

I tried a multithreaded version on a UP machine (nonsense, I know): the 
locking overhead is there, but very minimal: a process which takes 16 
minutes will require, maybe, 3 seconds more.


More information about the freebsd-questions mailing list