From owner-freebsd-current@FreeBSD.ORG Tue Aug 26 23:13:50 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79E6216A4BF; Tue, 26 Aug 2003 23:13:50 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFA7443FDD; Tue, 26 Aug 2003 23:13:48 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id QAA10392; Wed, 27 Aug 2003 16:13:45 +1000 Date: Wed, 27 Aug 2003 16:13:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin In-Reply-To: Message-ID: <20030827154738.R2144@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: HTT on current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 06:13:50 -0000 On Tue, 26 Aug 2003, John Baldwin wrote: > On 26-Aug-2003 Yamada Ken Takeshi wrote: > > JYI, > > I tested machdep.hlt_logical_cpus=0/1, buildworld, > > and found no particular reason to disable HTT > > as below with Zeon 2.8Ghz x 2, 1GBmem, Slow IDE HDD. > > > > It may not be the common case, so just for your info. > > > ># sysctl machdep.hlt_logical_cpus=0 > ># /usr/bin/time make -j32 buildworld > > 1910.29 real 2520.53 user 777.30 sys > > > ># sysctl machdep.hlt_logical_cpus=1 > ># /usr/bin/time make -j32 buildworld > > 2289.33 real 2666.66 user 645.88 sys > > One test is not sufficient. -current is also not the best > place to test. :) When I first implemented HTT in -current The above times seem slow enough to be partly the result of debugging options in -current. I get buildworld times ranging from 1401 seconds (2002/09/01) to 2427 seconds (2003/05/06) on Athlon XP1600 x 1 depending on configuration and tuning (but never with any expensive debugging options). A Xeon 2.8GHz x 2 should be a bit faster than an old Athlon. > ... I did 16 trials (first one was > throwaway) of back-to-back buildworlds of the same version > of -stable using make, make -j2, and make -j4 for the > following configurations: UP, HTT, HTT with smp_idle_hlt, and > HTT with pause instructions added to stable and smp_idle_hlt. > The fastest build time belonged to UP without any -j option. All benchmarks using -j are invalid because of a pessimization in make(1). It sleeps for up to SEL_USEC = 100000 usec after completion of every job (average 50 msec). With -j2 this increases !SMP buildworld times of approx. 2000 seconds by approx. 15%. I think it has a smaller effect for larger -j values and for SMP but haven't benchmarked it. This is fixed in NetBSD. I think fixing it was more urgent in NetBSD because NetBSD never changed SEL_USEC from its 4.4Lite default of 500000. 500000 was large enough to be noticeable even in 1997 when it was reduced in FreeBSD. Bruce