From owner-freebsd-performance@FreeBSD.ORG Wed Apr 26 01:39:28 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29C1F16A401 for ; Wed, 26 Apr 2006 01:39:28 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84BB143D49 for ; Wed, 26 Apr 2006 01:39:27 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so899323wxc for ; Tue, 25 Apr 2006 18:39:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uCV9XaIrkCy8wB+ejYxS8TZlHnb+5qnZXZkG1+I17en1MWoiii5RV/rHWef0sMvVNErNi7Z9d1Ua7sODhFfxh769axCj0ubmmfdLzb5Sia0QJuSGgOzSa6krmAHMXtIBR0omfxZ18+s1DwqgoTGLmLpLT0dkS9YnXoIBbEwa4LE= Received: by 10.70.97.7 with SMTP id u7mr4754256wxb; Tue, 25 Apr 2006 18:39:25 -0700 (PDT) Received: by 10.70.116.7 with HTTP; Tue, 25 Apr 2006 18:39:25 -0700 (PDT) Message-ID: <84dead720604251839t3014389dka036b7d7bbd422c@mail.gmail.com> Date: Wed, 26 Apr 2006 07:09:25 +0530 From: "Joseph Koshy" To: "Bill Moran" In-Reply-To: <20060425090739.8470143f.wmoran@collaborativefusion.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060425090739.8470143f.wmoran@collaborativefusion.com> Cc: freebsd-performance@freebsd.org Subject: Re: Dual-core CPU vs. very large cache X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 01:39:28 -0000 > Our current Dells have 2M cache, and I'm trying to determine > whether the 8M cache will make a significant difference or > not. Can someone recommend a testing procedure for > determining whether adding cache is worthwhile or not? > I can simulate a test load at any time, but I don't know how > to tell whether the cache is the bottleneck of the CPU or not. You didn't say which version of FreeBSD you are running. If this is 6.X, you could run pmcstat(8) in a system-wide counting mode and measure cache behaviour directly. Briefly, # (compile, boot a kernel with options HWPMC_HOOKS) # kldload hwpmc # pmcstat -w 1 -s dc-misses test-load See pmc(3) and the CPU vendor documentation referenced there for the events your CPU can measure. If your application is CPU bound you may want to check for memory bus behaviour, cache behaviour, cycles the processor was stalled and for poor branch prediction. If you notice anything anomalous, you can use the hwpmc's sampling modes to find out what code is causing the anomaly. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy