From owner-freebsd-stable@FreeBSD.ORG Sat Jun 11 10:45:35 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1544C16A41C for ; Sat, 11 Jun 2005 10:45:35 +0000 (GMT) (envelope-from chu@h33.erkki.ton.tut.fi) Received: from h33.erkki.ton.tut.fi (h33.erkki.ton.tut.fi [193.166.84.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id B389843D48 for ; Sat, 11 Jun 2005 10:45:34 +0000 (GMT) (envelope-from chu@h33.erkki.ton.tut.fi) Received: from [10.10.1.4] (helo=localhost) by h33.erkki.ton.tut.fi with esmtp (Exim 4.50 (FreeBSD)) id 1Dh3Uf-00027D-8Z; Sat, 11 Jun 2005 13:45:37 +0300 Date: Sat, 11 Jun 2005 13:45:27 +0300 To: "Tom Gidden" From: "Vladimir Chukharev" Organization: @home Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera M2/8.0 (FreeBSD, build 1095) Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD MySQL still WAY slower than Linux X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2005 10:45:35 -0000 > 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.orig Fri 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 > root@lithium.lonres.com:/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