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" >