On 29/08/2011 23:15, Brett Glass wrote:
At 01:55 PM 8/29/2011, Bruce Cran wrote:
Actually, the ULE scheduler does know about HyperThreading and the
topology of such CPUs. I don't know what it does with the
information, but it probably works to optimize cache usage etc.
Alas, during a recent kernel build, I used the -j2 command line option
in "make" and watched as the scheduler repeatedly assigned two
instances of cc (the most CPU-intensive program) to the same core.
I might be wrong, but that would be the result I expect if I were to
pass -j2 to a dual core CPU. If I wanted the the compilation to run on
both core I would use -j3. The good old "number of cores+1".
I think the last compilation "slot" is used to prepare the next
compile/do trivial compile, so that the cores dedicated to compile can
switch from one task to the next faster.
The interesting test to do would be if you do -j3 would ULE assign the
second compile to HT or to second core.
During that process, I also watched CPU utilization in top(1). The
peak was 46% idle, which means that HTT appeared to be making at most
a 4% difference. (If the peak were 50% idle, HTT would be doing
nothing at all, because top(1) can't tell that there aren't really 4
CPUs.)
H.T varies greatly from one processor to the next, on the Pentium 4 1st
gen it is a sad joke, on the Atom it is a small help for easy tasks, on
i7 it is almost as good as a real core (Translation : if you use only
the HT of a core you will get roughly the same perfs as if you use only
the direct core)
None the less H.T is just another entry point on the same core, so if HT
is not used at all you will have 100% CPU power on direct, if direct is
not used at all you will have 30%-95% cpu power on HT (depending on the
processor). If both are used at he same time you will get between
45%+20% (P4 1st gen) to 50%+45% (i7 last gen).
But since raw CPU power is not the only thing that matters in real world
you can get up to +25% perfs on a I7 with HT enabled.
--Brett Glass
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"freebsd-questions-unsubscr...@freebsd.org"
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"