Subject: Re: scheduler woes on MPACPI kernel
To: Manuel Bouyer <email@example.com>
From: Peter O'Kane <firstname.lastname@example.org>
Date: 01/21/2005 13:05:25
Agreed. 10% was a round number, it is really only 7% to 8%.
With normal production loads I rarely see more than 2 processes actually
executing. Since the NetBSD scheduler does not distinguish between logical
and physical processors it can, and often does, schedule two threads on the
logical processors in one package and leave the other processor idle.
In general processes appear to remain on the BSP and the other logical
processor in the same package. This causes interrupts serviced by the BSP
to suffer the performance degradation from having a thread executing on the
other logical processor.
Looking at the per logical processor performance hit of about 45% with HT I
wonder what the motivation for HT was in the first place. I have certainly
decided not to use HT on my production systems.
To make HT useful the scheduler would have to have knowledge of the
physical reality behind the logical processors and maybe carefully place
related threads on the correct processors. At the very least the scheduler
would have to distribute processes across physical processors before
starting to use the "secondary" processor in each package.
I am cc'ing this to tech-smp since that's a more appropriate place than
current-users for this thread.
--On 20 January 2005 22:48 +0100 Manuel Bouyer <email@example.com>
> On Wed, Jan 19, 2005 at 05:15:34PM +0000, Peter O'Kane wrote:
>> Good point. Further results here running make -j8 to build a 2.0 kernel:
>> Real User System Configuration
>> 288.12 255.15 35.97 Single processor no HT
>> 251.72 440.61 49.55 Single processor with HT
>> 165.58 260.00 40.74 Twin physical processors no HT
>> 151.54 435.04 69.11 Twin physical processors with HT
>> again running make -j16
>> 160.9 263.44 44.24 Twin physical processors no HT
>> 146.46 452.66 78.69 Twin physical processors with HT
>> and finally make -j32
>> 158.82 260.33 42.63 Twin physical processors no HT
>> 146.23 465.37 77.8 Twin physical processors with HT
>> Note that the user/system time required to do the job remains fairly
>> constant at about 250-260/30-45 seconds with HT off. With HT enabled the
>> user/system time required rises to about 440-460/50-70 seconds.
>> It appears that HT gives about 10% overall performance boot for many
>> tasks but the effective processor speed seen by a single thread is
>> 55%-60% of the speed of the processor in non HT mode.
> This matches what I've noticed when I tested a single-CPU P4 system
> (although I though the gain was more like 6-7% than 10%).
> Manuel Bouyer <firstname.lastname@example.org>
> NetBSD: 26 ans d'experience feront toujours la difference
Peter O'Kane E-mail:email@example.com
Information Technology Department, Voice: +353 91 492527
National University of Ireland, Galway. Fax: +353 91 494501