Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 11:19:48 -0700
From:      JG <amd64list@jpgsworld.com>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <5.2.0.9.2.20040519104811.014f4620@mail.ojoink.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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?










Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.2.20040519104811.014f4620>