Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0F2E41337B68 for ; Tue, 12 Apr 2011 09:35:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 23618-08 for ; Tue, 12 Apr 2011 12:35:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm2-vm0.bullet.mail.ukl.yahoo.com (nm2-vm0.bullet.mail.ukl.yahoo.com [217.146.183.226]) by mail.postgresql.org (Postfix) with SMTP id DB5C11337B83 for ; Tue, 12 Apr 2011 09:35:19 -0300 (ADT) Received: from [217.146.183.212] by nm2.bullet.mail.ukl.yahoo.com with NNFMP; 12 Apr 2011 12:35:19 -0000 Received: from [217.146.183.72] by tm5.bullet.mail.ukl.yahoo.com with NNFMP; 12 Apr 2011 12:35:19 -0000 Received: from [127.0.0.1] by omp1033.mail.ukl.yahoo.com with NNFMP; 12 Apr 2011 12:35:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 642214.95253.bm@omp1033.mail.ukl.yahoo.com Received: (qmail 4477 invoked by uid 60001); 12 Apr 2011 12:35:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1302611719; bh=gDWur6hQtq2XJ8Mf6pvFofUL6VVtnAiGDGMA9Xc9PV4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fiFOI42/IYlLMMQ6QjJBqENGawPwIxc1+n9WF/XIazC6RUKI3BSZ34BbI3oQUTO4UYvJuHC8EyqJp0H0YmAOBLOhSNADJPyMmlfKUv+v3BcLlSWmyoyb1seYM0yTTRht5ky/R99QWQfKIb+1Ex5z/xZ0rNQMFIruFi0DeWqmW2g= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vIhQYXPYP0ljVWPScJqLe+uCtUjpin5KpalLZYVBMFrWi9nzIPO0PiaAS2d//QBtwqN317T3j4m+GfjyYOETgdIEsL0GwH0wYvPskIDaNvX3dT5mfKEXf7G64CLc304ABT90NdDeQzg2iGFXt7H9+qK2zWeSFbpnFhW0spAfMVU=; Message-ID: <527122.4074.qm@web26005.mail.ukl.yahoo.com> X-YMail-OSG: 7LAhwQUVM1kHZcFQILqD.KNvVBlxzQd1QxkLkcZDnjjiH0d GF_C7RCkCO4c9K1GCuX6P45cLxGcfLqVfVPgdZzrYU0iRDo.pUlpmkiKMH0x KT7TM7Eqv3T7imr3hHG7FZNU82dKLi6geEDYPd1RL8ysQ8B_juwxYszRRvOM NydK2mz3PE1zm8MOM9oPi_B3taMn4aaiBfn5PFoGmqrdtyU_P_D8fk0PUv0M TQhqOaVyhK03OW1wqvhJAJBrgxcOzdP1MIGYZWKmS1qMiWn88u3kLwXfcD61 eujyjLap8QM.K.pBisDzF5DyRaKvhy.l6s9oK17b70C11XaSMPfelKeiFYy6 YEjNimQnktWbvW8K.6Tjl Received: from [83.100.146.195] by web26005.mail.ukl.yahoo.com via HTTP; Tue, 12 Apr 2011 13:35:19 BST X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.109.295617 Date: Tue, 12 Apr 2011 13:35:19 +0100 (BST) From: Glyn Astill Subject: Re: Linux: more cores = less concurrency. To: david@lang.hm, Steve Clark , Kevin Grittner Cc: "Joshua D. Drake" , Scott Marlowe , pgsql-performance@postgresql.org In-Reply-To: <4DA32DE3020000250003C68E@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201104/153 X-Sequence-Number: 43215 --- On Mon, 11/4/11, Kevin Grittner wrote:=0A= =0A> From: Kevin Grittner =0A> Subject: Re: [P= ERFORM] Linux: more cores =3D less concurrency.=0A> To: david@lang.hm, "Ste= ve Clark" , "Kevin Grittner" , "Glyn Astill" =0A> Cc: "Joshua D. Drake" , "Scott Marlowe" , pgsql-perfo= rmance@postgresql.org=0A> Date: Monday, 11 April, 2011, 22:35=0A> "Kevin Gr= ittner" =0A> wrote:=0A> =0A> > I don't know w= hy you were hitting the knee sooner than=0A> I've seen=0A> > in my benchmar= ks=0A> =0A> If you're compiling your own executable, you might try=0A> boo= sting=0A> LOG2_NUM_LOCK_PARTITIONS (defined in lwlocks.h) to 5 or=0A> 6.=A0= The=0A> current value of 4 means that there are 16 partitions to=0A> sprea= d=0A> contention for the lightweight locks which protect the=0A> heavyweigh= t=0A> locking, and this corresponds to your best throughput=0A> point.=A0 I= t=0A> might be instructive to see what happens when you tweak the=0A> numbe= r=0A> of partitions.=0A> =0A=0ATried tweeking LOG2_NUM_LOCK_PARTITIONS bet= ween 5 and 7. My results took a dive when I changed to 32 partitions, and i= mproved as I increaced to 128, but appeared to be happiest at the default o= f 16.=0A=0A> Also, if you can profile PostgreSQL at the sweet spot and=0A> = again at a=0A> pessimal load, comparing the profiles should give good=0A> c= lues about=0A> the points of contention.=0A> =0A=0AResults for the same ma= chine on 8 and 32 cores are here:=0A=0Ahttp://www.8kb.co.uk/server_benchmar= ks/dblt_results.csv=0A=0AHere's the sweet spot for 32 cores, and the 8 core= equivalent:=0A=0Ahttp://www.8kb.co.uk/server_benchmarks/iostat-32cores_32C= lients.txt=0Ahttp://www.8kb.co.uk/server_benchmarks/vmstat-32cores_32Client= s.txt=0A=0Ahttp://www.8kb.co.uk/server_benchmarks/iostat-8cores_32Clients.t= xt=0Ahttp://www.8kb.co.uk/server_benchmarks/vmstat-8cores_32Clients.txt=0A= =0A... and at the pessimal load for 32 cores, and the 8 core equivalent:=0A= =0Ahttp://www.8kb.co.uk/server_benchmarks/iostat-32cores_100Clients.txt=0Ah= ttp://www.8kb.co.uk/server_benchmarks/vmstat-32cores_100Clients.txt=0A=0Aht= tp://www.8kb.co.uk/server_benchmarks/iostat-8cores_100Clients.txt=0Ahttp://= www.8kb.co.uk/server_benchmarks/vmstat-8cores_100Clients.txt=0A =0Avm= stat shows double the context switches on 32 cores, could this be a factor?= Is there anything else I'm missing there?=0A=0ACheers=0AGlyn