From owner-freebsd-performance@FreeBSD.ORG Sun May 7 16:50:08 2006 Return-Path: X-Original-To: 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 E640816A400; Sun, 7 May 2006 16:50:07 +0000 (UTC) (envelope-from hadara@bsd.ee) Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 179E143D49; Sun, 7 May 2006 16:50:06 +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 839C123C157; Sun, 7 May 2006 19:50:03 +0300 (EEST) From: Sven Petai To: freebsd-performance@freebsd.org Date: Sun, 7 May 2006 19:49:53 +0300 User-Agent: KMail/1.9.1 References: <20060506150622.C17611@fledge.watson.org> In-Reply-To: <20060506150622.C17611@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605071949.54978.hadara@bsd.ee> X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Cc: performance@freebsd.org, Robert Watson , current@freebsd.org Subject: Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets) 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: Sun, 07 May 2006 16:50:08 -0000 hi I performed tests on a 4 * dualcore 2Ghz opteron system (so 8 cores in total). In general with 10 parallel smacker threads the performance seems to go up with your patch by ~44% and with 100 parallel threads it goes down ~25% Here's a graph of select smack performance with your patch: http://bsd.ee/~hadara/debug/mysql4/freebsd_current_06.02.2006_uds_patch/ULE_+_pthread_vs._thr.png Server crashed before I managed to get enough data to plot graphs comparing pre-patch and patched performance. I'll try to generate that and another one, comparing the performance against linux on the same hardware, tomorrow. But below you can find some pre and after patch data that should give some idea of how the patch has impacted performance. Various test data, benchmarking scripts I used etc. can be found @ http://bsd.ee/~hadara/debug/mysql4/ I have included nice value of mysqld in the tests, because I have found that the impact of giving mysqld higher priority can have dramatic effects, especially under 6.X. This happens probably because super-smack with its 100 procs would otherwise get scheduling advantage over mysqld with 100 threads. Hardware: motherboard: Thunder K8QSD Pro hdd: scsi seagate cheetah 10K7 ram: 8 * 3200 CL3 kingston ECC 1G cpu: 4 * opteron 870 (2Ghz dualcore) Environment: mysql: ver: 4.1.18_2 from the ports table type: MyISAM config: my-huge.cnf with disabled bin-log and max-connections bumped to 400 database located on a slice mounted with softupdates super-smack: ver: from the ports smacks: default select and update All tests were run 2 times and mean value was used, unless stated otherwise. ==== FreeBSD current (06.05.2006) ==== scheduler: 4BSD thr_lib nice queries threads update select pthread 0 10000 100 3280 8253 pthread 0 100000 10 5037 19972 thr 0 10000 100 4470 20317 thr 0 100000 10 6341 20353 thr -10 10000 100 4457 20530 thr -10 100000 10 6318 21240 scheduler: ULE thr_lib nice queries threads update select pthread 0 10000 100 3640 8413 pthread 0 100000 10 5269 21248 thr 0 10000 100 4422 16299* thr 0 100000 10 6400 22068 thr -10 10000 100 4400 21154 thr -10 100000 10 6211 21877 * - mean over 5 runs since results were rather unstable: 14088.81, 17629.83, 21210.02, 14173.42, 14395.31 ==== FreeBSD current (06.05.2006) + uds locking patch ==== scheduler: 4BSD thr_lib nice queries threads update select pthread 0 10000 100 3410 8237 pthread 0 100000 10 5150 19786 thr 0 10000 100 4559 14992 thr 0 100000 10 6422 29371 thr -10 10000 100 4535 12589 thr -10 100000 10 6446 30300 scheduler: ULE thr_lib nice queries threads update select pthread 0 10000 100 3455 8062 ---- lost contact with machine ---- results with various threadcounts at 10000 queries is available though @ http://bsd.ee/~hadara/debug/mysql4/freebsd_current_06.02.2006_uds_patch/smack_results_ULE.txt ==== FreeBSD 6.1 RC2 ==== scheduler: 4BSD thr_lib socket nice queries threads update select pthread unix 0 10000 100 2609 6683 pthread unix 0 100000 10 3752 15052 thr unix 0 10000 100 4802 11496 thr unix 0 100000 10 6398 20738 thr unix -10 10000 100 4607 21066 thr unix -10 100000 10 6379 21411 thr tcp -10 10000 100 4335 9952 scheduler: ULE thr_lib socket nice queries threads update select thr unix 0 10000 100 4779 13724 thr unix 0 100000 10 6473 25172 thr unix -10 10000 100 4969 20662 thr unix -10 100000 10 6418 25204 ==== Linux ==== suse - suse enterprise linux 9 with kernel 2.6.5-7.97-smp, mysql 4.0.18-32.1, reiserfs fedora - fedora core with kernel 2.6.9-22-ELsmp, mysql 4.1.12, ext3 distro queries threads update select suse 10000 100 10047* 76857 fedora 10000 100 8072* 67000 * - on linux the bin-log option was not disabled in the mysql config, so it would probably have gotten even higher update smack scores if I had disabled it like I did on freebsd