Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030224AbXBZNgR (ORCPT ); Mon, 26 Feb 2007 08:36:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030241AbXBZNgR (ORCPT ); Mon, 26 Feb 2007 08:36:17 -0500 Received: from smtp105.plus.mail.mud.yahoo.com ([68.142.206.238]:27620 "HELO smtp105.plus.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1030224AbXBZNgQ (ORCPT ); Mon, 26 Feb 2007 08:36:16 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type; b=Ea90tlet+PGZ/SprbpX7/delnNbUicPxg+bKj1PephoKB1+tOLyLTwGxw3BHlghStiT74tezEeioO6NRVCtNtWhi2wgoBLQxvQtTqhR5n9KvRok2EAQw8wjCBQwJfWfe5wCZg68G2xJGLF7gasjEAppgHqr1xfgw7FQX72cWMt0= ; X-YMail-OSG: VuQ2ZKoVM1lIYiqjorY2iSliAMw9FdOGXXnF9ZUiwoTwgjyWPQmbx0It0SNLB8l7gmLKR7D0g5yA6c1QWLXDIbV_96A6OrWaduAfWpw5vGyGzPFI.l3wOK0TMLZrPsWaIIUqMyCh8ietdVk- Message-ID: <45E2E244.8040009@yahoo.com.au> Date: Tue, 27 Feb 2007 00:36:04 +1100 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 X-Accept-Language: en MIME-Version: 1.0 To: Rik van Riel CC: Lorenzo Allegrucci , linux-kernel@vger.kernel.org, Ingo Molnar , Suparna Bhattacharya , Jens Axboe Subject: Re: SMP performance degradation with sysbench References: <1172425476.5489.11.camel@odyssey.lan> <45E21FEC.9060605@redhat.com> In-Reply-To: <45E21FEC.9060605@redhat.com> Content-Type: multipart/mixed; boundary="------------050500020307000701080104" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14075 Lines: 260 This is a multi-part message in MIME format. --------------050500020307000701080104 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Rik van Riel wrote: > Lorenzo Allegrucci wrote: > >> Hi lkml, >> >> according to the test below (sysbench) Linux seems to have scalability >> problems beyond 8 client threads: >> http://jeffr-tech.livejournal.com/6268.html#cutid1 >> http://jeffr-tech.livejournal.com/5705.html >> Hardware is an 8-core amd64 system and jeffr seems willing to try more >> Linux versions on that machine. >> Anyway, is there anyone who can reproduce this? > > > I have reproduced it on a quad core test system. > > With 4 threads (on 4 cores) I get a high throughput, with > approximately 58% user time and 42% system time. > > With 8 threads (on 4 cores) I get way lower throughput, > with 37% user time, 29% system time 35% idle time! > > The maximum time taken per query also increases from > 0.0096s to 0.5273s. Ouch! > > I don't know if this is MySQL, glibc or Linux kernel, > but something strange is going on... Like you, I'm also seeing idle time start going up as threads increase. I initially thought this was a problem with the multiprocessor scheduler, because the pattern is exactly like some artificat in the load balancing. However, after looking at the stats, and testing a couple of things, I think it may not be after all. I've reproduced this on a 8-socket/16-way dual core Opteron. So far what I am seeing is that MySQL is having trouble putting enough load into the scheduler. Virtually all of the sleep time is coming from unix_stream_recvmsg, which seems to be what the clients and server threads use to communicate with. There doesn't seem to be any other tell-tale event that the database is blocking on. It seems like it might at least partially be a problem with MySQL thread/connection management. I found a couple of interesting issues so far. Firstly, the MySQL version that I'm using (5.0.26-Max) is making lots of calls to sched_setscheduler attempting to fiddle with SCHED_OTHER priority in what looks like an attempt to boot CPU time while holding some resource. All these calls actually fail, because you cannot change SCHED_OTHER priority like that. Adding a hack to make it fall through to set_user_nice provides a boost which eliminates the cliff (but a downward degredation is still there). Secondly, I've raised the thread numbers from 16 to 32 for my system, which also provides a bit more (although doesn't help the downward slope). Combined, it looks like around 30-40% improvement past 16 threads. It isn't anything like making up for the dropoff seen in the blog link, but different systems, different mysql version... I wonder how close we are with this hack in place? Attached is a graph of my numbers, from 1 to 32 clients. plain = 2.6.20.1, sched is with the attached sched patch, and thread is with 32 rather than 16 clients. Anyway, I'll keep experimenting. If anyone from MySQL wants to help look at this, send me a mail (eg. especially with the sched_setscheduler issue, you might be able to do something better). Nick -- SUSE Labs, Novell Inc. --------------050500020307000701080104 Content-Type: image/png; name="graph.png" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="graph.png" iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAMAAAACDyzWAAABKVBMVEX///8AAACgoKD/AAAA wAAAgP/AAP8A7u7AQADu7gAgIMD/wCAAgECggP+AQAD/gP8AwGAAwMAAYIDAYIAAgABA/4Aw YICAYABAQEBAgAAAAICAYBCAYGCAYIAAAMAAAP8AYADjsMBAwIBgoMBgwABgwKCAAACAAIBg IIBgYGAgICAgQEAgQIBggCBggGBggICAgEAggCCAgICgoKCg0ODAICAAgIDAYACAwODAYMDA gADAgGD/QAD/QECAwP//gGD/gIDAoADAwMDA/8D/AAD/AP//gKDAwKD/YGAA/wD/gAD/oACA 4OCg4OCg/yDAAADAAMCgICCgIP+AIACAICCAQCCAQICAYMCAYP+AgADAwAD/gED/oED/oGD/ oHD/wMD//wD//4D//8BUJrxzAAAZy0lEQVR4nO2djXazKhBFzRJ9/0duRUBQQMEBBjn79qbN T4mx+xsYQJgmAAAAAAAAAAAAAAAAAKA6v3/279P1GwCF2UyT/8uv0zcASqME9H4DoAoQEDTk Z2rhgIA/AFJJ8U/fBgWk1D25wNW6pSjvCdQF4gAjrzyyXghYqkAcYOSVP/MboSy4uYArBCxc YFMBVY0d7gdsLOC6TisELFsg7wNsmw6v8v+ogIAdnxFw1TQ8hq/hpKinhDV2L+k9cn+xeGFp rKfvgIDnysUEnOPvkXxUtQpLwYp7MJCO55INLuAa+Bm8Q+WcP3sSislEPc/5+b6Aa+QeeIvp 6jWSHfe8I7HzHW7xpMd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4R/wUkVANAFBCAgImgIBQVMqCYgcBPipIiACIAgBAUFT agiIJiAIAgFBUyAgaEodAeEfCFBju1YEQBCkxobVEBAEyRJwMh5qHWOFoQkIwkBA0JQMAX+m Fr4IqNuHDshBgB+/L7e/ZJv3LAJCQBCigoCogUGYClkwBARhyvcDIgcBEcqPhKAJCCJAQNAU CAiaUl5ANAFBBAgImlJBQPgHwhQXEE1AEAMCgqZAQNAUCAiaUlxA+AdiQEDQlNICogYGUSAg aAoEBE0pLiD8AzFKC4gACKJAQNCUwgKiCQjiQEDQlNICwj8QBQKCphQWEDUwiAMBQVPKCogc BNxQWED4B+JAQNAUCAiaUlZANAHBDRAQNKWcgELWwIKyfPA9CkZA8S8g/ANxSlbBAjkIuKNo GxACgjvKCbjuUJYPvkdBAZdpnZEGgzgFBZyWzUHK8sH3KBkBl+2LsnzwPQoKOC8LVkcFNxRt Ay4YCgE3IAsGTSnaDzhTFg4+SflFygGIAAFBUyAgaAoEBE3JckZu0fp0u9Y3UBeIA+RWXlaB v7QNq1/wydNXs7xPHqDcsVptnK73T88u7OatmJeHA2xQ4K4dBCxSIA7w/hcc804CApAKpYAA FEdpCwFBO0JZMABVCPUDAgAAAAAAAEBliFOSvK7KSHH2N6oC6Q5Sl0N2gHuBZAdoCqI6QNOn R3YGqed3EZe2/3nJDpL2r2E6VckO0OqsJYP0AFWB5GeQDNrCju4jqn9uRQQkPEB6Ac0/EpbO FBCQsgamFtCugmnKKzC6pGs4stI4n8EiEZC6DVjg9JEV+KMOMMQF/qgPkLjAIiPD7AV0fiAo jvTve/3pfZHkIdr69r4sCPi2NNo24PXH12XyFbBIFkzeDUN4kLRG60JIs+CpQA1XIk0nj/k0 0Lbvy/RikR0k+wM0BRHGU5OFEJUIAAAAAAAAAAAAAAAAANzzB9pdamWM0tsoAAAAAElFTkSu QmCC --------------050500020307000701080104 Content-Type: text/plain; name="mysql-hack.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mysql-hack.patch" --- kernel/sched.c.orig 2007-02-26 11:46:46.849841000 +0100 +++ kernel/sched.c 2007-02-26 12:04:09.283056000 +0100 @@ -4227,8 +4227,6 @@ recheck: (p->mm && param->sched_priority > MAX_USER_RT_PRIO-1) || (!p->mm && param->sched_priority > MAX_RT_PRIO-1)) return -EINVAL; - if (is_rt_policy(policy) != (param->sched_priority != 0)) - return -EINVAL; /* * Allow unprivileged RT tasks to decrease priority: @@ -4302,6 +4300,13 @@ recheck: rt_mutex_adjust_pi(p); + if (!is_rt_policy(policy)) { + if (param->sched_priority == 8) + set_user_nice(p, -20); + else + set_user_nice(p, param->sched_priority-6); + } + return 0; } EXPORT_SYMBOL_GPL(sched_setscheduler); --------------050500020307000701080104-- Send instant messages to your online friends http://au.messenger.yahoo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/