From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 10:10:19 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D1DC16A4D0 for ; Thu, 20 May 2004 10:10:19 -0700 (PDT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58D5343D46 for ; Thu, 20 May 2004 10:10:19 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 6075 invoked from network); 20 May 2004 17:10:16 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 May 2004 17:10:16 -0000 Received: from hydrogen.funkthat.com (klmrwv@localhost.funkthat.com [127.0.0.1])i4KHAGEx079493; Thu, 20 May 2004 10:10:16 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i4KHAG6r079492; Thu, 20 May 2004 10:10:16 -0700 (PDT) Date: Thu, 20 May 2004 10:10:16 -0700 From: John-Mark Gurney To: JG Message-ID: <20040520171016.GA60558@funkthat.com> Mail-Followup-To: JG , freebsd-amd64@freebsd.org References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040520041642.03db2188@mail.ojoink.com> <5.2.0.9.2.20040520085802.015fc2d0@mail.ojoink.com> <5.2.0.9.2.20040520094801.0436d208@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.2.20040520094801.0436d208@mail.ojoink.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-amd64@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2004 17:10:19 -0000 JG wrote this message on Thu, May 20, 2004 at 09:53 -0700: > Is there some kind test I can run to find out if SMP is actually being used > efficiently or not? > > John-Mark said something earlier about watching output of "vmstat -w 1" and > if the ID's don't > drop below 20 then I am probably only using a single CPU. Well, I hope > that's not the case > because I ran that while cvsup was compiling (it just finished) and the > ID's never dropped > below 50. Well, there is two parts to SMP, one is the OS seeing the CPU, which is probably happening, since you don't see the idle time drop below 50%... to check how many cpu's FreeBSd sees, run: sysctl hw.ncpu I get: -bash-2.05b$ sysctl hw.ncpu hw.ncpu: 2 On a dual proc box.. The next part is if the program makes use of either multiple processes, or a threading library like libpthread that will support concurent threads of execution... This last part is the problem you are having... There seems to be a problem with libpthread not starting another kse (iirc) to support the extra cpu... You can run ps -H durning the mysql run, and you should see multiple entries for the mysql daemon. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."