From owner-freebsd-stable@FreeBSD.ORG Sat Oct 2 11:44:11 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA9D71065670 for ; Sat, 2 Oct 2010 11:44:11 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out1.tiscali.nl (smtp-out1.tiscali.nl [195.241.79.176]) by mx1.freebsd.org (Postfix) with ESMTP id 616568FC14 for ; Sat, 2 Oct 2010 11:44:11 +0000 (UTC) Received: from [212.123.145.58] (helo=sjakie.klop.ws) by smtp-out1.tiscali.nl with esmtp (Exim) (envelope-from ) id 1P20Ve-0003UR-AW; Sat, 02 Oct 2010 13:44:10 +0200 Received: from 212-123-145-58.ip.telfort.nl (localhost [127.0.0.1]) by sjakie.klop.ws (Postfix) with ESMTP id 413F1421A; Sat, 2 Oct 2010 13:44:07 +0200 (CEST) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-stable@freebsd.org, "Rumen Telbizov" References: Date: Sat, 02 Oct 2010 13:44:06 +0200 MIME-Version: 1.0 From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/10.62 (FreeBSD) Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: MySQL performance concern 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, 02 Oct 2010 11:44:11 -0000 On Sat, 02 Oct 2010 09:06:52 +0200, Rumen Telbizov =20 wrote: > Hello everyone, > > I am experimenting with MySQL running on FreeBSD and comparing with =20 > another > (older) setup running on a Linux box. > My results show that performance on Linux is significantly better than > FreeBSD although the hardware is weaker. > I'd appreciate your comments and ideas. > > Here's the setup: > > 1) FreeBSD 8.1-STABLE amd64 (Tue Sep 14 15:29:22 PDT 2010) running on a > SuperMicro machine with 2 x Dual Core > Xeon E5502 1.87Ghz ; 4 x SAS 15K in RAID10 setup under ZFS (two mirrore= d > pairs) and 2 x SSD X25-E partitioned > for: 8G for ZIL and the rest for L2ARC; 16G ram with 8 of them given to > mysql and tons of free. > > 2) Linux Gentoo with 3 SATA disks in hardware RAID5 with similar > cpu/motherboard and same memory size. > > The sole application that runs is a python script which inserts a batch= =20 > of > lines at a time. Only myisam is used as a format. > Here's the problem: On the Linux box it manages to push around > *5800*inserts/second while on the FreeBSD box > it's only *4000/*second. > > MySQL version is 5.1.51 > > During this load the disk subsystem on FreeBSD is pretty much idle (bot= h =20 > the > SSDs and the SAS disks). CPU utilization > contributed to mysqld is only around 30%. So I am clearly heavily > under-utilizing the hardware. > Linuxthreads support for 64bit architectures is not available so I =20 > couldn't > try that but aside from that I tried recompiling > mysql with all the different Makefile options available without any =20 > effect. > Changing the recordsize in zfs to 8K doesn't make any difference. > Tried percona binary without any luck. > > Let me know what additional information would be useful and I'll provid= e =20 > it > here. > > Thank you in advance for your comments and suggestions. > > Cheers, > Rumen Telbizov Your app is singlethreaded I presume, so the multi-cores are not relevant= =20 in this story. Do you have the same indexes on the tables on both servers? Do they both have the same way to connect with mysql? Unix sockets or =20 localhost? Do they both run mysql 5.1.51, because you mention the Linux one is older= ? Ronald.