From owner-freebsd-performance@FreeBSD.ORG Thu Dec 29 21:58:07 2005 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C6E416A420 for ; Thu, 29 Dec 2005 21:58:07 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (ns1.ecoms.com [207.44.130.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id E65E643D7F for ; Thu, 29 Dec 2005 21:57:59 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (localhost.roq.com [127.0.0.1]) by p4.roq.com (Postfix) with ESMTP id 347374D104 for ; Thu, 29 Dec 2005 21:58:11 +0000 (GMT) Received: from [192.168.0.2] (ppp157-158.static.internode.on.net [150.101.157.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by p4.roq.com (Postfix) with ESMTP id 6F18A4D088 for ; Thu, 29 Dec 2005 21:58:10 +0000 (GMT) Message-ID: <43B45BE6.7000401@roq.com> Date: Fri, 30 Dec 2005 08:57:58 +1100 From: Michael Vince User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.12) Gecko/20051208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-performance@freebsd.org References: <20051216064615.GA41775@gslin.org> <20051216070609.GA3216@il.fontys.nl> <20051216204322.GA66409@gslin.org> <43A35A1E.3020408@samsco.org> <3aaaa3a0512221304p3a35b1ecj@mail.gmail.com> <43B0BB44.40708@roq.com> <3aaaa3a0512272202u715ccb4fo@mail.gmail.com> In-Reply-To: <3aaaa3a0512272202u715ccb4fo@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: Benchmark MySQL Performance On FreeBSD And Linux X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 21:58:07 -0000 Chris wrote: >>Make sure your compile your MySQL dynamically which is done by default, >>if you include 'BUILD_STATIC=yes' you ruin your ability to change >>threading libs. >> >>portupgrade -N -m 'BUILD_OPTIMIZED=yes' >>/usr/ports/databases/mysql41-server >>Or upgrade >>portupgrade -R -m 'BUILD_OPTIMIZED=yes'/var/db/pkg/mysql-server-4.1.14 >> >> >>Use 'ldd' to find which threading library you are using. >> >>ldd /usr/local/libexec/mysqld >>/usr/local/libexec/mysqld: >> libz.so.3 => /lib/libz.so.3 (0x800978000) >> libwrap.so.4 => /usr/lib/libwrap.so.4 (0x800a8b000) >> libcrypt.so.3 => /lib/libcrypt.so.3 (0x800b94000) >> libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x800cad000) >> libm.so.4 => /lib/libm.so.4 (0x800ea4000) >> libpthread.so.2 => */usr/lib/libpthread.so.2* (0x800fc0000) >> libc.so.6 => /lib/libc.so.6 (0x8010eb000) >> >>Put something like this into your /etc/libmap.conf to change your >>threading library, and restart the service in question for the library >>change to take effect. >>[/usr/local/libexec/mysqld] >>libpthread.so.2 libthr.so.2 >>libpthread.so libthr.so >> >># ldd /usr/local/libexec/mysqld >>/usr/local/libexec/mysqld: >> libz.so.3 => /lib/libz.so.3 (0x800978000) >> libwrap.so.4 => /usr/lib/libwrap.so.4 (0x800a8b000) >> libcrypt.so.3 => /lib/libcrypt.so.3 (0x800b94000) >> libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x800cad000) >> libm.so.4 => /lib/libm.so.4 (0x800ea4000) >> libpthread.so.2 => */usr/lib/libthr.so.2* (0x800fc0000) >> libc.so.6 => /lib/libc.so.6 (0x8010d7000) >> >> >> >>Ok thanks just 2 more questions. >> >> > >(a) if I build dynamic there is no performance penalty? since the Makefile >states build static for performance. >(b) I have no /etc/libmap.conf it doesnt exist, so if I just create one and >enter what you say it will work? > >Chris > > Yes check the URL below http://dev.mysql.com/doc/refman/4.1/en/compile-and-link-options.html The first line of the Optimizing the MySQL Server in the Compiling section says "You obtain the fastest executables when you link with |-static|." And then again further down " If you link dynamically (without |-static|), the result is 13% slower on Linux. Note that you still can use a dynamically linked MySQL library for your client applications. It is the server that is most critical for performance." It would be great if some one could do the benchmarks on FreeBSD to verify that. > (b) I have no /etc/libmap.conf it doesnt exist, so if I just create > one and enter what you say it will work? Yes, its never there by default so just create it. FYI there is a man page on libmap.conf Mike