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 1g2ygC-0007oo-Gq for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 13:07:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2ygA-0001xa-5M for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 13:07:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2yg9-0001wl-RA for pgsql-hackers@lists.postgresql.org; Thu, 20 Sep 2018 13:07:33 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2yfy-0007gQ-AC for pgsql-hackers@lists.postgresql.org; Thu, 20 Sep 2018 13:07:32 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 90EF05F79C; Thu, 20 Sep 2018 09:07:21 -0400 (EDT) Date: Thu, 20 Sep 2018 09:07:21 -0400 From: Stephen Frost To: Andres Freund Cc: Tom Lane , Amit Khandekar , Andreas Joseph Krogh , Robert Haas , Alvaro Herrera , "Jonathan S. Katz" , PostgreSQL Hackers Subject: Re: Query is over 2x slower with jit=on Message-ID: <20180920130721.GM4184@tamriel.snowman.net> References: <20180822165155.tjbib4pewnbiyy4x@alap3.anarazel.de> <20180910160909.qf3h3ttztvbyyuds@alap3.anarazel.de> <27812.1537221015@sss.pgh.pa.us> <20180919224047.mcdjwis56ywqzhzs@alap3.anarazel.de> <11291.1537414012@sss.pgh.pa.us> <20180920033922.zi6n6vk7ilxaseu3@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qt/8o3zVjmkHzDiC" Content-Disposition: inline In-Reply-To: <20180920033922.zi6n6vk7ilxaseu3@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --qt/8o3zVjmkHzDiC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Andres Freund (andres@anarazel.de) wrote: > On 2018-09-19 23:26:52 -0400, Tom Lane wrote: > > Andres Freund writes: > > > JIT: > > > Functions: 2 > > > Generation Time: 0.680 ms > > > Inlining: true > > > Inlining Time: 7.591 ms > > > Optimization: true > > > Optimization Time: 20.522 ms > > > Emission Time: 14.607 ms [...] > > > How about making that: > > > JIT: > > > Functions: 2 >=20 > FWIW, not that I want to do that now, but at some point it might make > sense to sub-divide this into things like number of "expressions", > "tuple deforming", "plans", ... Just mentioning that if somebody wants > to comment on reformatting this as well, if we're tinkering anyway. I'd actually think we'd maybe want some kind of 'verbose' mode which shows exactly what got JIT'd and what didn't- one of the questions that I think people will be asking is "why didn't X get JIT'd?" and I don't think that's very easy to figure out currently. > > > Options: Inlining, Optimization > > > Times (Total, Generation, Inlining, Optimization, Emission): 43.4 m= s, 0.680 ms, 7.591 ms, 20.522 ms, 14.607 ms > >=20 > > > or something similar? > >=20 > > That's going in the right direction. Personally I'd make the last line > > more like > >=20 > > Times: generation 0.680 ms, inlining 7.591 ms, optimization 20.522 = ms, emission 14.607 ms, total 43.4 ms >=20 > Yea, that's probably easier to read. I tend to agree that it's easier to read but I'm not sure we need to quite go that far in reducing the number of rows. > > (total at the end seems more natural to me, YMMV). I agree with this.. > I kind of think doing it first is best, because that's usually the first > thing one wants to know. and this, so what about: Times: generation 0.680 ms, inlining 7.591 ms, optimization 20.522 ms, emission = 14.607 ms Total: 43.4 ms Gets the total out there quick on the left where you're scanning down while keeping the detailed info above for reviewing after. > > Also, the "options" format you suggest here seems a bit too biased > > towards binary on/off options --- what happens when there's a > > three-way option? So maybe that line should be like > >=20 > > Options: inlining on, optimization on > >=20 > > though I'm less sure about that part. >=20 > I'm pretty certain you're right :). There's already arguments around > making optimization more gradual (akin to O1,2,3). That certainly sounds like it'd be very neat to have though I wonder how well we'll be able to automatically plan out which optimization level to use when.. Thanks! Stephen --qt/8o3zVjmkHzDiC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbo5uJAAoJEO1sijiDR2RV80UP/1x0696nBaMhbbQVGMNpY4K9 S2FeSTo4x9zEs+mVGyXHvu18QUFJpYUew06NWbOFtfRmMEuUNKQzcMnJzB1QqUQw YvEBggPdwnnOUrB77npRvLOgZxtMKcDM7pBLtJWZ15M3/Ima5rTwVZXh3tVxzNba Ap5YT3CjakHE0RIuPjgxVn18nPjdADwgtpL7UecxDsjoKY20ykR8guz2+q212EiQ xf+BYtZp9nfKQbgfc08dh+QOMvzReQSS0+XK7gIspu4CMmgGMcBMHVe8Xnq3XlyR y2I+/h7oBQo37LpClj+GESq6p82+jw8VYYMPLUbC/ewHDXK8RYD8Z1Te8ouvmteT qw3WVdiZ8obfiT716AAeEcO52kwROFSPMhCXG2EcBqK7wprnSR8ChCx3eJyTKv0a S6xTAdm4gJhxak+nyIjWxZUrKDz0E6SlV6QWrGoTKFKBJt3UYaI95Y27FAJYN9ST c6xRvWlkHqWupEmklTF9qFRQJHwuYOywfP8O75QeLTCVi18MmGsZPUa+FaDJSc8P vaOoYmh5iyCO5ZfkwEvMe0+vO/wXvFRiWqmMN74s74tpiAnhBOSnPLpe2no888iY ufLBIIeYpPbxItKFqi2srQ4Sx3USj7U4nBIQ63MbMPOb3EwefIlmPQQnvY/GrgyN bgxXnpuogHFEdStHU7yX =AcXN -----END PGP SIGNATURE----- --qt/8o3zVjmkHzDiC--