Confused about HyperThreading and Performance
Dan Nelson
dnelson at allantgroup.com
Wed Nov 12 14:17:42 PST 2003
In the last episode (Nov 12), Daniel Ellard said:
> When I run a kernel using the default configuration (no SMP, no
> APIC), the application takes an average of 8.45 seconds (wall-clock
> time) to run, and this number is consistent from run to run. When I
> run a kernel built with either SMP or SMP+APIC, it takes an average
> of 13.25 seconds, and this number is also quite consistent. (It's
> not the Alteon; using the Intel Pro/1000 XT server adapter with the
> em driver gives a similar difference, although the intel NIC is
> slower.)
>
> Interestingly, the CPU utilization for the default kernel is about
> 75-80%, while for the APIC kernel it is over 95%. My guess would be
> that something is spinning on a lock in the APIC kernel, but that's
> just a hunch.
You may just be seeing the overhead due to having SMP enabled. A
single-processor kernel doesn't need to lock structures against
simultaneous access by another CPU.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list