Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 11:25:31 -0700 (PDT)
From:      mike <mike@mike2k.com>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <Pine.LNX.4.53.0405191121450.26400@sql01.internal.mikehost.net>
In-Reply-To: <5.2.0.9.2.20040519104811.014f4620@mail.ojoink.com>
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>

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



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