RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

From: "ldh(at)laurent-hasson(dot)com" <ldh(at)laurent-hasson(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
Cc: "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Date: 2021-08-21 21:48:45
Message-ID: MN2PR15MB256056A5FE2749BD94BF6DB385C29@MN2PR15MB2560.namprd15.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> -----Original Message-----
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Sent: Saturday, August 21, 2021 14:05
> To: Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
> Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
> Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2
> and 13.4
>
> Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com> writes:
> > I know that 14 is a beta version but the performance is significantly
> > worse than v13 (I assume it's 13.4). Head revision is better than v14
> > but still worse than v13.  Can you expand a bit on the difference?
>
> [ shrug... ] I don't see any meaningful differences between those
> numbers --- they're within 3% or so across versions, which is less than
> the margin of error considering I wasn't trying to control for outside
> effects like CPU speed stepping. Microbenchmarks like this one are
> notoriously noisy. Maybe there's some real difference there, but these
> numbers aren't to be trusted that much.
>
> What I was looking for was some evidence matching Laurent's report of
> the exception-recovery path being 500X slower than non-exception.
> That would have been obvious even with the sloppiest of measurements
> ... but I'm not seeing it.
>
> regards, tom lane
>

Hello Tom,

The difference for the Exceptions-scenario between V11.2 and V13.4 that I observed was 30x.
It is the difference on V13.4 between the Exceptions and no-exceptions scenarios that is 500x+.

Just to clarify.

I am following up with Justin's suggestions and will respond with updated info soon.

Thank you!
Laurent Hasson.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message ldh@laurent-hasson.com 2021-08-21 21:56:52 RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Previous Message Justin Pryzby 2021-08-21 21:24:11 Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4