From owner-freebsd-performance@FreeBSD.ORG Thu Apr 6 00:39:47 2006 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 E814216A429 for ; Thu, 6 Apr 2006 00:39:46 +0000 (UTC) (envelope-from hadara@bsd.ee) Received: from mx1.starman.ee (smtp-out2.starman.ee [85.253.0.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id F196E43D45 for ; Thu, 6 Apr 2006 00:39:42 +0000 (GMT) (envelope-from hadara@bsd.ee) Received: from depression.softematic.com (depression.softematic.com [62.65.205.81]) by mx1.starman.ee (Postfix) with ESMTP id BD09823C15B; Thu, 6 Apr 2006 03:39:39 +0300 (EEST) From: Sven Petai To: freebsd-performance@freebsd.org Date: Thu, 6 Apr 2006 03:39:30 +0300 User-Agent: KMail/1.9.1 References: <20060405134919.T16926@odysseus.silby.com> In-Reply-To: <20060405134919.T16926@odysseus.silby.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604060339.31800.hadara@bsd.ee> X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Cc: Mike Silbersack Subject: Re: mysql tests - one more thing to try 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, 06 Apr 2006 00:39:47 -0000 On Wednesday 05 April 2006 21:52, Mike Silbersack wrote: > If you're willing to spend more time looking at this, I suggest that you > run truss or ktrace on the super-smack processes. I did a small amount of > mysql vs postgres vs firebird benchmarking two years ago for a class > project, and noticed that mysql's results were showing the same phenomena > - our test program was using more cpu than mysqld. I run truss on our > test program and found that it was doing ONE BYTE READS from the socket, > rather than something larger. > > I never had the time to see if the problem was fixed at a later time or > not. You may wish to see if that same condition is still happening. here are ktrace results for supersmack and mysqld from a dualcore opteron box running select smack with 100 threads and 10000 queries os: fbsd 6.1 prerelease ==== syscall stats for supersmack ==== number of syscalls captured: 42575687 individual syscalls counts: read 32914539 77.31% gettimeofday 3865508 9.08% fcntl 3862708 9.07% write 1930922 4.54% break 325 0.00% close 301 0.00% setsockopt 202 0.00% select 192 0.00% semop 184 0.00% connect 101 0.00% wait4 101 0.00% socket 101 0.00% getpid 100 0.00% fork 100 0.00% exit 97 0.00% shutdown 96 0.00% mmap 27 0.00% access 15 0.00% mprotect 12 0.00% open 12 0.00% fstat 10 0.00% munmap 8 0.00% execve 7 0.00% ioctl 4 0.00% stat 3 0.00% sigprocmask 2 0.00% issetugid 2 0.00% lseek 1 0.00% sysarch 1 0.00% __sysctl 1 0.00% semget 1 0.00% readlink 1 0.00% sigaction 1 0.00% pipe 1 0.00% __semctl 1 0.00% request sizes for syscall read size count % --------------------------- 4 15489977 47.06% 50 3982797 12.10% 1 3873493 11.77% 52 2654645 8.07% 60 1937753 5.89% 5 1933249 5.87% 8192 1931176 5.87% 53 790179 2.40% 51 274285 0.83% 49 23467 0.07% 48 12943 0.04% 1023 5301 0.02% 47 2543 0.01% 46 2497 0.01% 7 101 0.00% 24 99 0.00% 4096 29 0.00% 128 1 0.00% 6 1 0.00% 17796 1 0.00% 30 1 0.00% 66 1 0.00% request sizes for syscall write size count % --------------------------- 65 1716567 88.90% 64 193387 10.02% 63 20584 1.07% 47 101 0.01% 5 94 0.00% 4 92 0.00% 26 92 0.00% 34 1 0.00% 35 1 0.00% 40 1 0.00% 49 1 0.00% 55 1 0.00% ==== syscall stats for mysqld ==== number of syscalls captured: 20743045 individual syscalls counts: _umtx_op 7657825 36.92% gettimeofday 4308736 20.77% read 4306035 20.76% write 1942882 9.37% sigprocmask 1680724 8.10% fcntl 838247 4.04% thr_kill 2827 0.01% sigwait 2403 0.01% setitimer 1669 0.01% select 698 0.00% setsockopt 202 0.00% access 101 0.00% accept 101 0.00% getsockname 101 0.00% open 101 0.00% shutdown 96 0.00% close 96 0.00% thr_new 92 0.00% thr_exit 87 0.00% break 22 0.00% request sizes for syscall write size count % --------------------------- 304 794935 40.92% 303 720255 37.07% 302 274534 14.13% 301 111278 5.73% 300 23412 1.21% 299 13079 0.67% 297 2615 0.13% 298 2571 0.13% 11 101 0.01% 56 101 0.01% 63 1 0.00% request sizes for syscall read size count % --------------------------- 4 2362079 54.86% 61 1728044 40.13% 60 194721 4.52% 59 20993 0.49% 43 101 0.00% 1 96 0.00% 31 1 0.00%