From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 12 14:17:42 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 CFD1A16A4F5 for ; Wed, 12 Nov 2003 14:17:42 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFD6543FE3 for ; Wed, 12 Nov 2003 14:17:41 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id hACMHZWG076057; Wed, 12 Nov 2003 16:17:35 -0600 (CST) (envelope-from dan) Date: Wed, 12 Nov 2003 16:17:35 -0600 From: Dan Nelson To: Daniel Ellard Message-ID: <20031112221735.GE37293@dan.emsphone.com> References: <20031112103358.S11644@bowser.eecs.harvard.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031112103358.S11644@bowser.eecs.harvard.edu> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: Confused about HyperThreading and Performance 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: Wed, 12 Nov 2003 22:17:42 -0000 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@allantgroup.com