From owner-freebsd-amd64@FreeBSD.ORG Sun May 16 05:31:41 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 402A616A4CE for ; Sun, 16 May 2004 05:31:41 -0700 (PDT) Received: from hexagon.stack.nl (hexagon.stack.nl [131.155.140.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9074C43D31 for ; Sun, 16 May 2004 05:31:40 -0700 (PDT) (envelope-from marcov@stack.nl) Received: from toad.stack.nl (zen.stack.nl [IPv6:2001:610:1108:5010::130]) by hexagon.stack.nl (Postfix) with ESMTP id 9F4442D467; Sun, 16 May 2004 14:31:39 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 816) id 79BC594; Sun, 16 May 2004 14:31:39 +0200 (CEST) In-Reply-To: <20040515231954.4594F93@toad.stack.nl> "from Marco van de Voort at May 16, 2004 01:19:54 am" To: Marco van de Voort Date: Sun, 16 May 2004 14:31:39 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20040516123139.79BC594@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) cc: freebsd-amd64@freebsd.org Subject: Re: ABI question, porting ports to amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 12:31:41 -0000 > I read the ABI info on x86-64.org, and objdumped some linux and freebsd > code, and I ran into a linux<->freebsd difference something I can't figure > out: Answering my own question: FreeBSD uses the gcc mechanism to build the same parameterlist for a syscall like for a normal procedure. (to avoid having to shift params) The register for the 4th parameter for gcc is %rcx, for the kernel it is %r10. So gcc puts the 4th param in %rcx, and the move moves it to %r10 for the kernel. From owner-freebsd-amd64@FreeBSD.ORG Sun May 16 13:16:48 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 BB42B16A4CE for ; Sun, 16 May 2004 13:16:48 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 047E543D31 for ; Sun, 16 May 2004 13:16:41 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id 475CC2A8DD for ; Sun, 16 May 2004 13:16:32 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id AF914E29E for ; Sun, 16 May 2004 13:16:31 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i4GKGVfG046749; Sun, 16 May 2004 13:16:31 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i4GKGU6r046748; Sun, 16 May 2004 13:16:30 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Sun, 16 May 2004 13:16:30 -0700 User-Agent: KMail/1.6.1 References: <20040516123139.79BC594@toad.stack.nl> In-Reply-To: <20040516123139.79BC594@toad.stack.nl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405161316.30635.peter@wemm.org> Subject: Re: ABI question, porting ports to amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 20:16:48 -0000 On Sunday 16 May 2004 05:31 am, Marco van de Voort wrote: > > I read the ABI info on x86-64.org, and objdumped some linux and > > freebsd code, and I ran into a linux<->freebsd difference something > > I can't figure out: > > Answering my own question: > > FreeBSD uses the gcc mechanism to build the same parameterlist for a > syscall like for a normal procedure. (to avoid having to shift > params) > > The register for the 4th parameter for gcc is %rcx, for the kernel it > is %r10. So gcc puts the 4th param in %rcx, and the move moves it to > %r10 for the kernel. Correct. We use the ABI argument ordering since that is what gcc gave us when calling the stub funtions, but the syscall instruction clobbers %rcx as it enters the kernel. If we were smarter, we'd only do this move if we know the syscall had 4 or more arguments. But unfortunately, we don't have this information when building libc. Or, we'd declare the syscall prototypes with an explicit override of the register parameter assignments or something. (bad luck though if you neglect to use the right #includes for your code and miss out a prototype) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Sun May 16 14:08:05 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 9169716A4CE for ; Sun, 16 May 2004 14:08:05 -0700 (PDT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06C2A43D1D for ; Sun, 16 May 2004 14:08:05 -0700 (PDT) (envelope-from marcov@stack.nl) Received: from toad.stack.nl (zen.stack.nl [IPv6:2001:610:1108:5010::130]) by mailhost.stack.nl (Postfix) with ESMTP id 1EEC31F07C for ; Sun, 16 May 2004 23:08:04 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 816) id F03CC94; Sun, 16 May 2004 23:08:03 +0200 (CEST) In-Reply-To: <200405161316.30635.peter@wemm.org> "from Peter Wemm at May 16, 2004 01:16:30 pm" To: freebsd-amd64@freebsd.org Date: Sun, 16 May 2004 23:08:03 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20040516210803.F03CC94@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) Subject: Re: ABI question, porting ports to amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 21:08:05 -0000 y> > is %r10. So gcc puts the 4th param in %rcx, and the move moves it to > > %r10 for the kernel. > > Correct. We use the ABI argument ordering since that is what gcc gave > us when calling the stub funtions, but the syscall instruction clobbers > %rcx as it enters the kernel. > > If we were smarter, we'd only do this move if we know the syscall had 4 > or more arguments. But unfortunately, we don't have this information > when building libc. > > Or, we'd declare the syscall prototypes with an explicit override of the > register parameter assignments or something. (bad luck though if you > neglect to use the right #includes for your code and miss out a > prototype) I was always curious why the (basic) *nix syscalls weren't inlined? Can't gcc do that? From owner-freebsd-amd64@FreeBSD.ORG Sun May 16 16:07:22 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 B6E6816A4CE for ; Sun, 16 May 2004 16:07:22 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5002243D1D for ; Sun, 16 May 2004 16:07:22 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id D9ECB2A8DD for ; Sun, 16 May 2004 16:07:21 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 4B9D7E29E for ; Sun, 16 May 2004 16:07:21 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i4GN7KPt079213; Sun, 16 May 2004 16:07:20 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i4GN7Kn1079212; Sun, 16 May 2004 16:07:20 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Sun, 16 May 2004 16:07:20 -0700 User-Agent: KMail/1.6.1 References: <20040516210803.F03CC94@toad.stack.nl> In-Reply-To: <20040516210803.F03CC94@toad.stack.nl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405161607.20644.peter@wemm.org> Subject: Re: ABI question, porting ports to amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 23:07:22 -0000 On Sunday 16 May 2004 02:08 pm, Marco van de Voort wrote: > y> > is %r10. So gcc puts the 4th param in %rcx, and the move moves > it to > > > > %r10 for the kernel. > > > > Correct. We use the ABI argument ordering since that is what gcc > > gave us when calling the stub funtions, but the syscall instruction > > clobbers %rcx as it enters the kernel. > > > > If we were smarter, we'd only do this move if we know the syscall > > had 4 or more arguments. But unfortunately, we don't have this > > information when building libc. > > > > Or, we'd declare the syscall prototypes with an explicit override > > of the register parameter assignments or something. (bad luck > > though if you neglect to use the right #includes for your code and > > miss out a prototype) > > I was always curious why the (basic) *nix syscalls weren't inlined? > Can't gcc do that? The errno handling is the sticky point. Error return is indicated by the 'carry' bit set in the flags register. At which point the return value of the syscall is copied to the 'errno' variable and the function returns -1. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Sun May 16 18:36:21 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 D590016A4CE for ; Sun, 16 May 2004 18:36:21 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D96C43D41 for ; Sun, 16 May 2004 18:36:21 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id AFB522A8DA for ; Sun, 16 May 2004 18:36:18 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 38324E29E for ; Sun, 16 May 2004 18:36:18 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i4H1aHa0000908 for ; Sun, 16 May 2004 18:36:17 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i4H1aHQW000907 for amd64@freebsd.org; Sun, 16 May 2004 18:36:17 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: amd64@freebsd.org Date: Sun, 16 May 2004 18:36:17 -0700 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200405161836.17539.peter@wemm.org> Subject: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 01:36:21 -0000 I've committed the support changes and enabled the new module loader, but beware! It does still blow up! Consequently, I did *NOT* remove the 'NO_MODULES' override in GENERIC etc because there are a number of system daemons that will try and load things during startup. If this suddenly started loading modules, it Would Be A Bad Thing. On an unrelated note, I could really use some eyes looking at the sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series of bugs) that is causing significant memory trashing. Yes, it is hairy code, but the kind of thing that is likely to be wrong include: - using the wrong limit for an array. eg: nrel for nrela[] arrays or vice versa. - index scale bugs.. eg: adding or multiplying by sizeof() instead of the indexes. - size scaling bugs. eg: mallocing an array without multiplying by sizeof(). - something really messed up. :-) But, in spite of all this, it does successfully load modules and they do run. The problem is that later on, the system objects to its memory having been trashed in the past. In other words, its quite useless except perhaps for simple load/unload driver tests where the test module is compiled on another machine and fetched over nfs or the like. Also, neither kldxref(8) or preloading modules in loader(8) are implemented yet. Its strictly kldload from the command line for the moment. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 07:54:01 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 3384416A4CE for ; Mon, 17 May 2004 07:54:01 -0700 (PDT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E9E843D2D for ; Mon, 17 May 2004 07:54:00 -0700 (PDT) (envelope-from marcov@stack.nl) Received: from toad.stack.nl (zen.stack.nl [IPv6:2001:610:1108:5010::130]) by mailhost.stack.nl (Postfix) with ESMTP id 94EE41F007 for ; Mon, 17 May 2004 16:53:59 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 816) id 6CE759A; Mon, 17 May 2004 16:53:59 +0200 (CEST) In-Reply-To: <200405161607.20644.peter@wemm.org> "from Peter Wemm at May 16, 2004 04:07:20 pm" To: freebsd-amd64@freebsd.org Date: Mon, 17 May 2004 16:53:59 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20040517145359.6CE759A@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) Subject: Re: ABI question, porting ports to amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 14:54:01 -0000 > > > Or, we'd declare the syscall prototypes with an explicit override > > > of the register parameter assignments or something. (bad luck > > > though if you neglect to use the right #includes for your code and > > > miss out a prototype) > > > > I was always curious why the (basic) *nix syscalls weren't inlined? > > Can't gcc do that? > > The errno handling is the sticky point. Error return is indicated by > the 'carry' bit set in the flags register. At which point the return > value of the syscall is copied to the 'errno' variable and the function > returns -1. Hmm, but the x86-64 can surely branch further than the size of procedure? int bla() { ... ... syscall jb .bla_cerror .. .. } .bla_cerror: jmp .cerror ? From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 11:01:37 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 3FAC216A4CF for ; Mon, 17 May 2004 11:01:37 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 191F643D3F for ; Mon, 17 May 2004 11:01:37 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i4HI1aPi097557 for ; Mon, 17 May 2004 11:01:36 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4HI1anA097550 for freebsd-amd64@freebsd.org; Mon, 17 May 2004 11:01:36 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 17 May 2004 11:01:36 -0700 (PDT) Message-Id: <200405171801.i4HI1anA097550@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-amd64@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 18:01:37 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/11/26] amd64/59713 amd64 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 0420116A4CE; Mon, 17 May 2004 14:31:04 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA1FA43D4C; Mon, 17 May 2004 14:31:03 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id A64258826; Mon, 17 May 2004 14:31:03 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Mon, 17 May 2004 14:31:03 -0700 User-Agent: KMail/1.6.1 References: <200405161836.17539.peter@wemm.org> In-Reply-To: <200405161836.17539.peter@wemm.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405171431.03384.peter@wemm.org> cc: amd64@freebsd.org Subject: Re: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 21:31:04 -0000 On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > I've committed the support changes and enabled the new module loader, > but beware! It does still blow up! Consequently, I did *NOT* remove > the 'NO_MODULES' override in GENERIC etc because there are a number > of system daemons that will try and load things during startup. If > this suddenly started loading modules, it Would Be A Bad Thing. > > On an unrelated note, I could really use some eyes looking at the > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series > of bugs) that is causing significant memory trashing. Turns out that there were multiple bugs, some in my code (which I fixed as a side effect of something else), and the big one was in the kernel linker itself (not my bug! :-). Anyway, the guts of kldload(8) support is there now. Now for kldxref(8) and loader(8). Whee. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 14:31:04 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 0420116A4CE; Mon, 17 May 2004 14:31:04 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA1FA43D4C; Mon, 17 May 2004 14:31:03 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id A64258826; Mon, 17 May 2004 14:31:03 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Mon, 17 May 2004 14:31:03 -0700 User-Agent: KMail/1.6.1 References: <200405161836.17539.peter@wemm.org> In-Reply-To: <200405161836.17539.peter@wemm.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405171431.03384.peter@wemm.org> cc: amd64@freebsd.org Subject: Re: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 21:31:04 -0000 On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > I've committed the support changes and enabled the new module loader, > but beware! It does still blow up! Consequently, I did *NOT* remove > the 'NO_MODULES' override in GENERIC etc because there are a number > of system daemons that will try and load things during startup. If > this suddenly started loading modules, it Would Be A Bad Thing. > > On an unrelated note, I could really use some eyes looking at the > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series > of bugs) that is causing significant memory trashing. Turns out that there were multiple bugs, some in my code (which I fixed as a side effect of something else), and the big one was in the kernel linker itself (not my bug! :-). Anyway, the guts of kldload(8) support is there now. Now for kldxref(8) and loader(8). Whee. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 15:37:40 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 A6E3D16A4CE for ; Mon, 17 May 2004 15:37:40 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F01143D55 for ; Mon, 17 May 2004 15:37:40 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id 3A73E8826; Mon, 17 May 2004 15:37:40 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Mon, 17 May 2004 15:37:39 -0700 User-Agent: KMail/1.6.1 References: <200405161836.17539.peter@wemm.org> <200405171431.03384.peter@wemm.org> In-Reply-To: <200405171431.03384.peter@wemm.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405171537.39965.peter@wemm.org> Subject: HEADS UP: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 22:37:40 -0000 On Monday 17 May 2004 02:31 pm, Peter Wemm wrote: > On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > > I've committed the support changes and enabled the new module > > loader, but beware! It does still blow up! Consequently, I did > > *NOT* remove the 'NO_MODULES' override in GENERIC etc because there > > are a number of system daemons that will try and load things during > > startup. If this suddenly started loading modules, it Would Be A > > Bad Thing. > > > > On an unrelated note, I could really use some eyes looking at the > > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series > > of bugs) that is causing significant memory trashing. > > Turns out that there were multiple bugs, some in my code (which I > fixed as a side effect of something else), and the big one was in the > kernel linker itself (not my bug! :-). > > Anyway, the guts of kldload(8) support is there now. Now for > kldxref(8) and loader(8). Whee. Beware, I've turned modules on for GENERIC and NOTES. I've tested a couple of things including: usb, ums (for dependency test on usb), vinum, md and a dummy test module. oops. Footnote. sound just blew up for me. Anyway, I've left it all turned on for the moment. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 22:45:51 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 53CCE16A4E7 for ; Mon, 17 May 2004 22:45:49 -0700 (PDT) Received: from plewe.is.tsukuba.ac.jp (plewe.is.tsukuba.ac.jp [130.158.81.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3A9D43D39 for ; Mon, 17 May 2004 22:45:46 -0700 (PDT) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: from plewe.is.tsukuba.ac.jp (localhost [127.0.0.1]) i4I5oVrv075852 for ; Tue, 18 May 2004 14:50:31 +0900 (JST) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: (from till@localhost) by plewe.is.tsukuba.ac.jp (8.12.11/8.12.11/Submit) id i4I5oVJF075851 for freebsd-amd64@freebsd.org; Tue, 18 May 2004 14:50:31 +0900 (JST) (envelope-from till) Date: Tue, 18 May 2004 14:50:31 +0900 From: Till Plewe To: freebsd-amd64@freebsd.org Message-ID: <20040518055031.GA75775%till@score.is.tsukuba.ac.jp> References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> User-Agent: Mutt/1.5.6i Subject: Re: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: till@score.is.tsukuba.ac.jp List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 05:45:51 -0000 On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > The program "int main(){return 0;}" fails to compile if I use the > option "-pg". The error message I get starts with: > > # gcc -pg -o test test.c > /var/tmp//ccTPXtQI.o: In function `main': > /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' > /usr/lib/libc_p.a(gmon.po): In function `monstartup': > gmon.po(.text+0xa): undefined reference to `mcount > ... > > I am using 5.2-CURRENT cvsuped 3 hours ago. > > It looks like a gcc bug since there are several related bug reports > for other OSs (the once I looked were all for 64bit architectures). > > Does anybody know how to fix this? > > TIA > > - Till > It seems that gprof is not build any longer by default. "/usr/src/usr.bin/gprof" does not contain the files amd64.{c,h} needed to build gprof. Since the files for the other architectures seem to be essentially the same I just used copies of these to build gprof. But since I cannot produce *.gmon files as long as gcc -pg does not work I cannot check if the resulting binary works or not. Are there amd64 specific problems with gprof or is gprof being replaced by some other profiler? - Till From owner-freebsd-amd64@FreeBSD.ORG Mon May 17 22:53:04 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 5A5F716A4CF for ; Mon, 17 May 2004 22:53:04 -0700 (PDT) Received: from plewe.is.tsukuba.ac.jp (plewe.is.tsukuba.ac.jp [130.158.81.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA3143D5A for ; Mon, 17 May 2004 22:53:02 -0700 (PDT) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: from plewe.is.tsukuba.ac.jp (localhost [127.0.0.1]) i4I54Lau075728 for ; Tue, 18 May 2004 14:04:21 +0900 (JST) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: (from till@localhost) by plewe.is.tsukuba.ac.jp (8.12.11/8.12.11/Submit) id i4I54Le8075727 for freebsd-amd64@freebsd.org; Tue, 18 May 2004 14:04:21 +0900 (JST) (envelope-from till) Date: Tue, 18 May 2004 14:04:21 +0900 From: Till Plewe To: freebsd-amd64@freebsd.org Message-ID: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: till@score.is.tsukuba.ac.jp List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 05:53:04 -0000 The program "int main(){return 0;}" fails to compile if I use the option "-pg". The error message I get starts with: # gcc -pg -o test test.c /var/tmp//ccTPXtQI.o: In function `main': /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' /usr/lib/libc_p.a(gmon.po): In function `monstartup': gmon.po(.text+0xa): undefined reference to `mcount ... I am using 5.2-CURRENT cvsuped 3 hours ago. It looks like a gcc bug since there are several related bug reports for other OSs (the once I looked were all for 64bit architectures). Does anybody know how to fix this? TIA - Till From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 00:29:18 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 5F39516A4CE for ; Tue, 18 May 2004 00:29:18 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8054B43D5F for ; Tue, 18 May 2004 00:28:58 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (210.50.200.186) by smtp01.syd.iprimus.net.au (7.0.024) id 409956B4003E6909; Tue, 18 May 2004 17:28:56 +1000 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id B05F441E5; Tue, 18 May 2004 17:04:30 +1000 (EST) Date: Tue, 18 May 2004 17:04:30 +1000 From: Tim Robbins To: Till Plewe Message-ID: <20040518070430.GA68449@cat.robbins.dropbear.id.au> References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> User-Agent: Mutt/1.4.1i cc: freebsd-amd64@freebsd.org Subject: Re: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 07:29:18 -0000 On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > The program "int main(){return 0;}" fails to compile if I use the > option "-pg". The error message I get starts with: > > # gcc -pg -o test test.c > /var/tmp//ccTPXtQI.o: In function `main': > /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' > /usr/lib/libc_p.a(gmon.po): In function `monstartup': > gmon.po(.text+0xa): undefined reference to `mcount > ... This is a bug in the FreeBSD/x86-64 GCC configuration. It should be calling ``.mcount'' instead of ``mcount'' (note the full-stop at the start of the name.) After applying this patch, rebuilding gcc, and rebuilding the profiled C library, gcc -pg does not cause linker errors: ==== //depot/user/tjr/freebsd-tjr/src/contrib/gcc/config/i386/freebsd64.h#5 - /home/tim/p4/src/contrib/gcc/config/i386/freebsd64.h ==== @@ -25,6 +25,9 @@ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); +#undef MCOUNT_NAME +#define MCOUNT_NAME ".mcount" + #undef FBSD_TARGET_CPU_CPP_BUILTINS #define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ However, programs compiled with -pg will crash almost immediately. I don't understand why this happens well enough to venture an explanation, but I think both GCC and FreeBSD/amd64's header are at fault here. Tim From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 01:29:15 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 3255D16A4CF; Tue, 18 May 2004 01:29:15 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7483543D48; Tue, 18 May 2004 01:29:13 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4I8Pj67063896; Tue, 18 May 2004 10:25:45 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0ac901c43cb1$c9ba6350$471b3dd4@dual> From: "Willem Jan Withagen" To: Date: Tue, 18 May 2004 10:26:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: freebsd-ports@freebsd.org Subject: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 08:29:15 -0000 Hi, Was there any particular reason why the vesa is not included in the ISO 5.2.1 CD package.... I have an ATI radeon 9600 video card, and that driver seems to be the only one I can get X to work with on amd64.... Next to the fact that configuration of it, is horribly simple. And thus would be a good target to get people quick online with a simple XConfig. I compiled the XFree86-4-Server port, and took the vesa driver out. And uptill now it has worked flawlessly. Now the radeon driver claims to know only other versions of the chip. Any tweak to get it to accept my card anyways???? none2@pci1:0:0: class=0x030000 card=0x200217ee chip=0x41501002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies' class = display subclass = VGA none3@pci1:0:1: class=0x038000 card=0x200317ee chip=0x41701002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies' class = display --WjW From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 09:46:42 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 C22FD16A4CE for ; Tue, 18 May 2004 09:46:42 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id C41E943D41 for ; Tue, 18 May 2004 09:46:40 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id 912762A7EA for ; Tue, 18 May 2004 09:46:40 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 1B234E29E for ; Tue, 18 May 2004 09:46:40 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i4IGkdQw012995; Tue, 18 May 2004 09:46:39 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i4IGkc9w012994; Tue, 18 May 2004 09:46:38 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Tue, 18 May 2004 09:46:38 -0700 User-Agent: KMail/1.6.1 References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> <20040518070430.GA68449@cat.robbins.dropbear.id.au> In-Reply-To: <20040518070430.GA68449@cat.robbins.dropbear.id.au> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405180946.38351.peter@wemm.org> cc: Tim Robbins cc: Till Plewe Subject: Re: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 16:46:42 -0000 On Tuesday 18 May 2004 12:04 am, Tim Robbins wrote: > On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > The program "int main(){return 0;}" fails to compile if I use the > > option "-pg". The error message I get starts with: > > > > # gcc -pg -o test test.c > > /var/tmp//ccTPXtQI.o: In function `main': > > /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' > > /usr/lib/libc_p.a(gmon.po): In function `monstartup': > > gmon.po(.text+0xa): undefined reference to `mcount > > ... > > This is a bug in the FreeBSD/x86-64 GCC configuration. It should be > calling ``.mcount'' instead of ``mcount'' (note the full-stop at > the start of the name.) After applying this patch, rebuilding gcc, > and rebuilding the profiled C library, gcc -pg does not cause > linker errors: > > ==== > //depot/user/tjr/freebsd-tjr/src/contrib/gcc/config/i386/freebsd64.h# >5 - /home/tim/p4/src/contrib/gcc/config/i386/freebsd64.h ==== @@ -25,6 > +25,9 @@ > #undef TARGET_VERSION > #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); > > +#undef MCOUNT_NAME > +#define MCOUNT_NAME ".mcount" > + > #undef FBSD_TARGET_CPU_CPP_BUILTINS > #define FBSD_TARGET_CPU_CPP_BUILTINS() \ > do \ > > > However, programs compiled with -pg will crash almost immediately. > I don't understand why this happens well enough to venture > an explanation, but I think both GCC and FreeBSD/amd64's > header are at fault here. Yes, profiling wasn't something on my radar at the time so I mostly ignored it while doing the early porting work. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 09:53:49 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 9E04E16A4CE; Tue, 18 May 2004 09:53:49 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73C0E43D1D; Tue, 18 May 2004 09:53:33 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id E38832A8DA; Tue, 18 May 2004 09:53:32 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 4AE2EE29E; Tue, 18 May 2004 09:53:32 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i4IGrVNr013032; Tue, 18 May 2004 09:53:31 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i4IGrVqe013031; Tue, 18 May 2004 09:53:31 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Tue, 18 May 2004 09:53:31 -0700 User-Agent: KMail/1.6.1 References: <0ac901c43cb1$c9ba6350$471b3dd4@dual> In-Reply-To: <0ac901c43cb1$c9ba6350$471b3dd4@dual> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405180953.31412.peter@wemm.org> cc: freebsd-ports@freebsd.org Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 16:53:49 -0000 On Tuesday 18 May 2004 01:26 am, Willem Jan Withagen wrote: > Hi, > > Was there any particular reason why the vesa is not included in the > ISO 5.2.1 CD package.... The vesa module uses vm86 or bios calls from the kernel. Those are not possible in a 64 bit kernel. > I have an ATI radeon 9600 video card, and that driver seems to be > the only one I can get X to work with on amd64.... > Next to the fact that configuration of it, is horribly simple. > And thus would be a good target to get people quick online with a > simple XConfig. I had to use a newer XFree86 that had updated drivers for my radeon 7000. It wasn't pretty, to say the least. I currently run this at home: vendor string: The XFree86 Project, Inc vendor release number: 40400000 XFree86 version: 4.4.0 But.. I had to do unspeakable things to it to make it compile. The XFree86 folks really truely screwed things up. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 11:34:29 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 C5B3F16A4CE; Tue, 18 May 2004 11:34:29 -0700 (PDT) Received: from shaft.techsupport.co.uk (shaft.techsupport.co.uk [212.250.77.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C27443E9D; Tue, 18 May 2004 11:10:45 -0700 (PDT) (envelope-from setantae@submonkey.net) Received: from cpc2-cdif3-6-0-cust204.cdif.cable.ntl.com ([81.103.67.204] helo=shrike.submonkey.net ident=mailnull) by shaft.techsupport.co.uk with esmtp (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.34; FreeBSD) id 1BQ925-0002AP-Kr; Tue, 18 May 2004 19:09:41 +0100 Received: from setantae by shrike.submonkey.net with local (Exim 4.34; FreeBSD) id 1BQ923-000Oc3-BC; Tue, 18 May 2004 19:09:39 +0100 Date: Tue, 18 May 2004 19:09:39 +0100 From: Ceri Davies To: Peter Wemm Message-ID: <20040518180939.GP1518@submonkey.net> Mail-Followup-To: Ceri Davies , Peter Wemm , freebsd-amd64@freebsd.org, amd64@freebsd.org References: <200405161836.17539.peter@wemm.org> <200405171431.03384.peter@wemm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="keoAwTxaagou87Dg" Content-Disposition: inline In-Reply-To: <200405171431.03384.peter@wemm.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.4i Sender: Ceri Davies cc: amd64@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 18:34:29 -0000 --keoAwTxaagou87Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 17, 2004 at 02:31:03PM -0700, Peter Wemm wrote: > On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > > I've committed the support changes and enabled the new module loader, > > but beware! It does still blow up! Consequently, I did *NOT* remove > > the 'NO_MODULES' override in GENERIC etc because there are a number > > of system daemons that will try and load things during startup. If > > this suddenly started loading modules, it Would Be A Bad Thing. > > > > On an unrelated note, I could really use some eyes looking at the > > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series > > of bugs) that is causing significant memory trashing.=20 >=20 > Turns out that there were multiple bugs, some in my code (which I fixed= =20 > as a side effect of something else), and the big one was in the kernel=20 > linker itself (not my bug! :-). >=20 > Anyway, the guts of kldload(8) support is there now. Now for kldxref(8)= =20 > and loader(8). Whee. Great news - thanks Peter. Ceri --=20 The hiatus is back off, again. --keoAwTxaagou87Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqlFjocfcwTS3JF8RAgd6AKCUbJ1g9wwt80uT3mIGrSmmcvKjbgCdHgY0 G/BZG1pmp9MZWZQ1RBeIdPQ= =+ho+ -----END PGP SIGNATURE----- --keoAwTxaagou87Dg-- From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 11:34:29 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 C5B3F16A4CE; Tue, 18 May 2004 11:34:29 -0700 (PDT) Received: from shaft.techsupport.co.uk (shaft.techsupport.co.uk [212.250.77.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C27443E9D; Tue, 18 May 2004 11:10:45 -0700 (PDT) (envelope-from setantae@submonkey.net) Received: from cpc2-cdif3-6-0-cust204.cdif.cable.ntl.com ([81.103.67.204] helo=shrike.submonkey.net ident=mailnull) by shaft.techsupport.co.uk with esmtp (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.34; FreeBSD) id 1BQ925-0002AP-Kr; Tue, 18 May 2004 19:09:41 +0100 Received: from setantae by shrike.submonkey.net with local (Exim 4.34; FreeBSD) id 1BQ923-000Oc3-BC; Tue, 18 May 2004 19:09:39 +0100 Date: Tue, 18 May 2004 19:09:39 +0100 From: Ceri Davies To: Peter Wemm Message-ID: <20040518180939.GP1518@submonkey.net> Mail-Followup-To: Ceri Davies , Peter Wemm , freebsd-amd64@freebsd.org, amd64@freebsd.org References: <200405161836.17539.peter@wemm.org> <200405171431.03384.peter@wemm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="keoAwTxaagou87Dg" Content-Disposition: inline In-Reply-To: <200405171431.03384.peter@wemm.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.4i Sender: Ceri Davies cc: amd64@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 18:34:29 -0000 --keoAwTxaagou87Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 17, 2004 at 02:31:03PM -0700, Peter Wemm wrote: > On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > > I've committed the support changes and enabled the new module loader, > > but beware! It does still blow up! Consequently, I did *NOT* remove > > the 'NO_MODULES' override in GENERIC etc because there are a number > > of system daemons that will try and load things during startup. If > > this suddenly started loading modules, it Would Be A Bad Thing. > > > > On an unrelated note, I could really use some eyes looking at the > > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a series > > of bugs) that is causing significant memory trashing.=20 >=20 > Turns out that there were multiple bugs, some in my code (which I fixed= =20 > as a side effect of something else), and the big one was in the kernel=20 > linker itself (not my bug! :-). >=20 > Anyway, the guts of kldload(8) support is there now. Now for kldxref(8)= =20 > and loader(8). Whee. Great news - thanks Peter. Ceri --=20 The hiatus is back off, again. --keoAwTxaagou87Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAqlFjocfcwTS3JF8RAgd6AKCUbJ1g9wwt80uT3mIGrSmmcvKjbgCdHgY0 G/BZG1pmp9MZWZQ1RBeIdPQ= =+ho+ -----END PGP SIGNATURE----- --keoAwTxaagou87Dg-- From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 12:40:08 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 CFD6116A4CE for ; Tue, 18 May 2004 12:40:08 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E797743D7D for ; Tue, 18 May 2004 10:36:31 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 9688 invoked by uid 89); 18 May 2004 17:40:21 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 18 May 2004 17:40:21 -0000 Message-Id: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 10:36:12 -0700 To: freebsd-amd64@freebsd.org From: JG Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 19:40:09 -0000 Well, I've finally got some initial benchmarks here... I plan to do many more and encourage anyone who wants to see FreeBSD perform better in these benchmarks to give me tips or suggestions to help boost performance. The benchmarks were done from a remote server on the LAN, using myBench. Unfortunately, myBench doesn't seem to simulate actual real-world user loads. Super-smack does, but I ran into problems compiling it, and then more when trying to use it remotely. Super-smack-1.3 is supposed to be coming out soon, hopefully it will fix some of these problems. Anyway, on with the benchmark results... TESTING HARDWARE: Dual AMD Opteron 240's (1.4ghz) Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. 2 gigs PC-2700 registered ECC memory Seagate barracuda ATA 100 system drive RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. BENCHMARK SUMMARIES: (I ran the benchmark 5 times for each OS config, highest overall results are listed below) ----------------------------------------------------------------------------- For: LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux Benchmark results: Generating 500000 records... Creation of 500000 records took 89 seconds. Average of 5617.9775280899 records per second. Creating records for 10 seconds... Created 50547 records in 10 seconds. Average of 5054.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 9 seconds. Average of 5555.5555555556 records per second. Creating random md5 hash records for 10 seconds... Created 50864 random records in 10 seconds. Average of 5086.4 records per second. Your databases overall average score is 5328.6582709114 records per second ----------------------------------------------------------------------------- For: FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 using kernel compiled with SCHED_ULE MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: mysql-server-4.1.1_2) MySQL Statically compiled with libc_r Benchmark results: Generating 500000 records... Creation of 500000 records took 155 seconds. Average of 3225.8064516129 records per second. Creating records for 10 seconds... Created 29121 records in 10 seconds. Average of 2912.1 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 15 seconds. Average of 3333.3333333333 records per second. Creating random md5 hash records for 10 seconds... Created 33121 random records in 10 seconds. Average of 3312.1 records per second. Your databases overall average score is 3195.8349462366 records per second. ----------------------------------------------------------------------------- For: FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 using SCHED_4BSD MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: mysql-server-4.1.1_2) MySQL Statically compiled with libc_r Benchmark results: Generating 500000 records... Creation of 500000 records took 164 seconds. Average of 3048.7804878049 records per second. Creating records for 10 seconds... Created 33220 records in 10 seconds. Average of 3322 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 14 seconds. Average of 3571.4285714286 records per second. Creating random md5 hash records for 10 seconds... Created 26428 random records in 10 seconds. Average of 2642.8 records per second. Your databases overall average score is 3146.2522648084 records per second. ----------------------------------------------------------------------------- And I think those Linux results could probably go up more with tweaking figuring that was "stock". So any suggestions on how to improve performance on FreeBSD/AMD64? From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 12:41:57 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 DD8FD16A4CE for ; Tue, 18 May 2004 12:41:56 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E82E743E5D for ; Tue, 18 May 2004 10:57:38 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 9688 invoked by uid 89); 18 May 2004 17:40:21 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 18 May 2004 17:40:21 -0000 Message-Id: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 10:36:12 -0700 To: freebsd-amd64@freebsd.org From: JG Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 19:41:57 -0000 Well, I've finally got some initial benchmarks here... I plan to do many more and encourage anyone who wants to see FreeBSD perform better in these benchmarks to give me tips or suggestions to help boost performance. The benchmarks were done from a remote server on the LAN, using myBench. Unfortunately, myBench doesn't seem to simulate actual real-world user loads. Super-smack does, but I ran into problems compiling it, and then more when trying to use it remotely. Super-smack-1.3 is supposed to be coming out soon, hopefully it will fix some of these problems. Anyway, on with the benchmark results... TESTING HARDWARE: Dual AMD Opteron 240's (1.4ghz) Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. 2 gigs PC-2700 registered ECC memory Seagate barracuda ATA 100 system drive RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. BENCHMARK SUMMARIES: (I ran the benchmark 5 times for each OS config, highest overall results are listed below) ----------------------------------------------------------------------------- For: LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux Benchmark results: Generating 500000 records... Creation of 500000 records took 89 seconds. Average of 5617.9775280899 records per second. Creating records for 10 seconds... Created 50547 records in 10 seconds. Average of 5054.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 9 seconds. Average of 5555.5555555556 records per second. Creating random md5 hash records for 10 seconds... Created 50864 random records in 10 seconds. Average of 5086.4 records per second. Your databases overall average score is 5328.6582709114 records per second ----------------------------------------------------------------------------- For: FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 using kernel compiled with SCHED_ULE MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: mysql-server-4.1.1_2) MySQL Statically compiled with libc_r Benchmark results: Generating 500000 records... Creation of 500000 records took 155 seconds. Average of 3225.8064516129 records per second. Creating records for 10 seconds... Created 29121 records in 10 seconds. Average of 2912.1 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 15 seconds. Average of 3333.3333333333 records per second. Creating random md5 hash records for 10 seconds... Created 33121 random records in 10 seconds. Average of 3312.1 records per second. Your databases overall average score is 3195.8349462366 records per second. ----------------------------------------------------------------------------- For: FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 using SCHED_4BSD MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: mysql-server-4.1.1_2) MySQL Statically compiled with libc_r Benchmark results: Generating 500000 records... Creation of 500000 records took 164 seconds. Average of 3048.7804878049 records per second. Creating records for 10 seconds... Created 33220 records in 10 seconds. Average of 3322 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 14 seconds. Average of 3571.4285714286 records per second. Creating random md5 hash records for 10 seconds... Created 26428 random records in 10 seconds. Average of 2642.8 records per second. Your databases overall average score is 3146.2522648084 records per second. ----------------------------------------------------------------------------- And I think those Linux results could probably go up more with tweaking figuring that was "stock". So any suggestions on how to improve performance on FreeBSD/AMD64? From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 13:00:15 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 0E8A716A4D0 for ; Tue, 18 May 2004 13:00:15 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 668B543FD8 for ; Tue, 18 May 2004 12:32:19 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id E0B798826; Tue, 18 May 2004 12:08:40 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Tue, 18 May 2004 12:08:40 -0700 User-Agent: KMail/1.6.1 References: <200405161836.17539.peter@wemm.org> <200405171431.03384.peter@wemm.org> <200405171537.39965.peter@wemm.org> In-Reply-To: <200405171537.39965.peter@wemm.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405181208.40558.peter@wemm.org> Subject: Re: HEADS UP: Beware of dragons in module loader code! X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 20:00:15 -0000 On Monday 17 May 2004 03:37 pm, Peter Wemm wrote: > On Monday 17 May 2004 02:31 pm, Peter Wemm wrote: > > On Sunday 16 May 2004 06:36 pm, Peter Wemm wrote: > > > I've committed the support changes and enabled the new module > > > loader, but beware! It does still blow up! Consequently, I did > > > *NOT* remove the 'NO_MODULES' override in GENERIC etc because > > > there are a number of system daemons that will try and load > > > things during startup. If this suddenly started loading modules, > > > it Would Be A Bad Thing. > > > > > > On an unrelated note, I could really use some eyes looking at the > > > sys/kern/link_elf_obj.c file. Somewhere, I have a bug (or a > > > series of bugs) that is causing significant memory trashing. > > > > Turns out that there were multiple bugs, some in my code (which I > > fixed as a side effect of something else), and the big one was in > > the kernel linker itself (not my bug! :-). > > > > Anyway, the guts of kldload(8) support is there now. Now for > > kldxref(8) and loader(8). Whee. > > Beware, I've turned modules on for GENERIC and NOTES. I've tested a > couple of things including: usb, ums (for dependency test on usb), > vinum, md and a dummy test module. > > oops. Footnote. sound just blew up for me. Anyway, I've left it all > turned on for the moment. I believe this last gotcha! is fixed now too. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 15:32:41 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 31F8F16A4CE; Tue, 18 May 2004 15:32:41 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9308043D5A; Tue, 18 May 2004 12:59:53 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4IJsA67074222; Tue, 18 May 2004 21:54:11 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0c2701c43d11$f3013ee0$471b3dd4@dual> From: "Willem Jan Withagen" To: "Peter Wemm" , References: <0ac901c43cb1$c9ba6350$471b3dd4@dual> <200405180953.31412.peter@wemm.org> Date: Tue, 18 May 2004 21:54:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: freebsd-ports@freebsd.org Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 22:32:41 -0000 ----- Original Message ----- From: "Peter Wemm" > > Was there any particular reason why the vesa is not included in the > > ISO 5.2.1 CD package.... > > The vesa module uses vm86 or bios calls from the kernel. Those are not > possible in a 64 bit kernel. I hate to agrue with you because you seem te be much more knowledgable on this than I am, BUT ....... I did not know this and just compiled vesa..... installed it. And this is currently running... xvidtune "complains" that there is nothing to tune. So I guess it must be running vesa?? How did this get to work then? And yes, I am running amd64 in 64 bit mode... hw.machine: amd64 hw.model: AMD Opteron(tm) Processor 242 hw.ncpu: 2 XFree86 Version 4.3.0 Release Date: 27 February 2003 X Protocol Version 11, Revision 0, Release 6.6 Build Operating System: FreeBSD 5.2 amd64 [ELF] Build Date: 17 May 2004 .... (II) VESA: driver for VESA chipsets: vesa (II) Primary Device is: PCI 01:00:0 (--) Chipset vesa found .... (II) VESA(0): initializing int10 (==) VESA(0): Write-combining range (0xa0000,0x20000) was already clear (==) VESA(0): Write-combining range (0xc0000,0x40000) was already clear (II) VESA(0): Primary V_BIOS segment is: 0xc000 (==) VESA(0): Write-combining range (0x0,0x1000) was already clear (II) VESA(0): VESA BIOS detected (II) VESA(0): VESA VBE Version 2.0 (II) VESA(0): VESA VBE Total Mem: 131072 kB (II) VESA(0): VESA VBE OEM: ATI RADEON 9600 PRO (II) VESA(0): VESA VBE OEM Software Rev: 1.0 (II) VESA(0): VESA VBE OEM Vendor: ATI Technologies Inc. (II) VESA(0): VESA VBE OEM Product: V350 (II) VESA(0): VESA VBE OEM Product Rev: 01.00 (==) VESA(0): Depth 16, (--) framebuffer bpp 16 (==) VESA(0): RGB weight 565 (==) VESA(0): Default visual is TrueColor (==) VESA(0): Using gamma correction (1.0, 1.0, 1.0) ..... (II) LoadModule: "ddc" (II) Loading /usr/X11R6/lib/modules/libddc.a (II) Module ddc: vendor="The XFree86 Project" compiled for 4.3.0, module version = 1.0.0 ABI class: XFree86 Video Driver, version 0.6 (II) VESA(0): VESA VBE DDC supported (II) VESA(0): VESA VBE DDC Level 2 (II) VESA(0): VESA VBE DDC transfer in appr. 2 sec. (II) VESA(0): VESA VBE DDC read successfully (II) VESA(0): Manufacturer: PHL Model: 801 Serial#: 109398 (II) VESA(0): Year: 2001 Week: 14 (II) VESA(0): EDID Version: 1.3 (II) VESA(0): Digital Display Input (II) VESA(0): Max H-Image Size [cm]: horiz.: 34 vert.: 27 (II) VESA(0): Gamma: 2.10 (II) VESA(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display ..... And it goes on forever and forever, listing just about any vesa mode ever invented by mankind Looks pretty complete to me?? > > I have an ATI radeon 9600 video card, and that driver seems to be > > the only one I can get X to work with on amd64.... > > Next to the fact that configuration of it, is horribly simple. > > And thus would be a good target to get people quick online with a > > simple XConfig. > > I had to use a newer XFree86 that had updated drivers for my radeon > 7000. It wasn't pretty, to say the least. > > I currently run this at home: > vendor string: The XFree86 Project, Inc > vendor release number: 40400000 > XFree86 version: 4.4.0 > > But.. I had to do unspeakable things to it to make it compile. The > XFree86 folks really truely screwed things up. Well I'm trying to get a old 32-bit set of compiler tools on line on amd64. Gives me the same sort of feeling..... I tried using the Server-snap port, but i claims it does not compile on amd64 .... --WjW From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:12:08 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 B640C16A4DB for ; Tue, 18 May 2004 16:12:07 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id C487643DCD for ; Tue, 18 May 2004 15:36:04 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4IJsNs0023764; Tue, 18 May 2004 12:54:23 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4IJsNYf023763; Tue, 18 May 2004 12:54:23 -0700 Date: Tue, 18 May 2004 12:54:23 -0700 From: Brooks Davis To: JG Message-ID: <20040518195423.GA23164@Odin.AC.HMC.Edu> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> User-Agent: Mutt/1.5.4i 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:12:09 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2004 at 10:36:12AM -0700, JG wrote: >=20 > Well, I've finally got some initial benchmarks here... >=20 > I plan to do many more and encourage anyone who wants to see FreeBSD=20 > perform better > in these benchmarks to give me tips or suggestions to help boost=20 > performance. >=20 > The benchmarks were done from a remote server on the LAN, using myBench. > Unfortunately, myBench doesn't seem to simulate actual real-world user=20 > loads. > Super-smack does, but I ran into problems compiling it, and then more whe= n=20 > trying > to use it remotely. Super-smack-1.3 is supposed to be coming out soon,=20 > hopefully > it will fix some of these problems. >=20 > Anyway, on with the benchmark results... >=20 >=20 > TESTING HARDWARE: >=20 > Dual AMD Opteron 240's (1.4ghz) > Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. > 2 gigs PC-2700 registered ECC memory > Seagate barracuda ATA 100 system drive > RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. >=20 >=20 > BENCHMARK SUMMARIES: >=20 > (I ran the benchmark 5 times for each OS config, highest overall results= =20 > are listed below) >=20 > -------------------------------------------------------------------------= ---- > For: >=20 > LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation > MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) > Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64=20 > unknown unknown GNU/Linux >=20 > Benchmark results: >=20 > Generating 500000 records... > Creation of 500000 records took 89 seconds. > Average of 5617.9775280899 records per second. > Creating records for 10 seconds... > Created 50547 records in 10 seconds. > Average of 5054.7 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 9 seconds. > Average of 5555.5555555556 records per second. > Creating random md5 hash records for 10 seconds... > Created 50864 random records in 10 seconds. > Average of 5086.4 records per second. >=20 > Your databases overall average score is 5328.6582709114 records per second > -------------------------------------------------------------------------= ---- >=20 > For: >=20 > FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 > using kernel compiled with SCHED_ULE > MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port:=20 > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r >=20 > Benchmark results: >=20 > Generating 500000 records... > Creation of 500000 records took 155 seconds. > Average of 3225.8064516129 records per second. > Creating records for 10 seconds... > Created 29121 records in 10 seconds. > Average of 2912.1 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 15 seconds. > Average of 3333.3333333333 records per second. > Creating random md5 hash records for 10 seconds... > Created 33121 random records in 10 seconds. > Average of 3312.1 records per second. >=20 > Your databases overall average score is 3195.8349462366 records per secon= d. >=20 > -------------------------------------------------------------------------= ---- >=20 > For: >=20 > FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 > using SCHED_4BSD > MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port:=20 > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r >=20 > Benchmark results: >=20 > Generating 500000 records... > Creation of 500000 records took 164 seconds. > Average of 3048.7804878049 records per second. > Creating records for 10 seconds... > Created 33220 records in 10 seconds. > Average of 3322 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 14 seconds. > Average of 3571.4285714286 records per second. > Creating random md5 hash records for 10 seconds... > Created 26428 random records in 10 seconds. > Average of 2642.8 records per second. >=20 > Your databases overall average score is 3146.2522648084 records per secon= d. >=20 > -------------------------------------------------------------------------= ---- >=20 > And I think those Linux results could probably go up more with tweaking= =20 > figuring that was "stock". >=20 >=20 >=20 > So any suggestions on how to improve performance on FreeBSD/AMD64? The obvious place to start would be to use ANY threading libarary other then libc_r. Any of libpthread, libthr, or linuxthreads should yeild significantly better performance. You may need to upgrade to -CURRENT for those to work though. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAqmnuXY6L6fI4GtQRAloAAJ4t9YIqX//sIfndn/xN027z1bPs4ACfX3zq OAY0IvwqDzOcNs8lpApQG2U= =+pVI -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy-- From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:12:29 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 4BDF716A4DA for ; Tue, 18 May 2004 16:12:21 -0700 (PDT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57F9743EB7 for ; Tue, 18 May 2004 13:11:35 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 14902 invoked from network); 18 May 2004 20:09:17 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 18 May 2004 20:09:17 -0000 Received: from hydrogen.funkthat.com (iforgf@localhost.funkthat.com [127.0.0.1])i4IK9GEx037962; Tue, 18 May 2004 13:09:17 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i4IK9FAU037961; Tue, 18 May 2004 13:09:15 -0700 (PDT) Date: Tue, 18 May 2004 13:09:15 -0700 From: John-Mark Gurney To: JG Message-ID: <20040518200915.GR601@funkthat.com> Mail-Followup-To: JG , freebsd-amd64@freebsd.org References: <5.2.0.9.2.20040518103357.04c6cbb8@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.20040518103357.04c6cbb8@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: Tue, 18 May 2004 23:12:37 -0000 JG wrote this message on Tue, May 18, 2004 at 10:36 -0700: [...] > MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) > Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 [...] > Your databases overall average score is 5328.6582709114 records per second > ----------------------------------------------------------------------------- > > For: > > FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 > using kernel compiled with SCHED_ULE > MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r [...] > Your databases overall average score is 3195.8349462366 records per second. > > ----------------------------------------------------------------------------- > > For: > > FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 > using SCHED_4BSD > MySQL Ver 4.1.1-alpha for portbld-freebsd5.2.1 on amd64 (FreeBSD port: > mysql-server-4.1.1_2) > MySQL Statically compiled with libc_r [...] > Your databases overall average score is 3146.2522648084 records per second. [...] > So any suggestions on how to improve performance on FreeBSD/AMD64? First you should be comparing the same version of MySQL... who knows what changes were made between versions that could seriously slow down performance... Maybe MySQL 4.1 adds table locking while 4.0 doesn't... Second, you should be running with libthr or libkse (now known as lib pthread), and not libc_r... any benchmarks with libc_r is no way to test 5.x... This is due to the fact the libc_r runs with only a single context, and uses at most, one cpu... Running with libthr or libkse will let you run on multiple processors at once... considering that FreeBSD got over 50% the score on a single cpu compared to Linux, that says quite a bit... so, please link with a proper thread library and run with the save version of the code before you try to draw any conclusions... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:12:42 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 38E2F16A677 for ; Tue, 18 May 2004 16:12:27 -0700 (PDT) Received: from 21322530218.direct.eti.at (21322530218.direct.eti.at [213.225.30.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86D2643E17 for ; Tue, 18 May 2004 10:51:23 -0700 (PDT) (envelope-from tilman@arved.at) Received: from huckfinn-wi0.arved.de (localhost [127.0.0.1]) i4IHp1D1044169 for ; Tue, 18 May 2004 19:51:02 +0200 (CEST) (envelope-from tilman@arved.at) Received: (from tilman@localhost) by huckfinn-wi0.arved.de (8.12.11/8.12.6/Submit) id i4IHp1Sc044168 for freebsd-amd64@FreeBSD.org; Tue, 18 May 2004 19:51:01 +0200 (CEST) X-Authentication-Warning: huckfinn-wi0.arved.de: tilman set sender to tilman@arved.at using -f Date: Tue, 18 May 2004 19:51:01 +0200 From: Tilman Linneweh To: freebsd-amd64@FreeBSD.org Message-ID: <20040518175101.GA44139@arved.at> References: <0ac901c43cb1$c9ba6350$471b3dd4@dual> <200405180953.31412.peter@wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405180953.31412.peter@wemm.org> User-Agent: Mutt/1.4.2.1i Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:12:45 -0000 * Peter Wemm [Di, 18 Mai 2004 at 18:53 GMT]: >> I have an ATI radeon 9600 video card, and that driver seems to be >> the only one I can get X to work with on amd64.... >> Next to the fact that configuration of it, is horribly simple. >> And thus would be a good target to get people quick online with a >> simple XConfig. > > I had to use a newer XFree86 that had updated drivers for my radeon > 7000. It wasn't pretty, to say the least. > > I currently run this at home: > vendor string: The XFree86 Project, Inc > vendor release number: 40400000 > XFree86 version: 4.4.0 > > But.. I had to do unspeakable things to it to make it compile. The > XFree86 folks really truely screwed things up. The main problems, __AMD64__ vs __amd64__, were fixed after 4.4.0 release (Both in XFree86 and X.org). I run 4.4.0 on my amd64 from the ports Dejan Lesjak submitted regards tilman From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:50:53 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 CE03916A4CE for ; Tue, 18 May 2004 16:50:53 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 111CB43D2D for ; Tue, 18 May 2004 16:50:53 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4IMkg67076572 for ; Wed, 19 May 2004 00:46:42 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0c5901c43d2a$0d0b9480$471b3dd4@dual> From: "Willem Jan Withagen" To: Date: Wed, 19 May 2004 00:47:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Panic at line 602 in file ffs_vnops.c X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:50:53 -0000 Hi, In an attempt to port some compiler tools, I'm testing its memory allocator. And that does not really work, it is a shure way to crash my dual opteron. panic: ffs_write: uio -> uio_resid < 0 at line 602 in file /home2/src/sys/ufs/ffs/ffs_vnop.c If I then type 'cont' I'd exepct to get coredump. But it just gives up on 708 buffers, prints the uptime and sits quitely in a corner until I hard-reset it. No other keys will get it back.... Before it crashes I first get the inocent LOR on ....swap...:1313 The program usually get an invalid pointer allocated with calloc. And as far as I can tell, then crashes on free-ing with this pointer. Any takers on this?? Looks to me there are 2 problems: I'm able to upset allocator with this program. (If I write the same program, in shorthand, it stays alive) The system does not want to dump/reboot --WjW From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:50:55 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 0F20116A4CE for ; Tue, 18 May 2004 16:50:55 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37B5343D2D for ; Tue, 18 May 2004 16:50:54 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4IMwL67076711; Wed, 19 May 2004 00:58:21 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0c7101c43d2b$ae0b7110$471b3dd4@dual> From: "Willem Jan Withagen" To: , "JG" References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Date: Wed, 19 May 2004 00:58:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:50:55 -0000 ----- Original Message ----- From: "JG" > Well, I've finally got some initial benchmarks here... > > I plan to do many more and encourage anyone who wants to see FreeBSD > perform better > in these benchmarks to give me tips or suggestions to help boost performance. Well you do not mention if you've diabled WITNESS and INVARIANT stuff. 'cause if you want to benchmark, that is what makes a big difference. Look at the graphs I made for some simple NFS benchmarking at: http://withagen.dyndns.org/FreeBSD/NFS-performance/#bonnie-local where especially the reading blocks makes a big difference. Even more so, when the data is still in memory. --WjW From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 16:56:11 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 7652B16A4CE for ; Tue, 18 May 2004 16:56:11 -0700 (PDT) Received: from mail.jrv.org (rrcs-sw-24-73-246-106.biz.rr.com [24.73.246.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id D711A43D2D for ; Tue, 18 May 2004 16:56:10 -0700 (PDT) (envelope-from james@jrv.org) Received: from jrv.org (zippy.jrv.org [192.168.3.156]) (authenticated bits=0) by mail.jrv.org (8.12.11/8.12.10) with ESMTP id i4INSpjD063407 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 May 2004 18:28:52 -0500 (CDT) (envelope-from james@jrv.org) Message-ID: <40AA9C33.1030901@jrv.org> Date: Tue, 18 May 2004 18:28:51 -0500 From: "James R. Van Artsalen" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: JG References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:56:11 -0000 JG wrote: > > Dual AMD Opteron 240's (1.4ghz) > Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. > 2 gigs PC-2700 registered ECC memory > Seagate barracuda ATA 100 system drive > RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. How is the memory laid out? How many DIMMs, and are they evenly spread between the CPUs? From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:06:11 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 07D8316A4CF for ; Tue, 18 May 2004 17:06:11 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id C049843D45 for ; Tue, 18 May 2004 17:06:10 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 22527 invoked by uid 89); 19 May 2004 00:07:02 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 00:07:02 -0000 Message-Id: <5.2.0.9.2.20040518170229.014bd258@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 17:02:51 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <40AA9C33.1030901@jrv.org> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:06:11 -0000 At 06:28 PM 5/18/2004 -0500, you wrote: >JG wrote: > >> >>Dual AMD Opteron 240's (1.4ghz) >>Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. >>2 gigs PC-2700 registered ECC memory >>Seagate barracuda ATA 100 system drive >>RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. > > >How is the memory laid out? How many DIMMs, and are they evenly spread >between the CPUs? There are only (2) 1GB modules. They are laid out as the motherboard suggests for this configuration - both modules on the CPU0 bank. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:06:13 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 0045916A4CE for ; Tue, 18 May 2004 17:06:13 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2F6543D58 for ; Tue, 18 May 2004 17:06:11 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 22556 invoked by uid 89); 19 May 2004 00:08:02 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 00:08:02 -0000 Message-Id: <5.2.0.9.2.20040518170303.0155d588@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 17:03:51 -0700 To: FreeBSD-amd64@freebsd.org From: JG In-Reply-To: <0c7101c43d2b$ae0b7110$471b3dd4@dual> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:06:13 -0000 At 12:58 AM 5/19/2004 +0200, you wrote: >----- Original Message ----- >From: "JG" > > Well, I've finally got some initial benchmarks here... > > > > I plan to do many more and encourage anyone who wants to see FreeBSD > > perform better > > in these benchmarks to give me tips or suggestions to help boost > performance. > >Well you do not mention if you've diabled WITNESS and INVARIANT stuff. >'cause if you want to benchmark, that is what makes a big difference. Sorry, forgot to mention this. They were disabled during the benchmark results I posted. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:06:22 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 7E0EC16A4CF for ; Tue, 18 May 2004 17:06:22 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4190343D46 for ; Tue, 18 May 2004 17:06:22 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 22637 invoked by uid 89); 19 May 2004 00:10:01 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 00:10:01 -0000 Message-Id: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 17:05:51 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <200405181359.18291.peter@wemm.org> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:06:23 -0000 At 01:59 PM 5/18/2004 -0700, you wrote: >On Tuesday 18 May 2004 10:36 am, JG wrote: > > > MySQL Statically compiled with libc_r > ^^^^^ >That's your killer. You're using the the single-process polling loop >based threads and comparing it to linux's parallel process based >threads. The moment one thread blocks on disk IO, everything stops. > >You want -lpthread instead, but this isn't going to be happy on >5.2.1-RELEASE. I've fixed a lot of bugs in 5-current that would mean >the difference between it working versus crashing. > >Also, there are patches to change MySQL to use PTHREAD_SCOPE_PROCESS >threads with -lpthread. This works out a little better on benchmarks >since it can make better use of the ligher weight context switches. > >-- >Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com >"All of this is for nothing if we don't go to the stars" - JMS/B5 Yes I'll definitely try this next. Thanks to everyone for all the tips & suggestions. I'll post some updated results tomorrow sometime. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:06:43 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 2D61616A4CE for ; Tue, 18 May 2004 17:06:43 -0700 (PDT) Received: from host142.ipowerweb.com (host142.ipowerweb.com [66.235.193.61]) by mx1.FreeBSD.org (Postfix) with SMTP id D425C43D46 for ; Tue, 18 May 2004 17:06:40 -0700 (PDT) (envelope-from valour@thejemreport.com) Received: (qmail 4380 invoked from network); 18 May 2004 22:37:54 -0000 Received: from unknown (HELO thejemreport.com) (66.67.130.234) by 0 with SMTP; 18 May 2004 22:37:54 -0000 Message-ID: <40AA8FE7.3080308@thejemreport.com> Date: Tue, 18 May 2004 18:36:23 -0400 From: Jem Matzan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040430 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: freebsd-amd64@freebsd.org References: <0ac901c43cb1$c9ba6350$471b3dd4@dual> <200405180953.31412.peter@wemm.org> <0c2701c43d11$f3013ee0$471b3dd4@dual> In-Reply-To: <0c2701c43d11$f3013ee0$471b3dd4@dual> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:06:43 -0000 Willem Jan Withagen wrote: >----- Original Message ----- >From: "Peter Wemm" > > >>>Was there any particular reason why the vesa is not included in the >>>ISO 5.2.1 CD package.... >>> >>> >>The vesa module uses vm86 or bios calls from the kernel. Those are not >>possible in a 64 bit kernel. >> >> > >I hate to agrue with you because you seem te be much more knowledgable >on this than I am, BUT ....... >I did not know this and just compiled vesa..... installed it. >And this is currently running... xvidtune "complains" that there is >nothing to tune. >So I guess it must be running vesa?? How did this get to work then? >And yes, I am running amd64 in 64 bit mode... > >hw.machine: amd64 >hw.model: AMD Opteron(tm) Processor 242 >hw.ncpu: 2 > >XFree86 Version 4.3.0 >Release Date: 27 February 2003 >X Protocol Version 11, Revision 0, Release 6.6 >Build Operating System: FreeBSD 5.2 amd64 [ELF] >Build Date: 17 May 2004 >.... >(II) VESA: driver for VESA chipsets: vesa >(II) Primary Device is: PCI 01:00:0 >(--) Chipset vesa found >.... >(II) VESA(0): initializing int10 >(==) VESA(0): Write-combining range (0xa0000,0x20000) was already clear >(==) VESA(0): Write-combining range (0xc0000,0x40000) was already clear >(II) VESA(0): Primary V_BIOS segment is: 0xc000 >(==) VESA(0): Write-combining range (0x0,0x1000) was already clear >(II) VESA(0): VESA BIOS detected >(II) VESA(0): VESA VBE Version 2.0 >(II) VESA(0): VESA VBE Total Mem: 131072 kB >(II) VESA(0): VESA VBE OEM: ATI RADEON 9600 PRO >(II) VESA(0): VESA VBE OEM Software Rev: 1.0 >(II) VESA(0): VESA VBE OEM Vendor: ATI Technologies Inc. >(II) VESA(0): VESA VBE OEM Product: V350 >(II) VESA(0): VESA VBE OEM Product Rev: 01.00 >(==) VESA(0): Depth 16, (--) framebuffer bpp 16 >(==) VESA(0): RGB weight 565 >(==) VESA(0): Default visual is TrueColor >(==) VESA(0): Using gamma correction (1.0, 1.0, 1.0) >..... >(II) LoadModule: "ddc" >(II) Loading /usr/X11R6/lib/modules/libddc.a >(II) Module ddc: vendor="The XFree86 Project" > compiled for 4.3.0, module version = 1.0.0 > ABI class: XFree86 Video Driver, version 0.6 >(II) VESA(0): VESA VBE DDC supported >(II) VESA(0): VESA VBE DDC Level 2 >(II) VESA(0): VESA VBE DDC transfer in appr. 2 sec. >(II) VESA(0): VESA VBE DDC read successfully >(II) VESA(0): Manufacturer: PHL Model: 801 Serial#: 109398 >(II) VESA(0): Year: 2001 Week: 14 >(II) VESA(0): EDID Version: 1.3 >(II) VESA(0): Digital Display Input >(II) VESA(0): Max H-Image Size [cm]: horiz.: 34 vert.: 27 >(II) VESA(0): Gamma: 2.10 >(II) VESA(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display >..... >And it goes on forever and forever, listing just about any vesa mode >ever invented by mankind >Looks pretty complete to me?? > > > >>>I have an ATI radeon 9600 video card, and that driver seems to be >>>the only one I can get X to work with on amd64.... >>>Next to the fact that configuration of it, is horribly simple. >>>And thus would be a good target to get people quick online with a >>>simple XConfig. >>> >>> >>I had to use a newer XFree86 that had updated drivers for my radeon >>7000. It wasn't pretty, to say the least. >> >>I currently run this at home: >>vendor string: The XFree86 Project, Inc >>vendor release number: 40400000 >>XFree86 version: 4.4.0 >> >>But.. I had to do unspeakable things to it to make it compile. The >>XFree86 folks really truely screwed things up. >> >> > >Well I'm trying to get a old 32-bit set of compiler tools on line on >amd64. Gives me the same sort of feeling..... > >I tried using the Server-snap port, but i claims it does not compile >on amd64 .... > >--WjW >_______________________________________________ >freebsd-amd64@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 >To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" > > > > If you compile XFree86 from Ports, it should add a VESA driver. It did for me anyway. The package does not have it. If you search through this list, last winter I came across this problem and I thought someone said they fixed it. -Jem From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:16:44 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 4ADBB16A4CE for ; Tue, 18 May 2004 17:16:44 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B93943D2D for ; Tue, 18 May 2004 17:16:44 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4J0G3s0017404; Tue, 18 May 2004 17:16:03 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4J0G3rQ017403; Tue, 18 May 2004 17:16:03 -0700 Date: Tue, 18 May 2004 17:16:03 -0700 From: Brooks Davis To: JG Message-ID: <20040519001603.GA16821@Odin.AC.HMC.Edu> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518170229.014bd258@mail.ojoink.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <5.2.0.9.2.20040518170229.014bd258@mail.ojoink.com> User-Agent: Mutt/1.5.4i 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:16:44 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2004 at 05:02:51PM -0700, JG wrote: > At 06:28 PM 5/18/2004 -0500, you wrote: > >JG wrote: > > > >> > >>Dual AMD Opteron 240's (1.4ghz) > >>Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid card. > >>2 gigs PC-2700 registered ECC memory > >>Seagate barracuda ATA 100 system drive > >>RAID-0 Mysql drive composed of 2 15k RPM U160 SCSI Fujistu drives. > > > > > >How is the memory laid out? How many DIMMs, and are they evenly spread= =20 > >between the CPUs? >=20 > There are only (2) 1GB modules. They are laid out as the motherboard=20 > suggests for this > configuration - both modules on the CPU0 bank. =20 I'd recommend replacing those 1GB modules with 4 512MB modules. That should yeild improved performance across the board by giving both CPUs their own RAM. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAqqdCXY6L6fI4GtQRAlxhAKCuUfKhFL7O7ezWx+5DhOEdAcOWpQCfRNHM /I/8jMI0wzyRazwI7/iWotM= =pSgH -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z-- From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:30:05 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 4909716A4CF for ; Tue, 18 May 2004 17:30:05 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 393D043D31 for ; Tue, 18 May 2004 17:30:05 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id 94E2F8826; Tue, 18 May 2004 13:59:18 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Tue, 18 May 2004 13:59:18 -0700 User-Agent: KMail/1.6.1 References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405181359.18291.peter@wemm.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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:30:05 -0000 On Tuesday 18 May 2004 10:36 am, JG wrote: > MySQL Statically compiled with libc_r ^^^^^ That's your killer. You're using the the single-process polling loop based threads and comparing it to linux's parallel process based threads. The moment one thread blocks on disk IO, everything stops. You want -lpthread instead, but this isn't going to be happy on 5.2.1-RELEASE. I've fixed a lot of bugs in 5-current that would mean the difference between it working versus crashing. Also, there are patches to change MySQL to use PTHREAD_SCOPE_PROCESS threads with -lpthread. This works out a little better on benchmarks since it can make better use of the ligher weight context switches. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:32:47 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 E30FA16A4CE for ; Tue, 18 May 2004 17:32:47 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC9A43D2F for ; Tue, 18 May 2004 17:32:47 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 23661 invoked by uid 89); 19 May 2004 00:35:59 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 00:35:59 -0000 Message-Id: <5.2.0.9.2.20040518172916.03c3bc50@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 17:31:48 -0700 To: Freebsd-amd64@freebsd.org From: JG In-Reply-To: <200405190225.34215.Gregor.Bittel@GMX.de> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:32:48 -0000 At 02:25 AM 5/19/2004 +0200, you wrote: >Hi, > >On Dienstag, 18. Mai 2004 19:36 JG wrote: > > TESTING HARDWARE: > > > > Dual AMD Opteron 240's (1.4ghz) > > Tyan S2882UGNR server-class motherboard w/LSI Zero channel Raid > >Interesting - can I get a dmesg+mptable-output to add it to >my list[1]? >This mainboard isn't listed at the moment, and I want to change this, >if I get the informations. Sorry, I made a typo there. Another person I am talking to has the S2882 (not sure if he has SCSI or not) but afaik, the SCSI option on the S2882 is an Adaptec chipset. Mine is the S2880UGNR which has the LSI SCSI chipset & allows you to expand it to raid with the LSI Megaraid 320-0 zero channel raid card. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 17:35:53 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 3B73816A4CE for ; Tue, 18 May 2004 17:35:53 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 075D543D2F for ; Tue, 18 May 2004 17:35:53 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 23765 invoked by uid 89); 19 May 2004 00:38:55 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 00:38:55 -0000 Message-Id: <5.2.0.9.2.20040518173231.0145b0c0@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Tue, 18 May 2004 17:34:44 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <20040519001603.GA16821@Odin.AC.HMC.Edu> References: <5.2.0.9.2.20040518170229.014bd258@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518170229.014bd258@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 00:35:53 -0000 >I'd recommend replacing those 1GB modules with 4 512MB modules. That >should yeild improved performance across the board by giving both CPUs >their own RAM. > >-- Brooks Brooks, There are only 6 ram slots available on this board, for us it makes more sense to use the 1GB modules rather than the 512's. Before it goes into production I'll be adding 2 more 1GB modules. But right now I am just trying to figure out what OS it'll be on. I'm a FreeBSD guy so I've got my fingers crossed for some better FreeBSD performance after I recompile. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 18:02:28 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 ED25416A4CE for ; Tue, 18 May 2004 18:02:28 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id E497643D55 for ; Tue, 18 May 2004 18:02:28 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id 258FE8833; Tue, 18 May 2004 15:57:54 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Tue, 18 May 2004 15:57:53 -0700 User-Agent: KMail/1.6.1 References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> <20040518070430.GA68449@cat.robbins.dropbear.id.au> <200405180946.38351.peter@wemm.org> In-Reply-To: <200405180946.38351.peter@wemm.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405181557.53839.peter@wemm.org> cc: Tim Robbins cc: Till Plewe Subject: Re: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 01:02:29 -0000 On Tuesday 18 May 2004 09:46 am, Peter Wemm wrote: > On Tuesday 18 May 2004 12:04 am, Tim Robbins wrote: > > On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > > The program "int main(){return 0;}" fails to compile if I use the > > > option "-pg". The error message I get starts with: > > > > > > # gcc -pg -o test test.c > > > /var/tmp//ccTPXtQI.o: In function `main': > > > /var/tmp//ccTPXtQI.o(.text+0x5): undefined reference to `mcount' > > > /usr/lib/libc_p.a(gmon.po): In function `monstartup': > > > gmon.po(.text+0xa): undefined reference to `mcount > > > ... > > > > This is a bug in the FreeBSD/x86-64 GCC configuration. It should be > > calling ``.mcount'' instead of ``mcount'' (note the full-stop at > > the start of the name.) After applying this patch, rebuilding gcc, > > and rebuilding the profiled C library, gcc -pg does not cause > > linker errors: > > > > ==== > > //depot/user/tjr/freebsd-tjr/src/contrib/gcc/config/i386/freebsd64. > >h# 5 - /home/tim/p4/src/contrib/gcc/config/i386/freebsd64.h ==== @@ > > -25,6 +25,9 @@ > > #undef TARGET_VERSION > > #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); > > > > +#undef MCOUNT_NAME > > +#define MCOUNT_NAME ".mcount" > > + > > #undef FBSD_TARGET_CPU_CPP_BUILTINS > > #define FBSD_TARGET_CPU_CPP_BUILTINS() \ > > do \ > > > > > > However, programs compiled with -pg will crash almost immediately. > > I don't understand why this happens well enough to venture > > an explanation, but I think both GCC and FreeBSD/amd64's > > header are at fault here. > > Yes, profiling wasn't something on my radar at the time so I mostly > ignored it while doing the early porting work. OK, I've tracked down the missing parts of userland profiling and made it work. You'll still need the above patch to gcc and do a buildworld otherwise there will be undefined references to mcount in libc_p.a etc. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 18:14:55 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 EDEE316A4CF for ; Tue, 18 May 2004 18:14:55 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB7A243D45 for ; Tue, 18 May 2004 18:14:55 -0700 (PDT) (envelope-from markus.mainka@onlinehome.de) Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BQA18-000447-00 for freebsd-amd64@freebsd.org; Tue, 18 May 2004 21:12:46 +0200 Received: from [217.235.82.217] (helo=onlinehome.de) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1BQA17-000718-00 for freebsd-amd64@FreeBSD.org; Tue, 18 May 2004 21:12:46 +0200 Message-ID: <40AA6046.8030908@onlinehome.de> Date: Tue, 18 May 2004 21:13:10 +0200 From: Markus Mainka User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-amd64@FreeBSD.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:9bba5c86096017774ca62b5cb5bbfec5 Subject: '/etc/rc.conf' bug X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 01:14:56 -0000 I've found a damn bug in version 5.2.1. Whenever I reboot my ACER Aspire 1500 notebook, all the changes made within 'sysinstall' are forgotten. Although every change is stored correctly in '/etc/rc.conf'. From owner-freebsd-amd64@FreeBSD.ORG Tue May 18 20:01:41 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 4644316A4CE for ; Tue, 18 May 2004 20:01:41 -0700 (PDT) Received: from plewe.is.tsukuba.ac.jp (plewe.is.tsukuba.ac.jp [130.158.81.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FB9B43D4C for ; Tue, 18 May 2004 20:01:40 -0700 (PDT) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: from plewe.is.tsukuba.ac.jp (localhost [127.0.0.1]) i4J36NSJ078352 for ; Wed, 19 May 2004 12:06:23 +0900 (JST) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: (from till@localhost) by plewe.is.tsukuba.ac.jp (8.12.11/8.12.11/Submit) id i4J36Msr078351 for freebsd-amd64@freebsd.org; Wed, 19 May 2004 12:06:22 +0900 (JST) (envelope-from till) Date: Wed, 19 May 2004 12:06:22 +0900 From: Till Plewe To: freebsd-amd64@freebsd.org Message-ID: <20040519030622.GA78298%till@score.is.tsukuba.ac.jp> References: <20040518050421.GA75633%till@score.is.tsukuba.ac.jp> <20040518070430.GA68449@cat.robbins.dropbear.id.au> <200405180946.38351.peter@wemm.org> <200405181557.53839.peter@wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405181557.53839.peter@wemm.org> User-Agent: Mutt/1.5.6i Subject: Re: profiling on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: till@score.is.tsukuba.ac.jp List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 03:01:41 -0000 On Tue, May 18, 2004 at 03:57:53PM -0700, Peter Wemm wrote: > On Tuesday 18 May 2004 09:46 am, Peter Wemm wrote: > > On Tuesday 18 May 2004 12:04 am, Tim Robbins wrote: > > > On Tue, May 18, 2004 at 02:04:21PM +0900, Till Plewe wrote: > > > > The program "int main(){return 0;}" fails to compile if I use the > > > > option "-pg". The error message I get starts with: ... > > > This is a bug in the FreeBSD/x86-64 GCC configuration. It should be > > > calling ``.mcount'' instead of ``mcount'' (note the full-stop at > > > the start of the name.) After applying this patch, rebuilding gcc, > > > and rebuilding the profiled C library, gcc -pg does not cause > > > linker errors: > > > > > > ==== > > > //depot/user/tjr/freebsd-tjr/src/contrib/gcc/config/i386/freebsd64. > > >h# 5 - /home/tim/p4/src/contrib/gcc/config/i386/freebsd64.h ==== @@ > > > -25,6 +25,9 @@ > > > #undef TARGET_VERSION > > > #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); > > > > > > +#undef MCOUNT_NAME > > > +#define MCOUNT_NAME ".mcount" > > > + > > > #undef FBSD_TARGET_CPU_CPP_BUILTINS > > > #define FBSD_TARGET_CPU_CPP_BUILTINS() \ > > > do \ ... > OK, I've tracked down the missing parts of userland profiling and made > it work. You'll still need the above patch to gcc and do a buildworld > otherwise there will be undefined references to mcount in libc_p.a etc. Thanks. Everything seems to be working perfectly now. - Till From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 02:29:43 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 B6FF716A4CE for ; Wed, 19 May 2004 02:29:43 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65C0E43D48 for ; Wed, 19 May 2004 02:29:43 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 41674 invoked by uid 89); 19 May 2004 09:33:12 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 09:33:12 -0000 Message-Id: <5.2.0.9.2.20040519022110.0146fd48@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 02:28:56 -0700 To: freebsd-amd64@freebsd.org From: JG Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: MySQL port problems on AMD64 (still?) X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 09:29:43 -0000 From my error log: 040519 01:21:18 mysqld started InnoDB: ########################################################## InnoDB: WARNING! InnoDB: The log sequence number in ibdata files is higher InnoDB: than the log sequence number in the ib_logfiles! Are you sure InnoDB: you are using the right ib_logfiles to start up the database? InnoDB: Log sequence number in ib_logfiles is 0 43634, log InnoDB: sequence numbers stamped to ibdata file headers are between InnoDB: 3503345872 3503345872 and 3503345872 3503345872. InnoDB: ########################################################## 040519 1:21:18 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 040519 1:21:18 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 43634. InnoDB: Doing recovery: scanned up to log sequence number 0 43634 040519 1:21:18 InnoDB: Flushing modified pages from the buffer pool... 040519 1:21:18 InnoDB: Started; log sequence number 0 43634 040519 1:21:18 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 040519 01:21:18 mysqld ended I installed from port and specified a new DB_DIR=/my1 /my1/mysql/mysql/host.frm exists. I thought Alex fixed this :-/ Maybe I'm doing something wrong. I type: setenv DB_DIR /my1 then make, then make install. From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 02:55:50 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 DB1B016A4CE; Wed, 19 May 2004 02:55:50 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3886743D53; Wed, 19 May 2004 02:55:49 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4J9pc67086381; Wed, 19 May 2004 11:51:39 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0def01c43d86$f35f7d50$471b3dd4@dual> From: "Willem Jan Withagen" To: References: <0c5901c43d2a$0d0b9480$471b3dd4@dual> Date: Wed, 19 May 2004 11:52:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: freebsd-current@freebsd.org Subject: Re: Panic at line 602 in file ffs_vnops.c X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 09:55:51 -0000 ----- Original Message ----- From: "Willem Jan Withagen" > In an attempt to port some compiler tools, I'm testing its memory allocator. > And that does not really work, it is a shure way to crash my dual opteron. > > panic: ffs_write: uio -> uio_resid < 0 > at line 602 in file /home2/src/sys/ufs/ffs/ffs_vnop.c > > If I then type 'cont' I'd exepct to get coredump. > But it just gives up on 708 buffers, prints the uptime > and sits quitely in a corner until I hard-reset it. > No other keys will get it back.... > > Before it crashes I first get the inocent LOR on ....swap...:1313 > The program usually get an invalid pointer allocated with calloc. > And as far as I can tell, then crashes on free-ing with this pointer. > > Any takers on this?? > Looks to me there are 2 problems: > I'm able to upset allocator with this program. > (If I write the same program, in shorthand, it stays alive) > The system does not want to dump/reboot To follow up on myself: 'where' after the crash gives: (copied via paper) ffs_write() at ... +0x64e vn_rdwr() at ... +0xf1 vn_rdwr_inchuncks() at ... +0x77 elf64_coredump() at ... +0x1222 coredump() at ... +0x5da sigexit() at ... +0x71 postsig() at ... +0x30e ast() at ... +0x297 Xfas_syscall() at ... +0xdd ------ syscall(0, FreeBSD ELF64, nosys) rip = 0x20067b8ec rsp = 0x7fffffffe678 rbp = 0x2006de6c0 So it looks like the systems want to write a dump, but does not really get to write it.... What more can I do?? --WjW From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 04:52:02 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 20E0316A4CE for ; Wed, 19 May 2004 04:52:02 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DB7443D49 for ; Wed, 19 May 2004 04:52:02 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 46457 invoked by uid 89); 19 May 2004 11:56:02 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 11:56:02 -0000 Message-Id: <5.2.0.9.2.20040519044815.0156fbb8@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 04:51:47 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> References: <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 11:52:02 -0000 >> >> > MySQL Statically compiled with libc_r >> ^^^^^ >>That's your killer. You're using the the single-process polling loop >>based threads and comparing it to linux's parallel process based >>threads. The moment one thread blocks on disk IO, everything stops. >> >>You want -lpthread instead, but this isn't going to be happy on >>5.2.1-RELEASE. I've fixed a lot of bugs in 5-current that would mean >>the difference between it working versus crashing. >> >>Also, there are patches to change MySQL to use PTHREAD_SCOPE_PROCESS >>threads with -lpthread. This works out a little better on benchmarks >>since it can make better use of the ligher weight context switches. >> >>-- >>Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com >>"All of this is for nothing if we don't go to the stars" - JMS/B5 > > >Yes I'll definitely try this next. > >Thanks to everyone for all the tips & suggestions. > >I'll post some updated results tomorrow sometime. More testing results... results still pretty much the same: ----------------------------------------------------------------------------- Testing configuration: FreeBSD amd64f.attbi.com 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 KERNEL OPTIONS: SCHED_4BSD, Configure options I used in makefile: CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-debug \ --without-readline \ --without-libedit \ --without-bench \ --without-extra-tools \ --without-libwrap \ --without-mysqlfs \ --without-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client OTHER PORT OPTIONS USED: BUILD_OPTMIZED=yes BUILD_STATIC=yes MySQL Version Ver 4.1.1-alpha for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.1.1_2) MySQL Statically compiled with: libpthread.so.1 libz.so.2 libcrypt.so.2 libstdc++.so.4 libm.so.2 libc.so.5 RESULTS BELOW: ----------------------------------------------------------------------------- Generating 500000 records... Creation of 500000 records took 177 seconds. Average of 2824.8587570621 records per second. Creating records for 10 seconds... Created 32603 records in 10 seconds. Average of 3260.3 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 17 seconds. Average of 2941.1764705882 records per second. Creating random md5 hash records for 10 seconds... Created 24109 random records in 10 seconds. Average of 2410.9 records per second. Your databases overall average score is 2859.3088069126 records per second. Same config, using SCHED_ULE instead: Generating 500000 records... Creation of 500000 records took 156 seconds. Average of 3205.1282051282 records per second. Creating records for 10 seconds... Created 31062 records in 10 seconds. Average of 3106.2 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 14 seconds. Average of 3571.4285714286 records per second. Creating random md5 hash records for 10 seconds... Created 30214 random records in 10 seconds. Average of 3021.4 records per second. Your databases overall average score is 3226.0391941392 records per second. From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 05:29:53 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 942B016A4CE for ; Wed, 19 May 2004 05:29:53 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D20843D46 for ; Wed, 19 May 2004 05:29:53 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 47577 invoked by uid 89); 19 May 2004 12:33:54 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 12:33:54 -0000 Message-Id: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 05:29:39 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040519044815.0156fbb8@mail.ojoink.com> References: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 12:29:53 -0000 Also tried with the MySQL 5.0.0a port, same results basically: ----------------------------------------------------------------------------- FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 With SCHED_ULE & debugging turned off in kernel. amd64f# ldd /usr/local/libexec/mysqld /usr/local/libexec/mysqld: libpthread.so.1 => /usr/lib/libpthread.so.1 (0x2009ab000) libz.so.2 => /lib/libz.so.2 (0x200ad5000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x200be4000) libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x200cfe000) libm.so.2 => /lib/libm.so.2 (0x200ee5000) libc.so.5 => /lib/libc.so.5 (0x201005000) amd64f# /usr/local/libexec/mysqld --version Ver 5.0.0-alpha for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-5.0.0_2) From the ports Makefile: CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-debug \ --without-readline \ --without-libedit \ --without-bench \ --without-extra-tools \ --without-libwrap \ --with-mysqlfs \ --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client Benchmark Results: Generating 500000 records... Creation of 500000 records took 167 seconds. Average of 2994.0119760479 records per second. Creating records for 10 seconds... Created 32912 records in 10 seconds. Average of 3291.2 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 16 seconds. Average of 3125 records per second. Creating random md5 hash records for 10 seconds... Created 29294 random records in 10 seconds. Average of 2929.4 records per second. Your databases overall average score is 3084.902994012 records per second. ----------------------------------------------------------------------------- VS. ----------------------------------------------------------------------------- LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux Benchmark result summary: Your databases overall average score is 5328.6582709114 records per second ----------------------------------------------------------------------------- From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 05:44:49 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 22CBD16A4CE for ; Wed, 19 May 2004 05:44:49 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89C4143D2F for ; Wed, 19 May 2004 05:44:48 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000219667.msg for ; Wed, 19 May 2004 13:40:58 +0100 Message-ID: <00f301c43d9e$c0eea950$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: References: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> Date: Wed, 19 May 2004 13:42:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Wed, 19 May 2004 13:40:58 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 19 May 2004 13:41:02 +0100 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 12:44:49 -0000 Something silly to try on both linux and FreeBSD disable the second processor / use a none SMP kernel. Do you then see similar results? Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 06:09:02 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 B59F616A4CE for ; Wed, 19 May 2004 06:09:02 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71E4943D31 for ; Wed, 19 May 2004 06:09:02 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 48911 invoked by uid 89); 19 May 2004 13:12:04 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 13:12:04 -0000 Message-Id: <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 06:07:49 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <40AB58C1.7070205@myrealbox.com> References: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 13:09:02 -0000 At 04:53 PM 5/19/2004 +0400, you wrote: >In first time you built MySQL statically. >Now - dinamically. > >What results with statical linked MySQL ? > >JG wrote: Those results are in earlier posts of this thread. I compiled it dynamically to be sure that libpthreads was used. (so I could use ldd against mysqld) From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 06:30:30 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 9615F16A4CE for ; Wed, 19 May 2004 06:30:30 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EB7743D1F for ; Wed, 19 May 2004 06:30:30 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 49638 invoked by uid 89); 19 May 2004 13:34:22 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 13:34:22 -0000 Message-Id: <5.2.0.9.2.20040519062848.04332d00@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 06:30:07 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <00f301c43d9e$c0eea950$b3db87d4@multiplay.co.uk> References: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 13:30:30 -0000 At 01:42 PM 5/19/2004 +0100, you wrote: >Something silly to try on both linux and FreeBSD disable the >second processor / use a none SMP kernel. >Do you then see similar results? > > Steve Steve, Good idea. I just tried this & the results were in the same range. The actual results are below: ----------------------------------------------------------------------------- FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 With SCHED_ULE & debugging turned off in kernel. ** WITHOUT SMP ** option in kernel (just testing single CPU results) amd64f# ldd /usr/local/libexec/mysqld /usr/local/libexec/mysqld: libpthread.so.1 => /usr/lib/libpthread.so.1 (0x2009ab000) libz.so.2 => /lib/libz.so.2 (0x200ad5000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x200be4000) libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x200cfe000) libm.so.2 => /lib/libm.so.2 (0x200ee5000) libc.so.5 => /lib/libc.so.5 (0x201005000) amd64f# /usr/local/libexec/mysqld --version Ver 5.0.0-alpha for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-5.0.0_2) From Makefile: CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-debug \ --without-readline \ --without-libedit \ --without-bench \ --without-extra-tools \ --without-libwrap \ --with-mysqlfs \ --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client Benchmark Results: Generating 500000 records... Creation of 500000 records took 166 seconds. Average of 3012.0481927711 records per second. Creating records for 10 seconds... Created 31882 records in 10 seconds. Average of 3188.2 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 18 seconds. Average of 2777.7777777778 records per second. Creating random md5 hash records for 10 seconds... Created 27658 random records in 10 seconds. Average of 2765.8 records per second. Your databases overall average score is 2935.9564926372 records per second. From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 06:37:51 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 558E416A4CE for ; Wed, 19 May 2004 06:37:51 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9856943D46 for ; Wed, 19 May 2004 06:37:50 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000219764.msg for ; Wed, 19 May 2004 14:34:10 +0100 Message-ID: <013901c43da6$30d11210$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: References: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519062848.04332d00@mail.ojoink.com> Date: Wed, 19 May 2004 14:35:45 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Wed, 19 May 2004 14:34:10 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Wed, 19 May 2004 14:34:13 +0100 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 13:37:51 -0000 I'd say that's pretty conclusive that its only using one of the CPU's Unfortunately I don't have any answers why :( Steve / K ----- Original Message ----- From: "JG" > Steve, > > Good idea. I just tried this & the results were in the same range. > > The actual results are below: > > ----------------------------------------------------------------------------- > FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 > > With SCHED_ULE & debugging turned off in kernel. > ** WITHOUT SMP ** option in kernel (just testing single CPU results) > > amd64f# ldd /usr/local/libexec/mysqld > /usr/local/libexec/mysqld: > libpthread.so.1 => /usr/lib/libpthread.so.1 (0x2009ab000) > libz.so.2 => /lib/libz.so.2 (0x200ad5000) > libcrypt.so.2 => /lib/libcrypt.so.2 (0x200be4000) > libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x200cfe000) > libm.so.2 => /lib/libm.so.2 (0x200ee5000) > libc.so.5 => /lib/libc.so.5 (0x201005000) > > amd64f# /usr/local/libexec/mysqld --version > Ver 5.0.0-alpha for portbld-freebsd5.2 on amd64 (FreeBSD port: > mysql-server-5.0.0_2) > > From Makefile: > CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ > --without-debug \ > --without-readline \ > --without-libedit \ > --without-bench \ > --without-extra-tools \ > --without-libwrap \ > --with-mysqlfs \ > --with-vio \ > --with-low-memory \ > --with-comment='FreeBSD port: ${PKGNAME}' \ > --enable-thread-safe-client > > Benchmark Results: > > > Generating 500000 records... > Creation of 500000 records took 166 seconds. > Average of 3012.0481927711 records per second. > Creating records for 10 seconds... > Created 31882 records in 10 seconds. > Average of 3188.2 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 18 seconds. > Average of 2777.7777777778 records per second. > Creating random md5 hash records for 10 seconds... > Created 27658 random records in 10 seconds. > Average of 2765.8 records per second. > > Your databases overall average score is 2935.9564926372 records per second. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 06:46:55 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 54B8916A4CE; Wed, 19 May 2004 06:46:55 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55CD243D1D; Wed, 19 May 2004 06:46:54 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4JDgi67090226; Wed, 19 May 2004 15:42:44 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0e6e01c43da7$383dbf20$471b3dd4@dual> From: "Willem Jan Withagen" To: "Tilman Linneweh" , References: <0ac901c43cb1$c9ba6350$471b3dd4@dual><200405180953.31412.peter@wemm.org> <20040518175101.GA44139@arved.at> Date: Wed, 19 May 2004 15:43:07 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 13:46:55 -0000 Very good suggestion..... XFree86-4-Server compiles without much ado Needed to get dri as well. but now running a 4.4.0 Xserver and getting my Radeon 9600 supported. Thanx, --WjW ----- Original Message ----- From: "Tilman Linneweh" To: Sent: Tuesday, May 18, 2004 7:51 PM Subject: Re: XFree86 vesa and radeon 9600 driver voor AMD64 > * Peter Wemm [Di, 18 Mai 2004 at 18:53 GMT]: > >> I have an ATI radeon 9600 video card, and that driver seems to be > >> the only one I can get X to work with on amd64.... > >> Next to the fact that configuration of it, is horribly simple. > >> And thus would be a good target to get people quick online with a > >> simple XConfig. > > > > I had to use a newer XFree86 that had updated drivers for my radeon > > 7000. It wasn't pretty, to say the least. > > > > I currently run this at home: > > vendor string: The XFree86 Project, Inc > > vendor release number: 40400000 > > XFree86 version: 4.4.0 > > > > But.. I had to do unspeakable things to it to make it compile. The > > XFree86 folks really truely screwed things up. > > The main problems, __AMD64__ vs __amd64__, were fixed after 4.4.0 release > (Both in XFree86 and X.org). > > I run 4.4.0 on my amd64 from the ports Dejan Lesjak submitted > > > regards > tilman > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" > > From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 10:10:14 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 D280E16A4CF; Wed, 19 May 2004 10:10:14 -0700 (PDT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7CF943D46; Wed, 19 May 2004 10:10:13 -0700 (PDT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i4JH6Z67093486; Wed, 19 May 2004 19:06:35 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <0f3901c43dc3$b33af8c0$471b3dd4@dual> From: "Willem Jan Withagen" To: "Willem Jan Withagen" , References: <0c5901c43d2a$0d0b9480$471b3dd4@dual> <0def01c43d86$f35f7d50$471b3dd4@dual> Date: Wed, 19 May 2004 19:07:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: freebsd-current@freebsd.org Subject: Re: Panic at line 602 in file ffs_vnops.c X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 17:10:15 -0000 > ----- Original Message ----- > From: "Willem Jan Withagen" > > > In an attempt to port some compiler tools, I'm testing its memory allocator. > > And that does not really work, it is a shure way to crash my dual opteron. > > > > panic: ffs_write: uio -> uio_resid < 0 > > at line 602 in file /home2/src/sys/ufs/ffs/ffs_vnop.c > > > > If I then type 'cont' I'd exepct to get coredump. > > But it just gives up on 708 buffers, prints the uptime > > and sits quitely in a corner until I hard-reset it. > > No other keys will get it back.... > > > > Before it crashes I first get the inocent LOR on ....swap...:1313 > > The program usually get an invalid pointer allocated with calloc. > > And as far as I can tell, then crashes on free-ing with this pointer. > > > > Any takers on this?? > > Looks to me there are 2 problems: > > I'm able to upset allocator with this program. > > (If I write the same program, in shorthand, it stays alive) > > The system does not want to dump/reboot > > To follow up on myself: > > 'where' after the crash gives: (copied via paper) > ffs_write() at ... +0x64e > vn_rdwr() at ... +0xf1 > vn_rdwr_inchuncks() at ... +0x77 > elf64_coredump() at ... +0x1222 > coredump() at ... +0x5da > sigexit() at ... +0x71 > postsig() at ... +0x30e > ast() at ... +0x297 > Xfas_syscall() at ... +0xdd > > ------ syscall(0, FreeBSD ELF64, nosys) > rip = 0x20067b8ec > rsp = 0x7fffffffe678 > rbp = 0x2006de6c0 > > So it looks like the systems want to write a dump, but does not really get > to write it.... > > What more can I do?? And even more follow up: I tried to just get a coredump by going crtl-alt-esc and go 'panic' in ddb. But ended up with a freeze and: pmap_invalidate_range: interrupts disabled at line 664 inf file /home2/src/sys/amd64/amd64/pmap.ccpuid=1 Where I think the last line should read: pmap.c cpuid=1 I think I need this fixed before I can start looking at the other problem?? --WjW From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 10:29:15 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 6612216A4CE for ; Wed, 19 May 2004 10:29:15 -0700 (PDT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 296D743D2D for ; Wed, 19 May 2004 10:29:15 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 30201 invoked from network); 19 May 2004 17:29:14 -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 ; 19 May 2004 17:29:14 -0000 Received: from hydrogen.funkthat.com (uzmjkt@localhost.funkthat.com [127.0.0.1])i4JHTEEx058475; Wed, 19 May 2004 10:29:14 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i4JHTE6w058474; Wed, 19 May 2004 10:29:14 -0700 (PDT) Date: Wed, 19 May 2004 10:29:13 -0700 From: John-Mark Gurney To: JG Message-ID: <20040519172913.GU601@funkthat.com> Mail-Followup-To: JG , freebsd-amd64@freebsd.org References: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@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.20040519060611.0435f750@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: Wed, 19 May 2004 17:29:15 -0000 JG wrote this message on Wed, May 19, 2004 at 06:07 -0700: > At 04:53 PM 5/19/2004 +0400, you wrote: > >In first time you built MySQL statically. > >Now - dinamically. > > > >What results with statical linked MySQL ? > > > >JG wrote: > > Those results are in earlier posts of this thread. > > I compiled it dynamically to be sure that libpthreads was used. > (so I could use ldd against mysqld) There is a patch to make use of _SYSTEM scoped threads instead of process scoped threads for mysql mentioned ealier.. Also, if you use libmap to remap libpthread to libthr, you'll have similar results... libpthread (aka libkse) is a design for M:N threads, and requires the user of pthreads to create new system scoped threads to make use of multiple cpu's... libthr is a design of 1:1 threads where each thread has it's own process, and will automaticly use multiple cpu's w/o regard to the scope of the thread that is set... Also, when running the tests, make sure that you run vmstat -w 1 or something similar, and make sure that the id drops to 20 or less... If it doesn't, you're probably still using a single execution thread for it... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 11:20:04 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 CED4916A4CE for ; Wed, 19 May 2004 11:20:04 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A17543D60 for ; Wed, 19 May 2004 11:20:02 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 59847 invoked by uid 89); 19 May 2004 18:24:07 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 18:24:07 -0000 Message-Id: <5.2.0.9.2.20040519104811.014f4620@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 11:19:48 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <20040519172913.GU601@funkthat.com> References: <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 18:20:04 -0000 At 10:29 AM 5/19/2004 -0700, you wrote: >JG wrote this message on Wed, May 19, 2004 at 06:07 -0700: > > At 04:53 PM 5/19/2004 +0400, you wrote: > > >In first time you built MySQL statically. > > >Now - dinamically. > > > > > >What results with statical linked MySQL ? > > > > > >JG wrote: > > > > Those results are in earlier posts of this thread. > > > > I compiled it dynamically to be sure that libpthreads was used. > > (so I could use ldd against mysqld) > >There is a patch to make use of _SYSTEM scoped threads instead of >process scoped threads for mysql mentioned ealier.. Also, if you >use libmap to remap libpthread to libthr, you'll have similar >results... Afaik, that patch has been made: $ more mysql40-server.diffs Index: files/patch-libmysqld::lib_sql.cc =================================================================== RCS file: files/patch-libmysqld::lib_sql.cc diff -N files/patch-libmysqld::lib_sql.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-libmysqld::lib_sql.cc 18 Feb 2004 21:42:20 -0000 @@ -0,0 +1,11 @@ +--- libmysqld/lib_sql.cc.orig Tue Feb 10 13:15:49 2004 ++++ libmysqld/lib_sql.cc Wed Feb 18 16:41:40 2004 +@@ -467,7 +467,7 @@ + (void) pthread_attr_setdetachstate(&connection_attrib, + PTHREAD_CREATE_DETACHED); + pthread_attr_setstacksize(&connection_attrib,thread_stack); +- pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM); ++ pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_PROCESS); + + #if defined( SET_RLIMIT_NOFILE) || defined( OS2) + /* connections and databases needs lots of files */ Index: files/patch-sql::mysqld.cc =================================================================== RCS file: /opt/FreeBSD/cvs/ports/databases/mysql40-server/files/patch-sql::mysqld.cc,v [* snip *] That's the patch you're talking about right? If the lines in the source files are supposed to read PTHREAD_SCOPE_SYSTEM after the patch, then this patch was applied for all my 4.x benchmarks. I'm starting to think that my earlier results were ~ as good as it gets for FreeBSD/AMD64 at this point. Any other suggestions? Or anyone on the AMD64 dev team want to take a stab at it? From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 11:43:43 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 62EAC16A4CE for ; Wed, 19 May 2004 11:43:43 -0700 (PDT) Received: from mail.mikehost.net (lvs-1.voxel.net [207.99.115.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8E4043D2D for ; Wed, 19 May 2004 11:43:42 -0700 (PDT) (envelope-from mike@mike2k.com) Received: by mail.mikehost.net (Postfix, from userid 502) id D48231BCA5; Wed, 19 May 2004 11:25:31 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.mikehost.net (Postfix) with ESMTP id D2B721BCA4 for ; Wed, 19 May 2004 11:25:31 -0700 (PDT) Date: Wed, 19 May 2004 11:25:31 -0700 (PDT) From: mike X-X-Sender: mike@sql01.internal.mikehost.net To: freebsd-amd64@freebsd.org In-Reply-To: <5.2.0.9.2.20040519104811.014f4620@mail.ojoink.com> Message-ID: References: <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <5.2.0.9.2.20040519104811.014f4620@mail.ojoink.com> mike: yes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 18:43:43 -0000 I would like to voice the same concern. I've been running some benchmarks on my system as well: http://mikehost.com/~mike/tmp/bench.htm As far as I know, it's always been libc_r - when I tried compiling MySQL with --use-pthread or whatever, it wouldn't compile. It's 5.2.1-RELEASE, and I read that it might not be working properly yet on that? I will be more than happy to try any patches (I compile my MySQL myself, not from ports), output from dmesg/logs, kernel configs, whatever. Just ask away. I'd love to get some sort of progress on this because I would love to be running an all-FreeBSD server cluster so I don't have to be mixing OS'es and distros and whatnot. Thanks in advance, mike On Wed, 19 May 2004, JG wrote: > At 10:29 AM 5/19/2004 -0700, you wrote: > >JG wrote this message on Wed, May 19, 2004 at 06:07 -0700: > > > At 04:53 PM 5/19/2004 +0400, you wrote: > > > >In first time you built MySQL statically. > > > >Now - dinamically. > > > > > > > >What results with statical linked MySQL ? > > > > > > > >JG wrote: > > > > > > Those results are in earlier posts of this thread. > > > > > > I compiled it dynamically to be sure that libpthreads was used. > > > (so I could use ldd against mysqld) > > > >There is a patch to make use of _SYSTEM scoped threads instead of > >process scoped threads for mysql mentioned ealier.. Also, if you > >use libmap to remap libpthread to libthr, you'll have similar > >results... > > Afaik, that patch has been made: > > $ more mysql40-server.diffs > Index: files/patch-libmysqld::lib_sql.cc > =================================================================== > RCS file: files/patch-libmysqld::lib_sql.cc > diff -N files/patch-libmysqld::lib_sql.cc > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/patch-libmysqld::lib_sql.cc 18 Feb 2004 21:42:20 -0000 > @@ -0,0 +1,11 @@ > +--- libmysqld/lib_sql.cc.orig Tue Feb 10 13:15:49 2004 > ++++ libmysqld/lib_sql.cc Wed Feb 18 16:41:40 2004 > +@@ -467,7 +467,7 @@ > + (void) pthread_attr_setdetachstate(&connection_attrib, > + PTHREAD_CREATE_DETACHED); > + pthread_attr_setstacksize(&connection_attrib,thread_stack); > +- pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM); > ++ pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_PROCESS); > + > + #if defined( SET_RLIMIT_NOFILE) || defined( OS2) > + /* connections and databases needs lots of files */ > Index: files/patch-sql::mysqld.cc > =================================================================== > RCS file: > /opt/FreeBSD/cvs/ports/databases/mysql40-server/files/patch-sql::mysqld.cc,v > > [* snip *] > > > > That's the patch you're talking about right? > > If the lines in the source files are supposed to read PTHREAD_SCOPE_SYSTEM > after the patch, then this patch was applied for all my 4.x benchmarks. > > I'm starting to think that my earlier results were ~ as good as it gets for > FreeBSD/AMD64 at this point. > > > > Any other suggestions? > > Or anyone on the AMD64 dev team want to take a stab at it? > > > > > > > > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" > From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 12:12:09 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 5C27516A4CE for ; Wed, 19 May 2004 12:12:09 -0700 (PDT) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2761C43D31 for ; Wed, 19 May 2004 12:12:09 -0700 (PDT) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id 245C78826; Wed, 19 May 2004 12:11:26 -0700 (PDT) From: Peter Wemm To: freebsd-amd64@freebsd.org, John-Mark Gurney Date: Wed, 19 May 2004 12:11:25 -0700 User-Agent: KMail/1.6.1 References: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com> In-Reply-To: <20040519172913.GU601@funkthat.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405191211.25786.peter@wemm.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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 19:12:09 -0000 On Wednesday 19 May 2004 10:29 am, John-Mark Gurney wrote: > JG wrote this message on Wed, May 19, 2004 at 06:07 -0700: > > At 04:53 PM 5/19/2004 +0400, you wrote: > > >In first time you built MySQL statically. > > >Now - dinamically. > > > > > >What results with statical linked MySQL ? > > > > > >JG wrote: > > > > Those results are in earlier posts of this thread. > > > > I compiled it dynamically to be sure that libpthreads was used. > > (so I could use ldd against mysqld) > > There is a patch to make use of _SYSTEM scoped threads instead of > process scoped threads for mysql mentioned ealier.. Also, if you > use libmap to remap libpthread to libthr, you'll have similar > results... Actually, the patch was the other way around. mysqld was running into limits of system scope threads, so the port has patches to turn it into process scope. It might be worth deleting the file from the port and rebuilding, just to see what happens. However.... > libpthread (aka libkse) is a design for M:N threads, and requires > the user of pthreads to create new system scoped threads to make > use of multiple cpu's... Not quite. The default N in the M:N case for libpthread 'ncpu'. pthread_getconcurrency()/pthread_setconcurrency() can check and change this. Of course, this is fine in theory - libpthread *should* be scheduling threads on all cpus at once. But the numbers earlier in the email thread suggest otherwise. So much for theory... BTW: your suggestion to try libthr isn't really helpful here. peter@daintree[12:01pm]~lib/libpthread/thread-255> ls /usr/lib/libthr* ls: No match. Somebody mentioned MD patches for libthr at one point, but I haven't seen them. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-amd64@FreeBSD.ORG Wed May 19 16:51:49 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 3F70016A4CE for ; Wed, 19 May 2004 16:51:49 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20BE343D1D for ; Wed, 19 May 2004 16:51:49 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 73582 invoked by uid 89); 19 May 2004 23:54:43 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 19 May 2004 23:54:43 -0000 Message-Id: <5.2.0.9.2.20040519164844.01521620@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 19 May 2004 16:50:22 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <200405191211.25786.peter@wemm.org> References: <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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2004 23:51:49 -0000 > > >Actually, the patch was the other way around. mysqld was running into >limits of system scope threads, so the port has patches to turn it into >process scope. It might be worth deleting the file from the port and >rebuilding, just to see what happens. More benchmarks: ----------------------------------------------------------------------------- FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 (-CURRENT above has ULE + KSE patch applied) With SCHED_ULE & debugging turned off in kernel. MySQL Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.0.20) with mysql40-server.diffs patch applied Port options: BUILD_OPTIMIZED=yes BUILD_STATIC=yes Compiled with libpthreads BENCHMARK RESULTS: Generating 500000 records... Creation of 500000 records took 174 seconds. Average of 2873.5632183908 records per second. Creating records for 10 seconds... Created 31407 records in 10 seconds. Average of 3140.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 20 seconds. Average of 2500 records per second. Creating random md5 hash records for 10 seconds... Created 25780 random records in 10 seconds. Average of 2578 records per second. Your databases overall average score is 2773.0658045977 records per second. ------- VMstat while running the first 20 seconds or so of the above benchmark (the entire benchmark takes ~4-5 mins to complete) $ vmstat -w 1 procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 am0 in sy cs us sy id 1 0 0 79952 1471012 2305 0 0 0 2015 0 0 0 2439 2132 3228 10 3 87 0 0 0 79952 1471012 9 0 0 0 0 0 0 0 2209 134 2166 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2200 116 2145 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2202 128 2157 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2200 116 2146 0 2 98 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2197 119 2145 0 0 99 0 0 0 79952 1471012 0 0 0 0 0 0 3 0 2206 123 2165 0 0 100 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2196 133 2145 0 2 98 0 0 0 79952 1471012 0 0 0 0 0 0 0 0 2198 124 2149 0 0 100 0 0 1 80080 1470696 6 0 0 0 4 0 0 0 11144 41239 28287 4 26 70 0 0 1 80080 1470376 0 0 0 0 0 0 0 0 16249 63630 43136 7 38 55 0 0 1 80080 1470056 0 0 0 0 0 0 0 0 15987 63224 42348 9 40 51 0 0 1 80080 1469720 0 0 0 0 0 0 0 0 16009 63758 42743 7 39 54 1 0 0 80080 1469400 0 0 0 0 0 0 0 0 15924 63779 42576 6 43 51 0 0 1 80080 1469064 0 0 0 0 0 0 0 0 16229 63525 43043 10 34 56 0 0 1 80080 1468744 0 0 0 0 0 0 0 0 15939 63532 42429 10 39 52 0 0 1 80080 1468408 0 0 0 0 0 0 0 0 16219 63701 43133 7 39 54 0 0 1 80080 1468088 0 0 0 0 0 0 0 0 15929 63655 42514 10 37 53 0 0 1 80080 1467752 0 0 0 0 0 0 0 0 16267 63411 43040 8 38 55 0 0 1 80080 1467448 0 0 0 0 0 0 0 0 15897 61412 41747 7 41 53 0 0 1 80080 1467112 0 0 0 0 0 0 0 0 16293 63671 43329 7 40 53 0 0 1 80080 1466792 0 0 0 0 0 0 0 0 16091 63579 42755 6 38 55 0 0 1 80080 1466472 0 0 0 0 0 0 0 0 16140 62336 42551 6 42 52 0 0 1 80080 1466136 0 0 0 0 0 0 0 0 15933 63654 42569 9 35 56 0 0 1 80080 1465816 0 0 0 0 0 0 0 0 15932 63689 42610 6 41 53 0 0 1 80080 1465496 0 0 0 0 0 0 0 0 16214 63570 43037 9 39 52 0 0 1 80080 1465160 0 0 0 0 0 0 0 0 15927 63784 42542 9 40 51 0 0 1 80080 1464840 0 0 0 0 0 0 0 0 15930 63751 42577 7 40 53 0 0 1 80080 1464504 0 0 0 0 0 0 0 0 15925 63669 42552 7 38 55 0 0 1 80080 1464184 0 0 0 0 0 0 1 0 15713 62515 41810 7 39 54 2 0 0 80080 1463864 339 0 0 0 231 0 0 0 15933 63646 43080 8 39 53 0 0 1 80080 1463528 0 0 0 0 0 0 0 0 16252 63792 43174 9 36 55 0 0 1 80080 1463208 0 0 0 0 0 0 0 0 16072 61651 42040 7 38 55 0 0 1 80080 1462888 0 0 0 0 0 0 3 0 15950 63525 42471 9 41 50 0 0 1 80080 1462568 0 0 0 0 0 0 0 0 16180 63925 43120 8 40 52 0 0 1 80080 1462232 0 0 0 0 0 0 4 0 15932 63626 42567 6 40 54 0 0 1 80080 1461912 0 0 0 0 8 0 4 0 15953 63424 42389 9 38 53 0 0 1 80080 1461576 0 0 0 0 0 0 0 0 15925 63610 42420 8 39 53 0 0 1 80080 1461256 0 0 0 0 0 0 0 0 15949 63724 42611 8 36 55 0 0 1 80080 1460936 0 0 0 0 4 0 0 0 15860 63235 42289 10 35 55 0 0 1 80080 1460600 0 0 0 0 0 0 0 0 15957 63481 42465 8 43 49 0 0 1 80080 1460280 0 0 0 0 0 0 0 0 15933 63744 42539 7 40 53 0 0 1 80080 1459944 0 0 0 0 0 0 0 0 15947 63791 42621 5 40 54 0 0 1 80080 1459624 0 0 0 0 0 0 0 0 16079 63462 42704 6 39 55 0 0 1 80080 1459304 0 0 0 0 0 0 0 0 16141 61707 42287 9 38 53 0 0 1 80080 1458968 0 0 0 0 0 0 0 0 15932 63744 42606 8 37 55 0 0 1 80080 1458648 0 0 0 0 0 0 0 0 15955 63724 42569 10 35 55 VS. ----------------------------------------------------------------------------- LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux Benchmark result summary: Generating 500000 records... Creation of 500000 records took 89 seconds. Average of 5617.9775280899 records per second. Creating records for 10 seconds... Created 50547 records in 10 seconds. Average of 5054.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 9 seconds. Average of 5555.5555555556 records per second. Creating random md5 hash records for 10 seconds... Created 50864 random records in 10 seconds. Average of 5086.4 records per second. Your databases overall average score is 5328.6582709114 records per second ----------------------------------------------------------------------------- Is SMP _really_ working for FreeBSD/AMD64? Nothing I do seems to improve the FreeBSD benchmarks here. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 04:21:41 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 F116B16A4CE for ; Thu, 20 May 2004 04:21:41 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E236343D1F for ; Thu, 20 May 2004 04:21:41 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 96201 invoked by uid 89); 20 May 2004 11:25:36 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 11:25:36 -0000 Message-Id: <5.2.0.9.2.20040520041642.03db2188@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 04:21:13 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040519164844.01521620@mail.ojoink.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 11:21:42 -0000 More benchmarks... My hardware is more than adequate for the my-huge.cnf configuration, so this time I used the my-huge.cnf for my /etc/my.cnf ... and my results were the worst I've seen so far. Go figure. ----------------------------------------------------------------------------- FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004 (-CURRENT above has the ULE + KSE patch applied) Kernel compiled with SCHED_ULE & debugging disabled. MySQL Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.0.20) with mysql40-server.diffs patch applied Port options: BUILD_OPTIMIZED=yes BUILD_STATIC=yes Compiled with libpthreads Using my-huge.cnf BENCHMARK RESULTS: Generating 500000 records... Creation of 500000 records took 202 seconds. Average of 2475.2475247525 records per second. Creating records for 10 seconds... Created 21396 records in 10 seconds. Average of 2139.6 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 22 seconds. Average of 2272.7272727273 records per second. Creating random md5 hash records for 10 seconds... Created 21591 random records in 10 seconds. Average of 2159.1 records per second. Your databases overall average score is 2261.6686993699 records per second. VS. ----------------------------------------------------------------------------- LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux Benchmark result summary: Generating 500000 records... Creation of 500000 records took 89 seconds. Average of 5617.9775280899 records per second. Creating records for 10 seconds... Created 50547 records in 10 seconds. Average of 5054.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 9 seconds. Average of 5555.5555555556 records per second. Creating random md5 hash records for 10 seconds... Created 50864 random records in 10 seconds. Average of 5086.4 records per second. Your databases overall average score is 5328.6582709114 records per second ----------------------------------------------------------------------------- From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 06:15:39 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 26E9B16A4CE; Thu, 20 May 2004 06:15:39 -0700 (PDT) Received: from smtp3b.sentex.ca (smtp3b.sentex.ca [205.211.164.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB63343D54; Thu, 20 May 2004 06:15:38 -0700 (PDT) (envelope-from tinderbox@freebsd.org) Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by smtp3b.sentex.ca (8.12.11/8.12.11) with ESMTP id i4KDFN9e092477; Thu, 20 May 2004 09:15:24 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by smtp1.sentex.ca (8.12.11/8.12.11) with ESMTP id i4KDFNf9054817; Thu, 20 May 2004 09:15:23 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: by freebsd-current.sentex.ca (Postfix, from userid 666) id 9A9C47303D; Thu, 20 May 2004 09:15:23 -0400 (EDT) Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Message-Id: <20040520131523.9A9C47303D@freebsd-current.sentex.ca> Date: Thu, 20 May 2004 09:15:23 -0400 (EDT) Subject: [current tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 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 13:15:39 -0000 TB --- 2004-05-20 11:33:51 - tinderbox 2.3 running on freebsd-current.sentex.ca TB --- 2004-05-20 11:33:51 - starting CURRENT tinderbox run for amd64/amd64 TB --- 2004-05-20 11:33:51 - checking out the source tree TB --- 2004-05-20 11:33:51 - cd /home/tinderbox/sandbox/CURRENT/amd64/amd64 TB --- 2004-05-20 11:33:51 - /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A src TB --- 2004-05-20 11:38:43 - building world (CFLAGS=-O2 -pipe) TB --- 2004-05-20 11:38:43 - cd /home/tinderbox/sandbox/CURRENT/amd64/amd64/src TB --- 2004-05-20 11:38:43 - /usr/bin/make -B buildworld >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -c /other/tinderbox/CURRENT/amd64/amd64/src/sys/geom/bde/g_bde_lock.c cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -o gbde gbde.o template.o rijndael-alg-fst.o rijndael-api-fst.o sha2.o g_bde_lock.o -lmd -lutil -lgeom gzip -cn /other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/gbde.8 > gbde.8.gz ===> sbin/geom ===> sbin/geom/core cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/../../../sys -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/.. -DCLASSDIR=\"/lib/geom\" -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/geom.c cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/../../../sys -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/.. -DCLASSDIR=\"/lib/geom\" -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c /other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/misc/subr.c make: don't know how to make /home/tinderbox/sandbox/CURRENT/amd64/amd64/obj/amd64/other/tinderbox/CURRENT/amd64/amd64/src/i386/lib/geom/libc.a. Stop *** Error code 2 Stop in /other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom. *** Error code 1 Stop in /other/tinderbox/CURRENT/amd64/amd64/src/sbin. *** Error code 1 Stop in /other/tinderbox/CURRENT/amd64/amd64/src. *** Error code 1 Stop in /other/tinderbox/CURRENT/amd64/amd64/src. *** Error code 1 Stop in /other/tinderbox/CURRENT/amd64/amd64/src. TB --- 2004-05-20 13:15:23 - WARNING: /usr/bin/make returned exit code 1 TB --- 2004-05-20 13:15:23 - ERROR: failed to build world TB --- 2004-05-20 13:15:23 - tinderbox aborted From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 06:44:50 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 43FAB16A4CE for ; Thu, 20 May 2004 06:44:50 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EA0A43D2D for ; Thu, 20 May 2004 06:44:49 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000222407.msg for ; Thu, 20 May 2004 14:41:16 +0100 Message-ID: <000501c43e70$a439b0c0$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: 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> Date: Thu, 20 May 2004 14:44:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Thu, 20 May 2004 14:41:16 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Thu, 20 May 2004 14:41:18 +0100 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 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 13:44:50 -0000 Maybe silly but have your tried the same box under i386 and possibly trying: WITH_LINUXTHREADS=yes also. Would be interesting to see the results. Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 09:01:22 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 AB18D16A4D1 for ; Thu, 20 May 2004 09:01:22 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B03443D1D for ; Thu, 20 May 2004 09:01:22 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 5958 invoked by uid 89); 20 May 2004 16:05:20 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 16:05:20 -0000 Message-Id: <5.2.0.9.2.20040520085802.015fc2d0@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 09:00:54 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <000501c43e70$a439b0c0$7b07000a@int.mediasurface.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 16:01:22 -0000 At 02:44 PM 5/20/2004 +0100, you wrote: >Maybe silly but have your tried the same box under i386 and possibly trying: >WITH_LINUXTHREADS=yes >also. Would be interesting to see the results. > > Steve Steve, Yeah I was thinking about this last night. What a shame that would be though huh? I'll give it a try a bit later and post the results. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 09:22:38 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 6B01F16A4CF; Thu, 20 May 2004 09:22:38 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD0BE43D48; Thu, 20 May 2004 09:22:37 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id F00CBACABE; Thu, 20 May 2004 18:22:34 +0200 (CEST) Date: Thu, 20 May 2004 18:22:34 +0200 From: Pawel Jakub Dawidek To: FreeBSD Tinderbox Message-ID: <20040520162234.GQ845@darkness.comp.waw.pl> References: <20040520131523.9A9C47303D@freebsd-current.sentex.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O7kBeCylzOklrtyI" Content-Disposition: inline In-Reply-To: <20040520131523.9A9C47303D@freebsd-current.sentex.ca> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: amd64@freebsd.org cc: current@freebsd.org Subject: Re: [current tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list 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 16:22:38 -0000 --O7kBeCylzOklrtyI Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2004 at 09:15:23AM -0400, FreeBSD Tinderbox wrote: +> [...] +> cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/../..= /sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -c /other/tinderbox= /CURRENT/amd64/amd64/src/sys/geom/bde/g_bde_lock.c +> cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/../..= /sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -o gbde gbde.o tem= plate.o rijndael-alg-fst.o rijndael-api-fst.o sha2.o g_bde_lock.o -lmd -lut= il -lgeom +> gzip -cn /other/tinderbox/CURRENT/amd64/amd64/src/sbin/gbde/gbde.8 > gbd= e.8.gz +> =3D=3D=3D> sbin/geom +> =3D=3D=3D> sbin/geom/core +> cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/= ../../../sys -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core -I/o= ther/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/.. -DCLASSDIR=3D\"/li= b/geom\" -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototy= pes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-= strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-= externs -Wredundant-decls -c /other/tinderbox/CURRENT/amd64/amd64/src/sbin/= geom/core/geom.c +> cc -O2 -pipe -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/= ../../../sys -I/other/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core -I/o= ther/tinderbox/CURRENT/amd64/amd64/src/sbin/geom/core/.. -DCLASSDIR=3D\"/li= b/geom\" -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototy= pes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-= strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-= externs -Wredundant-decls -c /other/tinderbox/CURRENT/amd64/amd64/src/sbin/= geom/misc/subr.c +> make: don't know how to make /home/tinderbox/sandbox/CURRENT/amd64/amd64= /obj/amd64/other/tinderbox/CURRENT/amd64/amd64/src/i386/lib/geom/libc.a. St= op +> *** Error code 2 [...] Fixed already, sorry guys. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --O7kBeCylzOklrtyI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFArNtKForvXbEpPzQRAtnqAKC3ub/+cSeMEW30boldOIjJ5aEaKgCcCDaA 5k+AHpeGs4e41JhqVCN/GGA= =v3pC -----END PGP SIGNATURE----- --O7kBeCylzOklrtyI-- From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 09:42:29 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 7EDA016A4CE for ; Thu, 20 May 2004 09:42:29 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0085543D46 for ; Thu, 20 May 2004 09:42:29 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000222850.msg for ; Thu, 20 May 2004 17:40:39 +0100 Message-ID: <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: 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> Date: Thu, 20 May 2004 17:44:12 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Thu, 20 May 2004 17:40:39 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Thu, 20 May 2004 17:40:40 +0100 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 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 16:42:29 -0000 Great minds... :) If you've gone to the trouble of installing i386 I wouldn't limit your tests to just WITH_LINUXTHREADS=yes, but also try pthreads as well it could be an AMD64 specific issue with pthreads implementation but I doubt it. Steve ----- Original Message ----- From: "JG" Yeah I was thinking about this last night. > > What a shame that would be though huh? > > I'll give it a try a bit later and post the results. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 09:53:27 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 8BD1316A4CE for ; Thu, 20 May 2004 09:53:27 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 444BE43D53 for ; Thu, 20 May 2004 09:53:27 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 7947 invoked by uid 89); 20 May 2004 16:57:39 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 16:57:39 -0000 Message-Id: <5.2.0.9.2.20040520094801.0436d208@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 09:53:14 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 16:53:27 -0000 At 05:44 PM 5/20/2004 +0100, you wrote: >Great minds... :) >If you've gone to the trouble of installing i386 I wouldn't limit your >tests to >just WITH_LINUXTHREADS=yes, but also try pthreads as well it could be >an AMD64 specific issue with pthreads implementation but I doubt it. Oh I definitely will. Actually it just finished installing and I'm building cvsup right now. Should I bring it up to -CURRENT first you think? It's a 5.2.1 disc from maybe a couple months ago. I'm almost wondering if I shouldn't have tried 4.9-STABLE first. 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. 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." From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 11:03:31 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 D5E2116A4CE for ; Thu, 20 May 2004 11:03:31 -0700 (PDT) Received: from mail.mikehost.net (lvs-1.voxel.net [207.99.115.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9433443D31 for ; Thu, 20 May 2004 11:03:31 -0700 (PDT) (envelope-from mike@mike2k.com) Received: by mail.mikehost.net (Postfix, from userid 502) id 3D9DF1BE88; Thu, 20 May 2004 10:39:01 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.mikehost.net (Postfix) with ESMTP id 3BF741BE87 for ; Thu, 20 May 2004 10:39:01 -0700 (PDT) Date: Thu, 20 May 2004 10:39:01 -0700 (PDT) From: mike X-X-Sender: mike@sql01.internal.mikehost.net To: freebsd-amd64@freebsd.org In-Reply-To: <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> Message-ID: References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@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> <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> mike: yes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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 18:03:31 -0000 i don't know if this is any idea - but why isnt something like linuxthreads ported to amd64? i would think with the 64-bit architecture, it could be even better than the i386 version. again, i am threading-retarded, so if getting linuxthreads working on freebsd 5.x on AMD64 is "not appropriate" because freebsd 5.x is supposed to have it's own better threading library now, then just ignore me; but it seems like linuxthreads has always been the fastest implementation on freebsd. i'd be willing to put $$ towards accelerating the effort to get mysql performance on freebsd 5.x AMD64 better. i don't know what the best setup is, but whatever needs to be done and a way to patch/reproduce it. i know that JG is interested in this [VERY MUCH], i am interested in this, and i believe i've seen another few posts of other people trying to figure this out as well... thanks, mike On Thu, 20 May 2004, Steven Hartland wrote: > Great minds... :) > If you've gone to the trouble of installing i386 I wouldn't limit your tests to > just WITH_LINUXTHREADS=yes, but also try pthreads as well it could be > an AMD64 specific issue with pthreads implementation but I doubt it. > > Steve > ----- Original Message ----- > From: "JG" > > Yeah I was thinking about this last night. > > > > What a shame that would be though huh? > > > > I'll give it a try a bit later and post the results. > > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. > > In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 > or return the E.mail to postmaster@multiplay.co.uk. > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" > From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 11:05:35 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 A82E816A4D0 for ; Thu, 20 May 2004 11:05:35 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BE3A43D41 for ; Thu, 20 May 2004 11:05:35 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4KI5Ys0028397; Thu, 20 May 2004 11:05:34 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4KI5YmP028396; Thu, 20 May 2004 11:05:34 -0700 Date: Thu, 20 May 2004 11:05:34 -0700 From: Brooks Davis To: mike Message-ID: <20040520180534.GA28248@Odin.AC.HMC.Edu> References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@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> <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i 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 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 18:05:35 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2004 at 10:39:01AM -0700, mike wrote: > i don't know if this is any idea - but why isnt something like > linuxthreads ported to amd64? i would think with the 64-bit architecture, > it could be even better than the i386 version. >=20 > again, i am threading-retarded, so if getting linuxthreads working on > freebsd 5.x on AMD64 is "not appropriate" because freebsd 5.x is supposed > to have it's own better threading library now, then just ignore me; but it > seems like linuxthreads has always been the fastest implementation on > freebsd. i'd be willing to put $$ towards accelerating the effort to get > mysql performance on freebsd 5.x AMD64 better. i don't know what the best > setup is, but whatever needs to be done and a way to patch/reproduce it. With libpthread and libthr, the linuxthreads port should be redundent. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFArPNtXY6L6fI4GtQRAsw8AJ9dS3LwsPjDrlDvW8epVmTLLVFzGgCg4+Ta yAPCoxm/77v7m6Yequ+9x4g= =OHnr -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 12:09:49 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 069F916A4CF for ; Thu, 20 May 2004 12:09:48 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB26A43D1D for ; Thu, 20 May 2004 12:09:48 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4KJ9ms0002730; Thu, 20 May 2004 12:09:48 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4KJ9iuX002727; Thu, 20 May 2004 12:09:44 -0700 Date: Thu, 20 May 2004 12:09:44 -0700 From: Brooks Davis To: mike Message-ID: <20040520190944.GA28688@Odin.AC.HMC.Edu> References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@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> <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> <20040520180534.GA28248@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i 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 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 19:09:49 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top post, is losses context.] On Thu, May 20, 2004 at 11:32:10AM -0700, mike wrote: > well i am not sure then if we're proving that statement wrong here then. >=20 > obviously there's still some incompatibilities or whomever is developing > the threading stuff in freebsd should be testing against mysql. >=20 > i need to setup a production mysql server soon, it will be a dual 1.8ghz > opteron, and i would love to run freebsd amd64 on it, but right now, it > wouldn't make sense if i could put mandrake linux on it and basically out > of the box outperform freebsd as much as 200%... I agree something isn't working, that's obvious from the results. That doesn't change the fact that linuxthreads is a gross hack that does something two system thread libs are supposed to do. Unless porting linuxthreads to amd64 is REALLY trivial, you would almost certaintly get more milege in the longterm working with the people on threads@ to find and fix the problems with our threading libaries or scheduler. Obvious things to do include building test cases that require minimal mysql knowlege. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFArQJ3XY6L6fI4GtQRAtCWAKDFTyE7awYvKgWeIAkLrGoXIFIpuACgi3py RSVCXa7r4zoHqO6pgQhnGNg= =Qgpm -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z-- From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 12:26:52 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 837CC16A4CE for ; Thu, 20 May 2004 12:26:52 -0700 (PDT) Received: from mail.mikehost.net (lvs-1.voxel.net [207.99.115.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2606943D41 for ; Thu, 20 May 2004 12:26:52 -0700 (PDT) (envelope-from mike@mike2k.com) Received: by mail.mikehost.net (Postfix, from userid 502) id 638721BE8A; Thu, 20 May 2004 11:32:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.mikehost.net (Postfix) with ESMTP id 61DFB1BE88; Thu, 20 May 2004 11:32:10 -0700 (PDT) Date: Thu, 20 May 2004 11:32:10 -0700 (PDT) From: mike X-X-Sender: mike@sql01.internal.mikehost.net To: Brooks Davis In-Reply-To: <20040520180534.GA28248@Odin.AC.HMC.Edu> Message-ID: References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.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> <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> <20040520180534.GA28248@Odin.AC.HMC.Edu> mike: yes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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 19:26:52 -0000 well i am not sure then if we're proving that statement wrong here then. obviously there's still some incompatibilities or whomever is developing the threading stuff in freebsd should be testing against mysql. i need to setup a production mysql server soon, it will be a dual 1.8ghz opteron, and i would love to run freebsd amd64 on it, but right now, it wouldn't make sense if i could put mandrake linux on it and basically out of the box outperform freebsd as much as 200%... On Thu, 20 May 2004, Brooks Davis wrote: > On Thu, May 20, 2004 at 10:39:01AM -0700, mike wrote: > > i don't know if this is any idea - but why isnt something like > > linuxthreads ported to amd64? i would think with the 64-bit architecture, > > it could be even better than the i386 version. > > > > again, i am threading-retarded, so if getting linuxthreads working on > > freebsd 5.x on AMD64 is "not appropriate" because freebsd 5.x is supposed > > to have it's own better threading library now, then just ignore me; but it > > seems like linuxthreads has always been the fastest implementation on > > freebsd. i'd be willing to put $$ towards accelerating the effort to get > > mysql performance on freebsd 5.x AMD64 better. i don't know what the best > > setup is, but whatever needs to be done and a way to patch/reproduce it. > > With libpthread and libthr, the linuxthreads port should be redundent. > > -- Brooks > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 12:33:40 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 C9F3416A4E8 for ; Thu, 20 May 2004 12:33:40 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F49F43D1F for ; Thu, 20 May 2004 12:33:38 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 14367 invoked by uid 89); 20 May 2004 19:37:37 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 19:37:37 -0000 Message-Id: <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 12:33:11 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <20040520190944.GA28688@Odin.AC.HMC.Edu> References: <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@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> <00a501c43e89$b39ed8b0$7b07000a@int.mediasurface.com> <20040520180534.GA28248@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 19:33:40 -0000 > >I agree something isn't working, that's obvious from the results. That >doesn't change the fact that linuxthreads is a gross hack that does >something two system thread libs are supposed to do. Unless porting >linuxthreads to amd64 is REALLY trivial, you would almost certaintly get >more milege in the longterm working with the people on threads@ to find >and fix the problems with our threading libaries or scheduler. Obvious >things to do include building test cases that require minimal mysql >knowlege. > >-- Brooks After I do my i386 OS / AMD64 hardware benchmarking tests, I'll post the results here and then a summary of all of this to freebsd-threads as it does seem to be becoming more of an issue for them than the AMD64 team. I guess we'll know that from the upcoming i386 benchmarks, how libpthreads is working for MySQL on either port. - JeremyG From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 13:37:37 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 C49D816A4CE for ; Thu, 20 May 2004 13:37:37 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 14C3143D58 for ; Thu, 20 May 2004 13:37:37 -0700 (PDT) (envelope-from Gregor.Bittel@GMX.de) Received: (qmail 13906 invoked by uid 65534); 20 May 2004 20:37:35 -0000 Received: from p3E9E21D4.dip.t-dialin.net (EHLO 2x_Xeon.BI) (62.158.33.212) by mail.gmx.net (mp002) with SMTP; 20 May 2004 22:37:35 +0200 X-Authenticated: #3119465 From: Gregor Bittel To: JG , freebsd-amd64@freebsd.org Date: Thu, 20 May 2004 22:37:23 +0200 User-Agent: KMail/1.5 References: <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> In-Reply-To: <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200405202235.46755.Gregor.Bittel@GMX.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 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 20:37:37 -0000 Hi, On Donnerstag, 20. Mai 2004 21:33 JG wrote: > After I do my i386 OS / AMD64 hardware benchmarking tests, I'll > post the results here and then a summary of all of this to > freebsd-threads as it does seem to be becoming more of an issue for > them than the AMD64 team. > > I guess we'll know that from the upcoming i386 benchmarks, how > libpthreads is working for MySQL on either port. Sure, I'm really off-topic now (don't hit me), but I have running MySQL on my workstation since a few weeks just for fun and testing for my small database. My setup is: Dual-Xeon 2,4GHz on a Tiger S2668AN running on 4.8-Release, 2GB memory, Mylex Raid-5 with 4x 18GB-Disks and with this MySQL-version: =>pkg_info | grep -i mysql mysql-client-3.23.55 Multithreaded SQL database (client) mysql-server-3.23.55 Multithreaded SQL database (server) p5-Mysql-modules-1.2216 Perl5 modules for accessing MySQL databases phpMyAdmin-2.3.2 A set of PHP-scripts to adminstrate MySQL I think it is _not_ comparable between the different MySQL-Versions, is it? This are the kernel-"tweaks" (not very interesting): machdep.cpu_idle_hlt=1 vfs.ioopt=1 and this are the results of mybench: Generating 500000 records... Creation of 500000 records took 50 seconds. Average of 10000 records per second. Creating records for 10 seconds... Created 94526 records in 10 seconds. Average of 9452.6 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 6 seconds. Average of 8333.33333333 records per second. Creating random md5 hash records for 10 seconds... Created 77027 random records in 10 seconds. Average of 7702.7 records per second. Your databases overall average score is 8872.15833333 records per second. @Jeremy: > Mine is the S2880UGNR which has the LSI SCSI chipset & allows > you to expand it to raid with the LSI Megaraid 320-0 zero channel > raid card. Ok, I see - but this one (S2880UGNR) isn't on the list[1], too :) If you are installing next time the 32Bit-Version, I will add both dmesgs+mptables, if I get it. -Gregor. -- Gregor.Bittel@GMX.de [1]= http://www.bnv-bamberg.de/home/ba3294/smp/index.htm From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 14:01:25 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 141F016A4CE for ; Thu, 20 May 2004 14:01:25 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E212B43D46 for ; Thu, 20 May 2004 14:01:24 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 17920 invoked by uid 89); 20 May 2004 21:05:38 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 21:05:38 -0000 Message-Id: <5.2.0.9.2.20040520135814.015d8d70@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 14:01:10 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <200405202235.46755.Gregor.Bittel@GMX.de> References: <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 21:01:25 -0000 > >and this are the results of mybench: >Generating 500000 records... >Creation of 500000 records took 50 seconds. >Average of 10000 records per second. >Creating records for 10 seconds... >Created 94526 records in 10 seconds. >Average of 9452.6 records per second. >Creating random 50000 md5 hash records. >Creation of 50000 random md5 hash inserts took 6 seconds. >Average of 8333.33333333 records per second. >Creating random md5 hash records for 10 seconds... >Created 77027 random records in 10 seconds. >Average of 7702.7 records per second. >Your databases overall average score is 8872.15833333 records per >second. I'd guess that you're running MyBench on the same machine that MySQL is on? All of my benchmarks have been ran from a separate server on the LAN connecting to the MySQL server. Mike got an overall average score of 12,000+ testing it locally. Test from another box on the LAN and let me know how it goes ;) - Jeremy From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 14:15:12 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 26AEB16A4CF for ; Thu, 20 May 2004 14:15:12 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B4D243D48 for ; Thu, 20 May 2004 14:15:12 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 18415 invoked by uid 89); 20 May 2004 21:19:25 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 21:19:25 -0000 Message-Id: <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 14:14:59 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040520135814.015d8d70@mail.ojoink.com> References: <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 21:15:12 -0000 Well... here's my first AMD64 hardware on i386 results using linuxthreads. amd32f# uname -a FreeBSD amd32f.attbi.com 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004 amd32f# /usr/local/libexec/mysqld --version /usr/local/libexec/mysqld Ver 4.1.1-alpha for portbld-freebsd5.2 on i386 (FreeBSD port: mysql-server-4.1.1_2) amd32f# ldd /usr/local/libexec/mysqld /usr/local/libexec/mysqld: liblthread.so.3 => /usr/local/lib/liblthread.so.3 (0x2848f000) liblstdc++.so.4 => /usr/local/lib/liblstdc++.so.4 (0x284b4000) libz.so.2 => /lib/libz.so.2 (0x28570000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x2857e000) libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28597000) libm.so.2 => /lib/libm.so.2 (0x28653000) libc.so.5 => /lib/libc.so.5 (0x2866c000) Port options: BUILD_OPTIMIZED=yes Benchmark results: Generating 500000 records... Creation of 500000 records took 164 seconds. Average of 3048.7804878049 records per second. Creating records for 10 seconds... Created 28176 records in 10 seconds. Average of 2817.6 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 18 seconds. Average of 2777.7777777778 records per second. Creating random md5 hash records for 10 seconds... Created 27379 random records in 10 seconds. Average of 2737.9 records per second. Your databases overall average score is 2845.5145663957 records per second. Not the worst among the FreeBSD benchmarks, not the best - but still very bad compared to my Linux results :( Btw, while it was running and I did a ps -H, there was only one MySQL process listed. If I did a ps aux, there were (and still are) 12. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 14:40:56 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 82F3716A4CE for ; Thu, 20 May 2004 14:40:56 -0700 (PDT) Received: from omega.metrics.com (internal.metrics.com [204.138.110.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id B71D543D45 for ; Thu, 20 May 2004 14:40:50 -0700 (PDT) (envelope-from tomh@waterloo.equitrac.com) Received: from syncro.metrics.com ([192.168.96.20]) by omega.metrics.com (8.12.9/8.12.9) with ESMTP id i4KLjjH7000401 for ; Thu, 20 May 2004 17:45:45 -0400 (EDT) (envelope-from tomh@waterloo.equitrac.com) Received: by SYNCRO with Internet Mail Service (5.5.2653.19) id ; Thu, 20 May 2004 17:38:34 -0400 Message-ID: From: "Haapanen, Tom" To: freebsd-amd64@freebsd.org Date: Thu, 20 May 2004 17:38:31 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.66n X-Spam-Flag: NO X-Scanned-By: milter-spamc/0.14.238 (omega [192.168.96.200]); pass=YES; Thu, 20 May 2004 17:45:46 -0400 X-Spam-Status: NO, hits=-100.00 required=5.00 X-Spam-Level: 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 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 21:40:56 -0000 John-Mark Gurney [mailto:gurney_j@efn.org]: > 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... Right. Looking at my production server (dual Opteron 242) it looks like I have essentially been running MySQL on a single CPU, too, based on the ps output: root 11 0 0 0 RL ?? 61050:34.15 (idle: cpu1) root 12 0 0 0 RL ?? 65468:56.13 (idle: cpu0) The idle time in the ps output should conclusively prove to JG, too, whether both CPUs are actually being utilized. It sure doesn't look like the CPU time is evenly distributed across the two processors -- it looks like MySQL is running on CPU1 only. I'm happy to provide access to the box if that will help someone figure out what's going on with the threading. Tom From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 16:01:13 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 B1BDC16A4CE for ; Thu, 20 May 2004 16:01:13 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E4BD43D31 for ; Thu, 20 May 2004 16:01:13 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i4KN1CqM016738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2004 19:01:12 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i4KN115w028670; Thu, 20 May 2004 19:01:01 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16557.14509.453199.165108@grasshopper.cs.duke.edu> Date: Thu, 20 May 2004 19:01:01 -0400 (EDT) To: JG In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 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 23:01:13 -0000 JG writes: > The benchmarks were done from a remote server on the LAN, using myBench. > Unfortunately, myBench doesn't seem to simulate actual real-world user loads. > Super-smack does, but I ran into problems compiling it, and then more when > trying > to use it remotely. Super-smack-1.3 is supposed to be coming out soon, > hopefully > it will fix some of these problems. > Can you describe in more detail the network configuration? Is it a gigabit link? If so, have you compared just the network performance between FreeBSD and Linux on this box, using the host you're running myBench on? Try the netperf port.. A recent posting in -net suggests there may be some network performance problems on amd64 (or it could have just been the tester's machine). (http://lists.FreeBSD.org/pipermail/freebsd-net/2004-May/004034.html) Drew From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 16:44:54 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 1DCD016A4D2 for ; Thu, 20 May 2004 16:44:53 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA0D043D46 for ; Thu, 20 May 2004 16:44:53 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 24359 invoked by uid 89); 20 May 2004 23:48:51 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 20 May 2004 23:48:51 -0000 Message-Id: <5.2.0.9.2.20040520164054.04317628@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 20 May 2004 16:44:24 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <16557.14509.453199.165108@grasshopper.cs.duke.edu> References: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 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 23:44:54 -0000 > >Can you describe in more detail the network configuration? Is it a >gigabit link? > >If so, have you compared just the network performance between FreeBSD >and Linux on this box, using the host you're running myBench on? Try >the netperf port.. > >A recent posting in -net suggests there may be some network >performance problems on amd64 (or it could have just been the tester's >machine). >(http://lists.FreeBSD.org/pipermail/freebsd-net/2004-May/004034.html) > >Drew Drew, It's only a 100mbit connection. I can try netperf a little later... but I had to wipe the mandrake install in order to do the the i386 FreeBSD install, so I'm temporarily unable to test Linux anymore. Anyway I think it's pointing to probably a threading and/or SMP issue, but I'll definitely test network performance between the two as well. - Jeremy From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 16:57:03 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 B9C0316A4CE for ; Thu, 20 May 2004 16:57:03 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D3E743D1D for ; Thu, 20 May 2004 16:57:03 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000223708.msg for ; Fri, 21 May 2004 00:54:17 +0100 Message-ID: <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: References: <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> Date: Fri, 21 May 2004 00:55:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 00:54:17 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 00:54:18 +0100 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 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 23:57:03 -0000 Ok some results for the pile: Server spec: CPU: AMD Opteron(tm) Processor 248 (2193.17-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0xf58 Stepping = 8 Features=0x78bfbff AMD Features=0xe0500000 real memory = 4227268608 (4031 MB) avail memory = 4113244160 (3922 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 FreeBSD freebsd32 5.2.1-RELEASE-p6 FreeBSD 5.2.1-RELEASE-p6 #1: Mon May 10 05:14:51 BST 2004 root@freebsd32:/usr/src/sys/i386/compile/MPUK_SMP_200HZ i386 mysql40 built using: make BUILD_OPTIMIZED=yes BUILD_STATIC=yes; make install Local test: Generating 500000 records... Creation of 500000 records took 21 seconds. Average of 23809.523809524 records per second. Creating records for 10 seconds... Created 231597 records in 10 seconds. Average of 23159.7 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 2 seconds. Average of 25000 records per second. Creating random md5 hash records for 10 seconds... Created 186818 random records in 10 seconds. Average of 18681.8 records per second. Your databases overall average score is 22662.755952381 records per second. remote test1: FreeBSD yoda.multiplay.co.uk 5.1-RELEASE-p14 FreeBSD 5.1-RELEASE-p14 #1: Wed Mar 10 21:26:06 GMT 2004 root@yoda.multiplay.co.uk:/usr/src/sys/i386/compile/YODA i386 Generating 500000 records... Creation of 500000 records took 248 seconds. Average of 2016.1290322581 records per second. Creating records for 10 seconds... Created 18406 records in 10 seconds. Average of 1840.6 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 27 seconds. Average of 1851.8518518519 records per second. Creating random md5 hash records for 10 seconds... Created 17930 random records in 10 seconds. Average of 1793 records per second. Your databases overall average score is 1875.3952210275 records per second. remote test2 P4 2.4Ghz WinXP @ 100Mb: Generating 500000 records... Creation of 500000 records took 191 seconds. Average of 2617.80104712 records per second. Creating records for 10 seconds... Created 23486 records in 10 seconds. Average of 2348.6 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 19 seconds. Average of 2631.57894737 records per second. Creating random md5 hash records for 10 seconds... Created 24087 random records in 10 seconds. Average of 2408.7 records per second. Your databases overall average score is 2501.66999862 records per second remote test2 P4 2.4Ghz WinXP @ 1Gb Generating 500000 records... Creation of 500000 records took 145 seconds. Average of 3448.27586207 records per second. Creating records for 10 seconds... Created 34275 records in 10 seconds. Average of 3427.5 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 15 seconds. Average of 3333.33333333 records per second. Creating random md5 hash records for 10 seconds... Created 29175 random records in 10 seconds. Average of 2917.5 records per second. Your databases overall average score is 3281.65229885 records per second. local again removing $end = time() from 500000 loop: Generating 500000 records... Creation of 500000 records took 19 seconds. Average of 26315.789473684 records per second. Creating records for 10 seconds... Created 212340 records in 10 seconds. Average of 21234 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 2 seconds. Average of 25000 records per second. Creating random md5 hash records for 10 seconds... Created 187897 random records in 10 seconds. Average of 18789.7 records per second. Your databases overall average score is 22834.872368421 records per second. While running the remote tests the cpu load on the AMD never went above 15% packets per second peaked on the Gig crossover test @ 3500 Conclusion there is a major IO bottleneck here somewhere. Steve / K ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 17:36:31 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 95C7116A4CE for ; Thu, 20 May 2004 17:36:31 -0700 (PDT) Received: from plewe.is.tsukuba.ac.jp (plewe.is.tsukuba.ac.jp [130.158.81.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id B16AE43D31 for ; Thu, 20 May 2004 17:36:30 -0700 (PDT) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: from plewe.is.tsukuba.ac.jp (localhost [127.0.0.1]) i4L0fUaa008046 for ; Fri, 21 May 2004 09:41:30 +0900 (JST) (envelope-from till@plewe.is.tsukuba.ac.jp) Received: (from till@localhost) by plewe.is.tsukuba.ac.jp (8.12.11/8.12.11/Submit) id i4L0fTve008045 for freebsd-amd64@freebsd.org; Fri, 21 May 2004 09:41:29 +0900 (JST) (envelope-from till) Date: Fri, 21 May 2004 09:41:29 +0900 From: Till Plewe To: freebsd-amd64@freebsd.org Message-ID: <20040521004129.GA8015%till@score.is.tsukuba.ac.jp> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i 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: till@score.is.tsukuba.ac.jp List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 00:36:31 -0000 On Thu, May 20, 2004 at 05:38:31PM -0400, Haapanen, Tom wrote: > John-Mark Gurney [mailto:gurney_j@efn.org]: > > 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... > > Right. Looking at my production server (dual Opteron 242) it looks like I > have essentially been running MySQL on a single CPU, too, based on the ps > output: > > root 11 0 0 0 RL ?? 61050:34.15 (idle: cpu1) > root 12 0 0 0 RL ?? 65468:56.13 (idle: cpu0) > > The idle time in the ps output should conclusively prove to JG, too, whether > both CPUs are actually being utilized. > > It sure doesn't look like the CPU time is evenly distributed across the two > processors -- it looks like MySQL is running on CPU1 only. > > I'm happy to provide access to the box if that will help someone figure out > what's going on with the threading. > > Tom Are you running SCHED_ULE? I had a similar problem which vanished when I switched back to SCHED_4BSD. - Till From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 17:45:47 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 7641716A4CE for ; Thu, 20 May 2004 17:45:47 -0700 (PDT) Received: from omega.metrics.com (internal.metrics.com [204.138.110.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E04143D1F for ; Thu, 20 May 2004 17:45:47 -0700 (PDT) (envelope-from tomh@waterloo.equitrac.com) Received: from syncro.metrics.com ([192.168.96.20]) by omega.metrics.com (8.12.9/8.12.9) with ESMTP id i4L0ofH7006569; Thu, 20 May 2004 20:50:41 -0400 (EDT) (envelope-from tomh@waterloo.equitrac.com) Received: by SYNCRO with Internet Mail Service (5.5.2653.19) id ; Thu, 20 May 2004 20:43:31 -0400 Message-ID: From: "Haapanen, Tom" To: "'till@score.is.tsukuba.ac.jp'" , freebsd-amd64@freebsd.org Date: Thu, 20 May 2004 20:43:24 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.66n X-Spam-Flag: NO X-Scanned-By: milter-spamc/0.14.238 (omega [192.168.96.200]); pass=YES; Thu, 20 May 2004 20:50:42 -0400 X-Spam-Status: NO, hits=-100.00 required=5.00 X-Spam-Level: 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 00:45:47 -0000 Till Plewe [mailto:till@score.is.tsukuba.ac.jp] > Are you running SCHED_ULE? I had a similar problem > which vanished when I switched back to SCHED_4BSD. 5.2-RELEASE appears to have a default of SCHED_4BSD in the generic kernel (which is what I'm running). Now, admittedly, I can't remember any more how I configured the MySQL threading ... Tom From owner-freebsd-amd64@FreeBSD.ORG Thu May 20 21:27:54 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 0C3FD16A4CE for ; Thu, 20 May 2004 21:27:54 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 642B143D45 for ; Thu, 20 May 2004 21:27:53 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from vader ([212.135.219.179]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000223960.msg for ; Fri, 21 May 2004 05:25:54 +0100 Message-ID: <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> From: "Steven Hartland" To: References: <200405202235.46755.Gregor.Bittel@GMX.de><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> Date: Fri, 21 May 2004 05:27:36 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 05:25:54 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 212.135.219.179 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 05:25:59 +0100 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 04:27:54 -0000 Ok its IO (netcard drivers). TBH after looking at this benchmarker I'd say its pretty useless its testing packet throughput / rpc time not the database. Typical db load is not all insert statements its not even mostly insert statements its selects. Saying that there's some startling results below. Exec summary: FreeBSD 5.1.2 (i386) local: 22834.872368421 records per second fxp 100Mb: 3854.06863517 records per second bge 100Mb: 2501.66999862 records per second bge 1Gb: 3281.65229885 records per second Suse 9.0 2.4.21 (i386) local: 20590.4046296 records per second. fxp(eepro100) 100Mb: 3983.5561828 records per second bge(tg3) 100Mb: 3964.27682927 records per second bge(tg3) 1Gb: 3890.86629073 records per second Windows XP local: 12510.2486842 records per second fxp 100Mb: 1899.47114625 records per second bge 100Mb: 3888.25416667 records per second bge 1Gb: 3944.39166667 records per second The rest of the details: same machine but with an fxp not bge interrupts / s hitting 4K: Generating 500000 records... Creation of 500000 records took 127 seconds. Average of 3937.00787402 records per second. Creating records for 10 seconds... Created 37323 records in 10 seconds. Average of 3732.3 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 12 seconds. Average of 4166.66666667 records per second. Creating random md5 hash records for 10 seconds... Created 35803 random records in 10 seconds. Average of 3580.3 records per second. Your databases overall average score is 3854.06863517 records per second. with link0 set interrupts / s 2K: fxp0: Microcode loaded, int_delay: 1000 usec bundle_max: 0 Generating 500000 records... Creation of 500000 records took 250 seconds. Average of 2000 records per second. Creating records for 10 seconds... Created 16862 records in 10 seconds. Average of 1686.2 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 25 seconds. Average of 2000 records per second. Creating random md5 hash records for 10 seconds... Created 17961 random records in 10 seconds. Average of 1796.1 records per second. Your databases overall average score is 1870.575 records per second. Without link0 polling enabled 1000HZ The specified CGI application exceeded the allowed time for processing. The server has deleted the process. So slow :P And out of total curiosity Windows XP fxp 100Mb: Generating 500000 records... Creation of 500000 records took 253 seconds. Average of 1976.28458498 records per second. Creating records for 10 seconds... Created 17879 records in 10 seconds. Average of 1787.9 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 25 seconds. Average of 2000 records per second. Creating random md5 hash records for 10 seconds... Created 18337 random records in 10 seconds. Average of 1833.7 records per second. Your databases overall average score is 1899.47114625 records per second. Windows XP bge 100Mb: Generating 500000 records... Creation of 500000 records took 128 seconds. Average of 3906.25 records per second. Creating records for 10 seconds... Created 37393 records in 10 seconds. Average of 3739.3 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 12 seconds. Average of 4166.66666667 records per second. Creating random md5 hash records for 10 seconds... Created 37408 random records in 10 seconds. Average of 3740.8 records per second. Your databases overall average score is 3888.25416667 records per second. Windows XP bge 1Gb: Generating 500000 records... Creation of 500000 records took 125 seconds. Average of 4000 records per second. Creating records for 10 seconds... Created 38559 records in 10 seconds. Average of 3855.9 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 12 seconds. Average of 4166.66666667 records per second. Creating random md5 hash records for 10 seconds... Created 37550 random records in 10 seconds. Average of 3755 records per second. Your databases overall average score is 3944.39166667 records per second. and locally: Generating 500000 records... Creation of 500000 records took 38 seconds. Average of 13157.8947368 records per second. Creating records for 10 seconds... Created 123769 records in 10 seconds. Average of 12376.9 records per second. Creating random 50000 md5 hash records. Creation of 50000 random md5 hash inserts took 4 seconds. Average of 12500 records per second. Creating random md5 hash records for 10 seconds... Created 120062 random records in 10 seconds. Average of 12006.2 records per second. Your databases overall average score is 12510.2486842 records per second. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 02:47:42 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 0FF6616A509 for ; Fri, 21 May 2004 02:47:40 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5698243D49 for ; Fri, 21 May 2004 02:47:39 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000224385.msg for ; Fri, 21 May 2004 10:45:10 +0100 Message-ID: <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: "mike" References: <200405202235.46755.Gregor.Bittel@GMX.de><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> Date: Fri, 21 May 2004 10:48:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 10:45:10 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 10:45:15 +0100 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 09:47:42 -0000 With mybench it wont is a purely sequential test which has no concurrency so will only ever use 1 cpu / thread in the db. Steve / K > IMHO, i don't trust mybench for results. i only rely on the > "run-all-tests" that comes with the sql-bench scripts with mysql source. > > i'm sure there are plenty of things you could change in your PHP setup, > network setup, etc. that could lskew the results. > > what we need first is to figure out how to get the threading/whatnot to > work properly even running locally on the same machine. if it doesn't work > properly there, it wont' work properly when stressed over the network. > save that for the next stage. > > i'm willing to give access to my machine for anyone to > compile/configure/etc. and also willing to pitch some money to whomever > can help resolve this issue. getting this to work with good performance > means a lot to me. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 02:50:39 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 CFBDC16A4CF for ; Fri, 21 May 2004 02:50:39 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95E8A43D4C for ; Fri, 21 May 2004 02:50:39 -0700 (PDT) (envelope-from gofda-freebsd-amd64@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BR6fN-0004Ra-00 for ; Fri, 21 May 2004 11:50:17 +0200 Received: from 213.41.133.51 ([213.41.133.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 May 2004 11:50:13 +0200 Received: from bevand_m by 213.41.133.51 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 May 2004 11:50:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-amd64@freebsd.org From: Marc Bevand Date: Wed, 19 May 2004 16:52:59 +0200 Lines: 16 Message-ID: References: <5.2.0.9.2.20040518170424.03c42748@mail.ojoink.com> <200405181359.18291.peter@wemm.org> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com> <5.2.0.9.2.20040519044815.0156fbb8@mail.ojoink.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213.41.133.51 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040326 X-Accept-Language: en-us, en In-Reply-To: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> Sender: news 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 09:50:40 -0000 JG wrote: > > Also tried with the MySQL 5.0.0a port, same results basically: > [...] > ----------------------------------------------------------------------------- > > LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation > MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) > [...] You don't seem to have tried what another guy suggested: to use the 4.0.18 version on freebsd. Can you try it ? -- Marc Bevand http://www.epita.fr/~bevand_m Computer Science School EPITA - System, Network and Security Dept. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 04:07:22 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 A1DBE16A4CE for ; Fri, 21 May 2004 04:07:22 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 701FA43D1D for ; Fri, 21 May 2004 04:07:22 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 45142 invoked by uid 89); 21 May 2004 11:11:32 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 21 May 2004 11:11:32 -0000 Message-Id: <5.2.0.9.2.20040521035925.01463f88@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 21 May 2004 04:07:01 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> References: <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 11:07:22 -0000 At 10:48 AM 5/21/2004 +0100, you wrote: >With mybench it wont is a purely sequential test which has no concurrency >so will only ever use 1 cpu / thread in the db. > > Steve / K Ahh that makes sense I guess. Ok, time to see if JeremyZ will fix some of the Super-Smack compile problems on FreeBSD. About a month ago he said a 1.3 would be coming out very soon. I'll start posting benchmarks from Super-Smack over the network. Super-smack is here btw: http://jeremy.zawodny.com/mysql/super-smack/ If you download it, first thing to do is in client.cc change __FreeBSD to __FreeBSD__ to avoid the ERESTART compile failure. Regardless, I still think my inital MyBench results were an indication of significant performance loss Vs. (Mandrake) Linux no? Even if it is related to the NIC driver, it should be a cause for concern since the test systems and method was exactly the same. - JeremyG From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 07:25:32 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 7CB7B16A4CE for ; Fri, 21 May 2004 07:25:32 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7029243D1D for ; Fri, 21 May 2004 07:25:32 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 50845 invoked by uid 89); 21 May 2004 14:29:26 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 21 May 2004 14:29:26 -0000 Message-Id: <5.2.0.9.2.20040521071750.0152ac40@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 21 May 2004 07:24:52 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040521035925.01463f88@mail.ojoink.com> References: <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 14:25:32 -0000 More benchmarks... This time using super-smack. -------------------------------------------------------------------- SERVER CONFIG: ** FreeBSD i386 ** amd32f# uname -a FreeBSD 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004 Using Generic release Kernel MySQL: Ver 4.1.1-alpha for portbld-freebsd5.2 on i386 (FreeBSD port: mysql-server-4.1.1_2) MySQL Port options: BUILD_OPTIMIZED=yes MySQL compiled with linuxthreads: liblthread.so.3 => /usr/local/lib/liblthread.so.3 --------------------------------------------------------------------- Each benchmark ran 4 times and highest was shown. --------------------------------------------------------------------- Benchmark results: LOCAL: - Using default mysql config settings (empty/missing my.cnf) - Using SCHED_4BSD kernel amd32f# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=19ms min=12ms avg= 14ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 9 0 2589.28 update_index 300000 7 0 2589.28 - Using my-huge.cnf w/mysql.sock - Using SCHED_4BSD kernel amd32f# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=63ms min=13ms avg= 35ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 11 0 2369.88 update_index 300000 7 0 2369.88 REMOTE (Over 100mbit LAN dc0 to bge0): - Using default mysql config settings (empty/missing my.cnf) - Using SCHED_4BSD kernel devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=1431ms min=17ms avg= 731ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 10 0 2091.10 update_index 300000 4 0 2091.10 - Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented - Using SCHED_4BSD kernel devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=817ms min=37ms avg= 326ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 2 0 3718.13 update_index 300000 9 0 3718.13 *Note1: ps -H only shows 1 mysql line during test. *Note2: vmstat -w 1 ID's ~20 during this test. -------------------------------------------------------------------- SERVER CONFIG: ** FreeBSD AMD64 ** amd64f# uname -a FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Wed May 19 03:37:58 PDT 2004 Without -CURRENT debugging in kernel. MySQL: Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.0.20) With mysql-server40.diffs With libpthreads BUILD_OPTIMIZED=yes BUILD_STATIC=yes --------------------------------------------------------------------- Each benchmark ran 4 times and highest was shown. --------------------------------------------------------------------- Benchmark results: REMOTE (Over 100mbit LAN dc0 to bge0): - Using default mysql config settings (empty/missing my.cnf) w/mysql.sock unc# - Using SCHED_ULE devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=18ms min=1ms avg= 6ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 12 0 1672.22 update_index 300000 7 0 1672.22 *Note1: ps -H only shows 1 mysql line during test. *Note2: vmstat -w 1 ID's ~50 during this test. - Using default mysql config settings (empty/missing my.cnf) w/mysql.sock unc# - Using SCHED_4BSD devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=28ms min=2ms avg= 16ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 7 0 2685.53 update_index 300000 5 0 2685.53 *Note1: ps -H only shows 1 mysql line during test. *Note2: vmstat -w 1 ID's jump around between 20-50 during this test. - Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented - Using SCHED_ULE kernel devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=36ms min=1ms avg= 15ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 2 0 2813.09 update_index 300000 10 0 2813.09 *Note1: ps -H only shows 1 mysql line during test. *Note2: vmstat -w 1 ID's ~12 during this test. - Using my-huge.cnf w/mysql.sock lines in update-select.smack uncommented - Using SCHED_4BSD kernel devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=34ms min=1ms avg= 16ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 4 0 3229.12 update_index 300000 8 0 3229.12 *Note1: ps -H only shows 1 mysql line during test. *Note2: vmstat -w 1 ID's jump around between 20-50 during this test. As you can see, so far, the best results on the FreeBSD testing of this AMD64 hardware came from a 32-bit i386 install using MySQL compiled with Linuxthreads. Going to try to test Mandrake Linux again next, but I have to reinstall it first. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 08:10:14 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 EE09E16A4CE for ; Fri, 21 May 2004 08:10:14 -0700 (PDT) Received: from mail.mikehost.net (lvs-1.voxel.net [207.99.115.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id A556843D41 for ; Fri, 21 May 2004 08:10:14 -0700 (PDT) (envelope-from mike@mike2k.com) Received: by mail.mikehost.net (Postfix, from userid 502) id A62D41C0E6; Thu, 20 May 2004 21:40:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.mikehost.net (Postfix) with ESMTP id A408F1C0E4; Thu, 20 May 2004 21:40:17 -0700 (PDT) Date: Thu, 20 May 2004 21:40:17 -0700 (PDT) From: mike X-X-Sender: mike@sql01.internal.mikehost.net To: Steven Hartland In-Reply-To: <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> Message-ID: References: <200405202235.46755.Gregor.Bittel@GMX.de><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> mike: yes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 15:10:15 -0000 On Fri, 21 May 2004, Steven Hartland wrote: > Ok its IO (netcard drivers). > TBH after looking at this benchmarker I'd say its pretty useless > its testing packet throughput / rpc time not the database. > > Typical db load is not all insert statements its not even mostly > insert statements its selects. Saying that there's some startling results > below. > Exec summary: > FreeBSD 5.1.2 (i386) > local: 22834.872368421 records per second > fxp 100Mb: 3854.06863517 records per second > bge 100Mb: 2501.66999862 records per second > bge 1Gb: 3281.65229885 records per second > > Suse 9.0 2.4.21 (i386) > local: 20590.4046296 records per second. > fxp(eepro100) 100Mb: 3983.5561828 records per second > bge(tg3) 100Mb: 3964.27682927 records per second > bge(tg3) 1Gb: 3890.86629073 records per second > > Windows XP > local: 12510.2486842 records per second > fxp 100Mb: 1899.47114625 records per second > bge 100Mb: 3888.25416667 records per second > bge 1Gb: 3944.39166667 records per second > > > The rest of the details: > > same machine but with an fxp not bge > interrupts / s hitting 4K: > Generating 500000 records... > Creation of 500000 records took 127 seconds. > Average of 3937.00787402 records per second. > Creating records for 10 seconds... > Created 37323 records in 10 seconds. > Average of 3732.3 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 12 seconds. > Average of 4166.66666667 records per second. > Creating random md5 hash records for 10 seconds... > Created 35803 random records in 10 seconds. > Average of 3580.3 records per second. > > Your databases overall average score is 3854.06863517 records per second. > > with link0 set interrupts / s 2K: > fxp0: Microcode loaded, int_delay: 1000 usec bundle_max: 0 > Generating 500000 records... > Creation of 500000 records took 250 seconds. > Average of 2000 records per second. > Creating records for 10 seconds... > Created 16862 records in 10 seconds. > Average of 1686.2 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 25 seconds. > Average of 2000 records per second. > Creating random md5 hash records for 10 seconds... > Created 17961 random records in 10 seconds. > Average of 1796.1 records per second. > > Your databases overall average score is 1870.575 records per second. > > Without link0 polling enabled 1000HZ > The specified CGI application exceeded the allowed time for processing. > The server has deleted the process. So slow :P > > And out of total curiosity Windows XP fxp 100Mb: > Generating 500000 records... > Creation of 500000 records took 253 seconds. > Average of 1976.28458498 records per second. > Creating records for 10 seconds... > Created 17879 records in 10 seconds. > Average of 1787.9 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 25 seconds. > Average of 2000 records per second. > Creating random md5 hash records for 10 seconds... > Created 18337 random records in 10 seconds. > Average of 1833.7 records per second. > > Your databases overall average score is 1899.47114625 records per second. > > Windows XP bge 100Mb: > Generating 500000 records... > Creation of 500000 records took 128 seconds. > Average of 3906.25 records per second. > Creating records for 10 seconds... > Created 37393 records in 10 seconds. > Average of 3739.3 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 12 seconds. > Average of 4166.66666667 records per second. > Creating random md5 hash records for 10 seconds... > Created 37408 random records in 10 seconds. > Average of 3740.8 records per second. > > Your databases overall average score is 3888.25416667 records per second. > > Windows XP bge 1Gb: > Generating 500000 records... > Creation of 500000 records took 125 seconds. > Average of 4000 records per second. > Creating records for 10 seconds... > Created 38559 records in 10 seconds. > Average of 3855.9 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 12 seconds. > Average of 4166.66666667 records per second. > Creating random md5 hash records for 10 seconds... > Created 37550 random records in 10 seconds. > Average of 3755 records per second. > > Your databases overall average score is 3944.39166667 records per second. > > and locally: > Generating 500000 records... > Creation of 500000 records took 38 seconds. > Average of 13157.8947368 records per second. > Creating records for 10 seconds... > Created 123769 records in 10 seconds. > Average of 12376.9 records per second. > Creating random 50000 md5 hash records. > Creation of 50000 random md5 hash inserts took 4 seconds. > Average of 12500 records per second. > Creating random md5 hash records for 10 seconds... > Created 120062 random records in 10 seconds. > Average of 12006.2 records per second. > > Your databases overall average score is 12510.2486842 records per second. > IMHO, i don't trust mybench for results. i only rely on the "run-all-tests" that comes with the sql-bench scripts with mysql source. i'm sure there are plenty of things you could change in your PHP setup, network setup, etc. that could lskew the results. what we need first is to figure out how to get the threading/whatnot to work properly even running locally on the same machine. if it doesn't work properly there, it wont' work properly when stressed over the network. save that for the next stage. i'm willing to give access to my machine for anyone to compile/configure/etc. and also willing to pitch some money to whomever can help resolve this issue. getting this to work with good performance means a lot to me. - mike > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. > > In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 > or return the E.mail to postmaster@multiplay.co.uk. > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" > From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 08:16:01 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 6920516A4CE for ; Fri, 21 May 2004 08:16:01 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B4C743D2F for ; Fri, 21 May 2004 08:15:59 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i4LFFeqM015405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 May 2004 11:15:40 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i4LFFXaf029798; Fri, 21 May 2004 11:15:33 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16558.7445.195712.176174@grasshopper.cs.duke.edu> Date: Fri, 21 May 2004 11:15:33 -0400 (EDT) To: "Steven Hartland" In-Reply-To: <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> References: <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 15:16:01 -0000 Steven Hartland writes: > Ok its IO (netcard drivers). > TBH after looking at this benchmarker I'd say its pretty useless > its testing packet throughput / rpc time not the database. > > Typical db load is not all insert statements its not even mostly > insert statements its selects. Saying that there's some startling results > below. > Exec summary: > FreeBSD 5.1.2 (i386) > local: 22834.872368421 records per second > fxp 100Mb: 3854.06863517 records per second > bge 100Mb: 2501.66999862 records per second > bge 1Gb: 3281.65229885 records per second Nice work. Does this translate pretty much directly into netperf request/response results? (netperf -tTCP_RR -Hremote) Assuming it does, have you tried "tuning" the bge interrupt coalescing params? Without adding an interface, I'd just suggest doing something like changing sc->bge_rx_max_coal_bds from 64 to 1 around like 2350 of dev/bge/if_bge.c, rebuilding the driver, and seeing what changes. I'm betting that will turn off recv interrupt coalescing and reduce your latency some. Drew From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 08:22:59 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 09B5816A4CE for ; Fri, 21 May 2004 08:22:59 -0700 (PDT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBCF943D31 for ; Fri, 21 May 2004 08:22:58 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 708 invoked from network); 21 May 2004 15:22:41 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 21 May 2004 15:22:41 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i4LFMX50077290; Fri, 21 May 2004 11:22:34 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-amd64@FreeBSD.org, John-Mark Gurney Date: Fri, 21 May 2004 11:23:07 -0400 User-Agent: KMail/1.6 References: <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com> In-Reply-To: <20040519172913.GU601@funkthat.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405211123.07857.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 15:22:59 -0000 On Wednesday 19 May 2004 01:29 pm, John-Mark Gurney wrote: > libpthread (aka libkse) is a design for M:N threads, and requires > the user of pthreads to create new system scoped threads to make > use of multiple cpu's... No it doesn't. Each kse group has one KSE per CPU, so it can schedule threads onto multiple CPUs and it will do so if there are multiple runnable threads. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 09:07:05 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 4481316A4CE for ; Fri, 21 May 2004 09:07:05 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDDD043D46 for ; Fri, 21 May 2004 09:07:04 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000225306.msg for ; Fri, 21 May 2004 17:05:10 +0100 Message-ID: <014301c43f4d$ea2ce920$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: "Andrew Gallatin" References: <200405202235.46755.Gregor.Bittel@GMX.de><5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com><5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com><007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk><00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> <16558.7445.195712.176174@grasshopper.cs.duke.edu> Date: Fri, 21 May 2004 17:07:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 17:05:10 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 17:05:11 +0100 cc: freebsd-amd64@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64Vs.FreeBSD/AMD64? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 16:07:05 -0000 Thanks muchly for that Andrew will try that. Looking at the results from the netperf test posted here: http://people.freebsd.org/~pjd/netperf/ so I'd say yes to your question. The machine moved home today ( my bedroom -> datacenter ), thank goodness its was a noisy beast. So will have to wait till it gets installed, some time tonight, before I can test. Steve ----- Original Message ----- From: "Andrew Gallatin" > > Nice work. Does this translate pretty much directly into netperf > request/response results? (netperf -tTCP_RR -Hremote) > > Assuming it does, have you tried "tuning" the bge interrupt coalescing > params? Without adding an interface, I'd just suggest doing something > like changing sc->bge_rx_max_coal_bds from 64 to 1 around like 2350 of > dev/bge/if_bge.c, rebuilding the driver, and seeing what changes. I'm > betting that will turn off recv interrupt coalescing and reduce your > latency some. > > Drew ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 09:40:53 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 2F7EF16A4CE for ; Fri, 21 May 2004 09:40:53 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF2A343D46 for ; Fri, 21 May 2004 09:40:52 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 55832 invoked by uid 89); 21 May 2004 16:44:19 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 21 May 2004 16:44:19 -0000 Message-Id: <5.2.0.9.2.20040521093359.015497f0@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 21 May 2004 09:39:46 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <5.2.0.9.2.20040521071750.0152ac40@mail.ojoink.com> References: <5.2.0.9.2.20040521035925.01463f88@mail.ojoink.com> <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 16:40:53 -0000 Compare the last set of benchmarks to these new ones. Using Linux Mandrake64 and super-smack: -------------------------------------------------------------------- SERVER CONFIG: ** Mandrake64 64-bit** SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 unknown unknown GNU/Linux 2.6.3-9mdksmp MySQL: Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution) [root@amd64m]# ldd /usr/sbin/mysqld librt.so.1 => /lib64/tls/librt.so.1 (0x0000002a9566d000) libdl.so.2 => /lib64/libdl.so.2 (0x0000002a95786000) libz.so.1 => /lib64/libz.so.1 (0x0000002a9588a000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000002a9599d000) libnsl.so.1 => /lib64/libnsl.so.1 (0x0000002a95ad0000) libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a95be8000) <-- eh? libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x0000002a95cfc000) libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95eda000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a96033000) libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a9613e000) /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000) --------------------------------------------------------------------- Each benchmark ran 4 times and highest was shown. --------------------------------------------------------------------- REMOTE (Over 100mbit LAN dc0 to bge0): - Using "Stock" Mandrake64 Install, without my.cnf devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=65ms min=8ms avg= 20ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 4 0 4441.59 update_index 300000 1 0 4441.59 - Using "Stock" Mandrake64 Install, with my-huge.cnf but it compiled about max_connections @ 512 and dropped them to 457... 040521 1:17:42 Warning: setrlimit couldn't increase number of open files to more than 1024 (request: 1134) 040521 1:17:42 Warning: Changed limits: max_connections: 100 table_cache: 457 devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=65ms min=0ms avg= 21ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 5 0 4296.86 update_index 300000 15 0 4296.86 So the results above were the best so far. Strange that using the my-huge.cnf would produce worse results. I guess that's a question for the Mandrake list though. Anyway, the closest FreeBSD came so far was under 32-bit i386 (on AMD64 hardware) :-( - Using my-huge.cnf - Using SCHED_4BSD kernel - Using mysql compiled with linuxthreads - (see a couple posts back for complete details) devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=817ms min=37ms avg= 326ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 2 0 3718.13 update_index 300000 9 0 3718.13 From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 09:58:50 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 9427016A4CE for ; Fri, 21 May 2004 09:58:50 -0700 (PDT) Received: from multiplay.co.uk (www1.multiplay.co.uk [212.42.16.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AEC043D2D for ; Fri, 21 May 2004 09:58:50 -0700 (PDT) (envelope-from killing@multiplay.co.uk) Received: from steven ([193.123.241.40]) by multiplay.co.uk (multiplay.co.uk [212.42.16.7]) (MDaemon.PRO.v7.1.0.R) with ESMTP id md50000225558.msg for ; Fri, 21 May 2004 17:52:02 +0100 Message-ID: <017c01c43f54$75946a00$7b07000a@int.mediasurface.com> From: "Steven Hartland" To: , "JG" References: <5.2.0.9.2.20040521035925.01463f88@mail.ojoink.com> <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> <5.2.0.9.2.20040521093359.015497f0@mail.ojoink.com> Date: Fri, 21 May 2004 17:55:45 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Processed: multiplay.co.uk, Fri, 21 May 2004 17:52:02 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 193.123.241.40 X-Return-Path: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-amd64@freebsd.org X-MDAV-Processed: multiplay.co.uk, Fri, 21 May 2004 17:52:05 +0100 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 16:58:50 -0000 As the benchmark is still looking network dependent 0 -> 6ms RR times I'd try the bge tweak Andrew suggested: Without adding an interface, I'd just suggest doing something like changing sc->bge_rx_max_coal_bds from 64 to 1 around like 2350 of dev/bge/if_bge.c, rebuilding the driver, and seeing what changes. I'm betting that will turn off recv interrupt coalescing and reduce your latency some. It may be the source of your issue. Also compare local to local and see how that shapes up, as it will give an indication of where any issue lies i.e. threading / process or network. Steve / K ----- Original Message ----- From: "JG" > So the results above were the best so far. > Strange that using the my-huge.cnf would produce worse results. > I guess that's a question for the Mandrake list though. > > > Anyway, the closest FreeBSD came so far was under 32-bit i386 (on AMD64 > hardware) :-( > > - Using my-huge.cnf > - Using SCHED_4BSD kernel > - Using mysql compiled with linuxthreads > - (see a couple posts back for complete details) ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone (023) 8024 3137 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 10:40:50 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 7EF5416A4CE for ; Fri, 21 May 2004 10:40:50 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70A5143D31 for ; Fri, 21 May 2004 10:40:50 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 58218 invoked by uid 89); 21 May 2004 17:44:33 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 21 May 2004 17:44:33 -0000 Message-Id: <5.2.0.9.2.20040521103256.01571260@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 21 May 2004 10:40:00 -0700 To: freebsd-amd64@freebsd.org From: JG In-Reply-To: <017c01c43f54$75946a00$7b07000a@int.mediasurface.com> References: <5.2.0.9.2.20040521035925.01463f88@mail.ojoink.com> <017001c43f18$d4ef6400$7b07000a@int.mediasurface.com> <200405202235.46755.Gregor.Bittel@GMX.de> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520122752.015eec60@mail.ojoink.com> <5.2.0.9.2.20040520141038.0432d130@mail.ojoink.com> <007701c43ec5$ff0a6fd0$b3db87d4@multiplay.co.uk> <00de01c43eeb$f2753220$b3db87d4@multiplay.co.uk> <5.2.0.9.2.20040521093359.015497f0@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 17:40:50 -0000 At 05:55 PM 5/21/2004 +0100, you wrote: >As the benchmark is still looking network dependent 0 -> 6ms RR times >I'd try the bge tweak Andrew suggested: > >Without adding an interface, I'd just suggest doing something >like changing sc->bge_rx_max_coal_bds from 64 to 1 around like 2350 of >dev/bge/if_bge.c, rebuilding the driver, and seeing what changes. I'm >betting that will turn off recv interrupt coalescing and reduce your >latency some. > >It may be the source of your issue. Doesn't look like it. Changing it from 64 to 1 seems to have decreased performance: -------------------------------------------------------------------- SERVER CONFIG: ** FreeBSD AMD64 ** amd64f# uname -a FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Wed May 19 03:37:58 PDT 2004 Without -CURRENT debugging in kernel. MySQL: Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: mysql-server-4.0.20) With mysql-server40.diffs With libpthreads BUILD_OPTIMIZED=yes BUILD_STATIC=yes --------------------------------------------------------------------- Each benchmark ran 4 times and highest was shown. --------------------------------------------------------------------- Benchmark results: REMOTE (Over 100mbit LAN dc0 to bge0): - Using default mysql config settings (empty/missing my.cnf) - Using SCHED_4BSD - With if_bge.c sc->bge_rx_max_coal_bds 64 to 1 test hack devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=38ms min=1ms avg= 16ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 2 0 2356.21 update_index 300000 11 0 2356.21 Vs. same, without if_bge.c hack... - Using default mysql config settings (empty/missing my.cnf) - Using SCHED_4BSD devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=28ms min=2ms avg= 16ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 7 0 2685.53 update_index 300000 5 0 2685.53 - Using my-huge.cnf - Using SCHED_4BSD kernel - With if_bge.c sc->bge_rx_max_coal_bds 64 to 1 test hack devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=33ms min=1ms avg= 21ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 2 0 2350.52 update_index 300000 11 0 2350.52 Vs. same, without if_bge.c hack... - Using my-huge.cnf - Using SCHED_4BSD kernel devbox# super-smack update-select.smack 30 10000 Query Barrel Report for client smacker connect: max=34ms min=1ms avg= 16ms from 30 clients Query_type num_queries max_time min_time q_per_s select_index 300000 4 0 3229.12 update_index 300000 8 0 3229.12 >Also compare local to local and see how that shapes up, as it will >give an indication of where any issue lies i.e. threading / process >or network. Various local tests up next. From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 11:32:20 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 643AE16A4CE for ; Fri, 21 May 2004 11:32:20 -0700 (PDT) Received: from mail.mikehost.net (lvs-1.voxel.net [207.99.115.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33FE843D1D for ; Fri, 21 May 2004 11:32:20 -0700 (PDT) (envelope-from mike@mike2k.com) Received: by mail.mikehost.net (Postfix, from userid 502) id D02F91BBEB; Fri, 21 May 2004 11:32:11 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.mikehost.net (Postfix) with ESMTP id CEE8A1BA76 for ; Fri, 21 May 2004 11:32:11 -0700 (PDT) Date: Fri, 21 May 2004 11:32:11 -0700 (PDT) From: mike X-X-Sender: mike@sql01.internal.mikehost.net To: freebsd-amd64@freebsd.org Message-ID: mike: yes MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64Vs.FreeBSD/AMD64? (fwd) X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 18:32:20 -0000 On Fri, 21 May 2004, Steven Hartland wrote: > As the benchmark is still looking network dependent 0 -> 6ms RR times > I'd try the bge tweak Andrew suggested: > > Without adding an interface, I'd just suggest doing something > like changing sc->bge_rx_max_coal_bds from 64 to 1 around like 2350 of > dev/bge/if_bge.c, rebuilding the driver, and seeing what changes. I'm > betting that will turn off recv interrupt coalescing and reduce your > latency some. > > It may be the source of your issue. > > Also compare local to local and see how that shapes up, as it will > give an indication of where any issue lies i.e. threading / process > or network. > > Steve / K this is what i'm saying. i *KNOW* that there is a problem with threading. we need to resolve mysql issues on the local box before we worry about possible network overhead or anything. check my benchmarks. i am posting the same complaints here. http://mikehost.com/~mike/tmp/bench.htm out of the box debian blows the hell out of the freebsd setup in most tests - all running through the local file socket (not over the network) and compiled the same way. there is definately a problem here with threading/etc. let's conquer one issue at a time. threading issues first. when i can run mysql here on the same machine and it sports relatively the same numbers as the linux installation, then you can start running remote benchmarks and see if there's additional issues with network overhead (either internal to mysql or network drivers or something) once again, i will provide access to my machine if anyone wants to come in and optimize it/do whatever, as well as pay someone some cash to help expedite this issue. - mike From owner-freebsd-amd64@FreeBSD.ORG Fri May 21 13:38:49 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 BA44F16A4CE for ; Fri, 21 May 2004 13:38:49 -0700 (PDT) Received: from smtp004.mail.ukl.yahoo.com (smtp004.mail.ukl.yahoo.com [217.12.11.35]) by mx1.FreeBSD.org (Postfix) with SMTP id 4055243D49 for ; Fri, 21 May 2004 13:38:49 -0700 (PDT) (envelope-from PrimeReflex@yahoo.co.uk) Received: from unknown (HELO pr04) (PrimeReflex@81.178.113.171 with login) by smtp004.mail.ukl.yahoo.com with SMTP; 21 May 2004 20:38:30 -0000 From: "Luke Edgeworth" To: Date: Fri, 21 May 2004 21:38:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcQ/c4YOBjoc6kF+RbiSNflVDm8hQw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-Id: <20040521203849.4055243D49@mx1.FreeBSD.org> Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 20:38:49 -0000 http://www.2cpu.com/articles/98_4.html Interesting, no?