Why build's user CPU on 4-CPU machine with hyper-threading
always higher with -j 8 compared to with -j 4?
wojtek at wojtek.tensor.gdynia.pl
Sat May 23 20:39:38 UTC 2009
> I noticed that the same exact build on i7-920 (4 CPUs) consumes ~15% more
> user CPU when run with -j 8 compared to -j 4.
> Hyper-threading is enabled so top shows 8 CPUs.
> Why would user time be higher in a hyper-threaded run?
because it doesn't count actual instruction executed but - as name suggest
with -j 8 it sums time of 8 pseudo-processors
single pseudo-processor ("half" of single core) is slower than
The whole trick with hyperthreading is that it's less than half slower, as
one "pseudo-processor" become full-processor every time that second
"pseudo-processor" is stalled on memory access.
today memory access to DRAM means over hundred of CPU cycles. out of order
execution can execute other instruction to some extent, but only "some".
even L3 cache access costs >>10 CPU cycles
More information about the freebsd-questions