Why is MySQL nearly twice as fast on Linux/AMD64 Vs.
FreeBSD/AMD64?
JG
amd64list at jpgsworld.com
Wed May 19 11:20:04 PDT 2004
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?
More information about the freebsd-amd64
mailing list