Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCeId-0002X4-0Q for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jul 2015 01:37:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCeIb-0006tK-PV for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jul 2015 01:37:21 +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 1ZCeHg-00062j-QP for pgsql-bugs@postgresql.org; Wed, 08 Jul 2015 01:36:24 +0000 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZCeHc-0008KF-U9 for pgsql-bugs@postgresql.org; Wed, 08 Jul 2015 01:36:23 +0000 Received: by lbbpo10 with SMTP id po10so47185702lbb.3 for ; Tue, 07 Jul 2015 18:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=s7cgeRoww5YXfUefFANwPMQ0DlgAWDUI+rbCLFLiwLI=; b=wn+b8Xe7EoG++WoDNzmtoE29ZIo2A0XOKThA7FTPOGs7biy7WfziyrnX/boRZlsrxS atI87kWmDn5vMnbbJ0N0z9z8OMVUgbK6UURYkRM4QmTDpe3NbIAhiUlopvNrjmOHQ0hO nDrEtDS6PkM8TTyzFdr8zTQHQqtT8ZRSc/L1P+pSLhpnSgtDK/T9txJq6hSYL/N9jI2e YTHIrAnv5JCS8GR0/3Sk4XfPPtKKCFCjtXAssPEj1X7Z260hVEjFqap/utb5wDS4+jVb UPVrkMfRfrrZBpPnkahEMzSwbXCZmQ5zPHD0y7OuAAk2yeDFdee/Cwk8xtwhoamr0tF0 URjA== X-Received: by 10.112.73.33 with SMTP id i1mr6770058lbv.31.1436319379484; Tue, 07 Jul 2015 18:36:19 -0700 (PDT) Received: from [192.168.0.101] (ti0056a400-6081.bb.online.no. [85.165.98.212]) by smtp.gmail.com with ESMTPSA id c2sm33212laa.43.2015.07.07.18.36.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jul 2015 18:36:18 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4) From: Graeme In-Reply-To: <982A22C7-1695-4115-9197-A4D0D94C0CF4@anarazel.de> Date: Wed, 8 Jul 2015 03:36:16 +0200 Cc: "Graeme B. Bell" , pgsql-bugs@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com> References: <20150707222739.1188.8068@wrigleys.postgresql.org> <982A22C7-1695-4115-9197-A4D0D94C0CF4@anarazel.de> To: Andres Freund X-Mailer: Apple Mail (2.2098) X-Pg-Spam-Score: -2.7 (--) 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 On the machine used for this set of benchmarks, THP is set to never. I've s= een this on several machines with slight variations in their configuration.= =20 I spent days poring over best practice guides from google and others when s= etting these up, and I try to stay up to date with discussion on pgsql-perf= ormance for kernel and postgresql.conf.=20 - Don't have any spare machines currently, or time, to test on pg9.5. Going= into hospital soon and then to a conference. Wanted to get this published = first. - may not be able to provide perf data just now. Lots of work, little time,= bad health. Will try if i can though! Graeme Bell > On 8 Jul 2015, at 02:16, Andres Freund wrote: >=20 > On July 8, 2015 12:27:39 AM GMT+02:00, grb@skogoglandskap.no wrote: >> The following bug has been logged on the website: >>=20 >> Bug reference: 13493 >> Logged by: Graeme Bell >> Email address: grb@skogoglandskap.no >> PostgreSQL version: 9.3.9 >> Operating system: Linux >> Description:=20=20=20=20=20=20=20=20 >>=20 >> Hi, >>=20 >> pl/pgsql doesn't scale properly on postgres 9.3/9.4 with multiple >> processors >> beyond 2-3 processors for me, regardless of the machine I use or the >> benchmark/project.=20 >>=20 >> I discovered this painfully during a project here where we were running >> a >> small 'forest simulator' in pl/pgsql on different datasets >> simultaneously.=20 >>=20 >> To highlight the problem, I've provided a benchmark that demonstrates >> two >> problems (on my machines). >>=20 >> 1. The first problem is scaling when you have lots of pl/pgsql code >> running >> and doing real work.=20 >>=20 >> 2. The second problem is scaling when you have a table column as an >> input >> parameter.=20 >>=20 >> The benchmark results & source code are here: >>=20 >> https://github.com/gbb/ppppt >>=20 >> Another set of benchmarks showing the same phenomena on PG9.3 and PG9.4 >> can >> be found here, under 'BENCHMARKS.md' >>=20 >> https://github.com/gbb/par_psql >>=20 >> I would be grateful if others could run the benchmark and >> confirm/disconfirm >> the result.=20 >>=20 >> If confirmed, the result may be of special interest to e.g. the postgis >> & >> pgrouting communities. >>=20 >> This result is from a 16-core machine with 128GB of memory and a lot of >> random I/O capacity (there's no writing involved though other than a >> bit of >> WAL, and not much data, so this shouldn't matter). >=20 > That sounds odd.. Could you provide perf profiles with this running? Also= have you reproduced on 9.5? >=20 > Do you have transparent huge pages disabled? >=20 > ---=20 > Please excuse brevity and formatting - I am writing this on my mobile pho= ne. >=20 >=20 > --=20 > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs