From owner-freebsd-arch@FreeBSD.ORG Tue Nov 23 16:51:37 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 775E716A4CE; Tue, 23 Nov 2004 16:51:37 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07A0243D49; Tue, 23 Nov 2004 16:51:37 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id iANGno70091129; Tue, 23 Nov 2004 11:49:50 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)iANGno2k091126; Tue, 23 Nov 2004 16:49:50 GMT (envelope-from robert@fledge.watson.org) Date: Tue, 23 Nov 2004 16:49:50 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Stephan Uphoff In-Reply-To: <1101227104.26313.9422.camel@palm.tree.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "freebsd-arch@freebsd.org" Subject: Re: macro benchmark for mutex locks needed. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 16:51:37 -0000 On Tue, 23 Nov 2004, Stephan Uphoff wrote: > I have a bunch of ideas to speed up spin and mutex locks somewhat. For > this I need benchmarks to test different modifications. > > While the micro-benchmark from rwatson@ is a good way to quickly test > modifications to weed out unlikely candidates - jhb@ tests have shown > that micro and macro-benchmarks do not always show the same result. > > Running benchmarks and booting takes a lot of time. Since this is NOT > one my favorite tasks I want to run generally accepted benchmarks so I > can test (boot) each modification exactly once for each test machine. > > If you think I should run certain benchmarks with certain parameters > please tell me BEFORE I start testing! I like to use netblast from src/tools/tools/netrate/netblast. It attempts to send packets as quickly as possible on a network interface, which is a CPU-intensive operation that is very sensitive to the cost of synchronization. On an SMP system, it also generates a moderate ithread load as the gig-e interface transmits, and that ithread will often contend on the network interface driver lock with the running netblast thread. As such, it changes that affect the cost and handling of contention are also visible in this benchmark. With the synchronization micro-benchmark, I see spin locks on SMP being faster with the atomic release removed, but in the netblast test, I see those spinlocks as slower on SMP, since they behave less well under contention. (The above with 64-bit if_em cards on a dual-Xeon). Note that you'll want to make sure netreceive is running on a second box, or that you're sending to the broadcast address, or the icmp errors will substantially quench your send ability due to the asynchronouse report of the port closed. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research