From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 18:45:06 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93C7516A4B3 for ; Sat, 4 Oct 2003 18:45:06 -0700 (PDT) Received: from mail.silverwraith.com (66-214-182-79.la-cbi.charterpipeline.net [66.214.182.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AC8143F75 for ; Sat, 4 Oct 2003 18:45:05 -0700 (PDT) (envelope-from avleen@silverwraith.com) Received: from avleen by mail.silverwraith.com with local (Exim 4.22) id 1A5xxE-0005ax-SO; Sat, 04 Oct 2003 18:45:00 -0700 Date: Sat, 4 Oct 2003 18:45:00 -0700 From: Avleen Vig To: Richard Coleman Message-ID: <20031005014500.GD12128@silverwraith.com> References: <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> <20031004200435.GA60432@rot13.obsecurity.org> <3F7F41A5.7020202@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F7F41A5.7020202@mindspring.com> User-Agent: Mutt/1.5.4i Sender: Avleen Vig cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka cc: Kris Kennaway Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2003 01:45:06 -0000 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)