Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCprD-0005ee-Qp for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jul 2015 13:57:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCprD-0007Q1-9V for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jul 2015 13:57:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCpqM-0006Ty-NK for pgsql-bugs@postgresql.org; Wed, 08 Jul 2015 13:56:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCpqK-0005bf-2t for pgsql-bugs@postgresql.org; Wed, 08 Jul 2015 13:56:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t68DupUt020954; Wed, 8 Jul 2015 09:56:51 -0400 From: Tom Lane To: Andres Freund cc: grb@skogoglandskap.no, pgsql-bugs@postgresql.org Subject: Re: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4) In-reply-to: <20150708125512.GL10242@alap3.anarazel.de> References: <20150707222739.1188.8068@wrigleys.postgresql.org> <31265.1436317984@sss.pgh.pa.us> <20150708091238.GI10242@alap3.anarazel.de> <20150708125512.GL10242@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 08 Jul 2015 14:55:12 +0200" Date: Wed, 08 Jul 2015 09:56:51 -0400 Message-ID: <20953.1436363811@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund writes: > So there's an interesting "dip" between 4 and 8 clients. A perf profile > doesn't show any actual lock contention on master. Not that surprising, > there shouldn't be any exclusive locks here. What size of machine are you testing on? I ran Graeme's tests on a 2-socket, 4-core-per-socket, no-hyperthreading machine, which has separate NUMA zones for the 2 sockets. What I saw (after fixing the "stable" issue) was that all the 8-client and 16-client cases were about 8x faster than 1-client, and 2-client was generally within hailing distance of 2x faster, but 4-client was often noticeably worse than the expected 4x faster. I figured this was likely some weird NUMA effect, possibly compounded by brutally stupid scheduling on the part of my kernel. But I didn't have time to look closer. You might be seeing the same kind of effect, or something different. It's hard to tell without knowing more about your machine. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs