Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2003 18:45:00 -0700
From:      Avleen Vig <lists-freebsd@silverwraith.com>
To:        Richard Coleman <richardcoleman@mindspring.com>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Hyperthreading slowdown
Message-ID:  <20031005014500.GD12128@silverwraith.com>
In-Reply-To: <3F7F41A5.7020202@mindspring.com>
References:  <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> <20031004200435.GA60432@rot13.obsecurity.org> <3F7F41A5.7020202@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 04, 2003 at 05:54:45PM -0400, Richard Coleman wrote:
> >>>>hyperthreading kernel,  make -j 1 --- 1:09
> >>>>hyperthreading kernel,  make -j 2 --- 0:42
> >>>>singlethreading kernel, make -j 1 --- 0:45
> >>>>singlethreading kernel, make -j 2 --- 0:41

[snip]

> >Yes, that's because (as discussed in the archives) the kernel treats
> >it like an extra, completely decoupled physical CPU and schedules
> >processes on it without further consideration.  This is presumably the
> >cause of the slowdown, because it's only efficient to use the virtual
> >CPU under certain workload patterns.  HTT is not magic performance
> >beans.
> 
> Sigh.  No one is claiming HTT is magic performance beans.  The 50% 
> slowdown I'm talking about is between -j1 and -j2 BOTH ARE WHICH ARE 
> USING HTT.
> It's just an interesting observation.  That's all.

Yeah, that's precisely what Kris said :-)
When you have one processes hitting either one of two CPU's, that one
CPU is going to get used to the fullest.
When you are splitting the processes over two CPU's extra time needs to
be taken for the extra scheduling and other extra work. The increase
here is significant, but not unexpected :-)

Now, if you had two seperate processes fighting for CPU time, you'd see
a performance increase:
  Try running 'make -j 1' twice, on two different kernel configs files
  who's contents are the same.
  First try it without hyperthreading and then try it with
  hyperthreading.

-- 
Avleen Vig
Systems Administrator
Personal: www.silverwraith.com
EFnet:    irc.mindspring.com (Earthlink user access only)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031005014500.GD12128>