Re: FreeBSD MySQL still WAY slower than Linux

2005-06-11 Thread Vladimir Chukharev

I've been working with Steve on this project.  We've been playing with various tuning 
factors, including kernel changes, different stripe sizes on the RAID, "my.cnf" 
tuning, libmap.conf, and although we can gain a bit here and there, we can't account for 
the doubling of performance with Gentoo.  Anyway, I've included the dmesg and kernel 
config.


And /etc/make.conf ?


The Gentoo install was pretty vanilla-flavoured, as neither Steve or I had 
installed Gentoo before, and both of us are pretty rusty on any form of Linux.


IIRC Gentoo on install detects the processor type and sets
for gcc the -march option. FreeBSD does not. Also Gentoo defaults
to -O3 (or -O2? I don't have it anymore to check...), so better
to par in that also.

Since Gentoo compiles practically everything in place,
these parameters might affect the results quite much.
At least I would check this ;-)

BTW, if you will make world and kernel with -march set, you
probably better patch it, or you might get a broken loader
(sorry for cut&paste, tabs might be broken):

$ cat progs/loader.patch
--- /usr/src/lib/libstand/Makefile.orig Fri Jun 10 14:03:07 2005
+++ /usr/src/lib/libstand/Makefile  Fri Jun 10 14:03:45 2005
@@ -20,6 +20,7 @@
 .endif
 .if ${MACHINE_ARCH} == "i386"
 CFLAGS+=   -mpreferred-stack-boundary=2
+CFLAGS+=   -mno-sse2
 .endif
 .if ${MACHINE_ARCH} == "powerpc"
 CFLAGS+=   -msoft-float -D_STANDALONE
--- /usr/src/sys/boot/ficl/Makefile.origFri Jun 10 14:04:05 2005
+++ /usr/src/sys/boot/ficl/Makefile Fri Jun 10 14:04:29 2005
@@ -12,6 +12,7 @@
 .endif
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
 CFLAGS+=   -mpreferred-stack-boundary=2
+CFLAGS+=   -mno-sse2
 .endif
 .if ${MACHINE_ARCH} == "powerpc"
 CFLAGS+=   -msoft-float

Similar (with more -mno-smthng) patches are applied by obrien to HEAD,
but not to STABLE yet AFAIK, for more see recent discussions in freebsd-current,
subj: Newest loader...


Incidentally, this does not seem to be I/O-bound.  The data is big enough to 
stay in the table cache anyway.
I just noticed these particular tests were done on FreeBSD without HTT, whereas 
the Gentoo test was.  However, I can tell you that in earlier runs, the 
difference between HTT and non-HTT on FreeBSD for this benchmark was negligible.
Regards,
Tom
--- [snip] ---
Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 The Regents of the University of California. All rights reserved.
FreeBSD 5.4-STABLE #0: Thu Jun  9 09:13:03 BST 2005
 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/PE2850_i386_4
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.01-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0xf41  Stepping = 1
   
Features=0xbfebfbff
real memory  = 3489398784 (3327 MB)
avail memory = 3418517504 (3260 MB)



--
V.Chukharev
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: FreeBSD MySQL still WAY slower than Linux

2005-06-11 Thread Vladimir Chukharev

One thing more...

I've seen a message on a PostgreSQL list that MySQL can
_silently_ change the type of the tables if it cannot find
some library. Check that you have really same DBs
in Gentoo and FreeBSD.

--
V.Chukharev
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"