Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyap2-0005km-JQ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Sep 2018 10:50:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyaoo-0001MG-Vw for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Sep 2018 10:50:22 +0000 Received: from makus.postgresql.org ([174.143.35.229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyaoo-0001Kv-Gr for pgsql-hackers@lists.postgresql.org; Sat, 08 Sep 2018 10:50:22 +0000 Received: from post.visena.com ([46.226.10.50]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fyahO-0005f9-EK for pgsql-hackers@lists.postgresql.org; Sat, 08 Sep 2018 10:43:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=visena.com; s=20141101.wh; h=Content-Type:MIME-Version:Subject:In-Reply-To:Message-ID:To:From:Date; bh=t3akkaMCZuB4U6qgwkcW5Daz8nG/Q++nWf32tvnFwYw=; b=Asi/LGtjA9EcoQNlTHV0QtS5dGTMuEkcpsL3PpX0HuejPuuB+VpyA8hxgi2FNDBwyogyDifUAT2FnZPFkL44PeCuGTAeSKqAJTuBMo7zShO0VAtrF7OQLZilPzaE06mZJSd6OdFSn0wCojrKR0cUrT/ARxd2HChz7yRPkXqFDJE=; Received: from [10.0.1.10] (helo=tc7-visena.wh.internal.visena.com) by post.visena.com with esmtp (Exim 4.82) (envelope-from ) id 1fyahJ-0008Ac-Ap for pgsql-hackers@lists.postgresql.org; Sat, 08 Sep 2018 12:42:39 +0200 Received: from localhost ([127.0.0.1] helo=tc7-visena.wh.internal.visena.com) by tc7-visena.wh.internal.visena.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fyais-00025U-GY for pgsql-hackers@lists.postgresql.org; Sat, 08 Sep 2018 12:44:14 +0200 Date: Sat, 8 Sep 2018 12:44:14 +0200 (CEST) From: Andreas Joseph Krogh To: pgsql-hackers@lists.postgresql.org Message-ID: In-Reply-To: Subject: Sv: Re: Query is over 2x slower with jit=on MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_25_1108310266.1536403454402" X-Mailer: Visena Mail 2.1.113 X-Spam-Score: -1.0 X-Spam-Report: SpamAssasin (score=-1.0, required 5.0 ALL_TRUSTED=-1,HTML_MESSAGE=0.001) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_25_1108310266.1536403454402 Content-Type: multipart/related; boundary="----=_Part_26_467446946.1536403454402" ------=_Part_26_467446946.1536403454402 Content-Type: multipart/alternative; boundary="----=_Part_27_646758791.1536403454412" ------=_Part_27_646758791.1536403454412 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 torsdag 23. august 2018 kl. 09:14:56, skrev Andreas Joseph Krogh < andreas@visena.com >: P=C3=A5 torsdag 23. august 2018 kl. 03:00:42, skrev Jonathan S. Katz < jkatz@postgresql.org >: > On Aug 22, 2018, at 7:13 PM, Andres Freund wrote: [snip] > For the archives sake: This likely largely is the consequence of > building with LLVM's expensive assertions enabled, as confirmed by > Jonathan over IM. I recompiled with the release version of LLVM. jit=3Don was still slower, but the discrepancy was not as bad as the previously reported result: jit =3D off Planning Time: 0.938 ms Execution Time: 935.599 ms jit =3D on Planning Time: 0.951 ms JIT: =C2=A0 Functions: 184 =C2=A0 Generation Time: 17.605 ms =C2=A0 Inlining: true =C2=A0 Inlining Time: 20.522 ms =C2=A0 Optimization: true =C2=A0 Optimization Time: 1001.034 ms =C2=A0 Emission Time: 665.319 ms Execution Time: 2491.560 ms However, it was still 2x+ slower, so still +1ing for open items. =C2=A0 =C2=A0 I compiled with whatever switches LLVM=C2=A0that comes with=C2=A0Ubuntu 18.= 04=C2=A0is built=20 with, and without debugging or=C2=A0assertions. =C2=A0 With 11b3 as of 825f10fbda7a5d8a48d187b8193160e5e44e4011 I'm repeatedly=20 getting these results with jit=3Don, after 10 runs: =C2=A0 =C2=A0 =C2=A0 Planning Time: 0.266 ms=20 JIT: =C2=A0Functions: 686 =C2=A0Generation Time: 71.895 ms =C2=A0Inlining: false =C2=A0Inlining Time: 0.000 ms =C2=A0Optimization: false =C2=A0Optimization Time: 39.906 ms =C2=A0Emission Time: 589.944 ms Execution Time: 2198.928 ms =C2=A0 =C2=A0 =C2=A0 Turning jit=3Doff gives this: =C2=A0 Planning Time: 0.180 ms Execution Time: 938.451 ms =C2=A0 I can provide dataset offlist if anyone wants to look into this. =C2=A0 -- Andreas Joseph Krogh ------=_Part_27_646758791.1536403454412 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 torsdag 23. august 2018 kl. 09:14:56, skrev Andreas Joseph Kro= gh <andreas@visena.com>:
P=C3=A5 torsdag 23. august 2018 kl. 03:00:42, skrev Jonathan S. Katz &= lt;jkatz@postgresql.org>:
> On Aug 22, 2018, at 7:13 PM, Andres Freund <andres@anarazel.de> = wrote:
[snip]
> For the archives sake: This likely largely is the consequence of
> building with LLVM's expensive assertions enabled, as confirmed by
> Jonathan over IM.

I recompiled with the release version of LLVM. jit=3Don was still slower, but the discrepancy was not as bad as the previously reported result:

jit =3D off
Planning Time: 0.938 ms
Execution Time: 935.599 ms

jit =3D on
Planning Time: 0.951 ms
JIT:
=C2=A0 Functions: 184
=C2=A0 Generation Time: 17.605 ms
=C2=A0 Inlining: true
=C2=A0 Inlining Time: 20.522 ms
=C2=A0 Optimization: true
=C2=A0 Optimization Time: 1001.034 ms
=C2=A0 Emission Time: 665.319 ms
Execution Time: 2491.560 ms

However, it was still 2x+ slower, so still +1ing for open items.
=C2=A0
=C2=A0
I compiled with whatever switches LLVM=C2=A0that comes with=C2=A0Ubunt= u 18.04=C2=A0is built with, and without debugging or=C2=A0assertions.
=C2=A0
With 11b3 as of 825f10fbda7a5d8a48d187b8193160e5e44e4011 I'm repeatedl= y getting these results with jit=3Don, after 10 runs:
=C2=A0
=C2=A0
=C2=A0
Planning Time: 0.266 ms
JIT:
=C2=A0Functions: 686
=C2=A0Generation Time: 71.895 ms
=C2=A0Inlining: false
=C2=A0Inlining Time: 0.000 ms
=C2=A0Optimization: false
=C2=A0Optimization Time: 39.906 ms
=C2=A0Emission Time: 589.944 ms
Execution Time: 2198.928 ms

=C2=A0
=C2=A0
=C2=A0
Turning jit=3Doff gives this:
=C2=A0
Planning Time: 0.180 ms
Execution Time: 938.451 ms
=C2=A0
I can provide dataset offlist if anyone wants to look into this.
=C2=A0
">
--
Andreas Joseph Krogh
------=_Part_27_646758791.1536403454412-- ------=_Part_26_467446946.1536403454402-- ------=_Part_25_1108310266.1536403454402--