From owner-freebsd-performance@FreeBSD.ORG Wed May 21 14:22:15 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C70A10656B3 for ; Wed, 21 May 2008 14:22:15 +0000 (UTC) (envelope-from _pppp@mail.ru) Received: from mx45.mail.ru (mx45.mail.ru [194.67.23.236]) by mx1.freebsd.org (Postfix) with ESMTP id 7FF258FC3A for ; Wed, 21 May 2008 14:22:13 +0000 (UTC) (envelope-from _pppp@mail.ru) Received: from f191.mail.ru (f191.mail.ru [194.67.57.166]) by mx45.mail.ru (mPOP.Fallback_MX) with ESMTP id 2A6B0E00258C for ; Wed, 21 May 2008 18:07:40 +0400 (MSD) Received: from mail by f191.mail.ru with local id 1Jyoyg-000BBM-00; Wed, 21 May 2008 18:07:38 +0400 Received: from [89.175.97.158] by koi.mail.ru with HTTP; Wed, 21 May 2008 18:07:38 +0400 From: Dmitriy <_pppp@mail.ru> To: t.pajor@kei.pl Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [89.175.97.158] Date: Wed, 21 May 2008 18:07:38 +0400 References: In-Reply-To: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: X-Spam: Not detected X-Mras: OK Cc: freebsd-performance@freebsd.org Subject: Re: mysql performance on freebsd 7 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitriy <_pppp@mail.ru> List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2008 14:22:15 -0000 > I'm using mysql 5.1.24-rc in 5 separate jails. > > Question: > > 10 clients are pushing queries (10 separate machines). 2 clients to 1 mysql daemon. One client is performing an update on param_stat_short_level_1_0, second on param_stat_short_level_1_1. > > Each client needs to push 150000 queries (client is spawning 15 forks to push the 150000, so each fork is pushing 10000, each fork is opening it's own mysql connection). > > query to push: > > INSERT INTO param_stat_short_level_1_0 SET param = '10311', object = '10311', value = '4283' ON DUPLICATE KEY UPDATE param = '10311', object = '10311', value = '4283', min = IF(4283max,4283,max), counter = counter+1; > > Always a different param, and object values, value is rand(1,10000). > > Stats for the operations are in http://p1.kei.pl/stats. > Stats are collected after each clients pushes 150000, 100 times. > > My point here is that MySQL on Linux (p5) performs 150000 queries in an average of 18.1099, when the same queries on FreeBSD (p1) takes 28.7643. > > Did I misconfigured something or this are the proper result and FreeBSD just could not give more? It would be very helpful if you provided I/O usage as well. I guess the FreeBSD box appears to be I/O-bound. Re-run your benchmarks with noatime mount option on the partition which holds database files (or even make that partition async as some Linux filesystems do). I think Linux outperforms FreeBSD that much in the test because of it's variable sized disk buffer cache (vs FreeBSD's fixed sized one). You can figure out how much data has to be actually written to disk and set vfs.hibufspace, vfs.lobufspace and vfs.maxbufspace sysctls in the /boot/loader.conf appropriately. Other vfs.* sysctls can also be helpful. Regards, Dmitriy. > My configs below, thanks for Your time. > > http://p1.kei.pl/TLD > http://p1.kei.pl/dmesg > http://p1.kei.pl/boot_loader_conf > http://p1.kei.pl/sysctl_conf > http://p1.kei.pl/my_cnf > http://p1.kei.pl/stats