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

2021-08-31 Thread Andrew Dunstan


On 8/30/21 10:18 PM, [email protected] wrote:
>>  I see on https://www.postgresql.org/download/ that there is a different
>>  installer from 2ndQuadrant. I am going to try that one and see what I
>>  come up with. Are there any other "standard" distros of Postgres that I
>>  could try out?
>>  
>>  I found out I could download Visual Studio community edition so I am
>>  trying this, but may not have the time to get through a build any time
>>  soon as per my unfamiliarity with the process. I'll follow Ranier's 
> steps
>>  and see if that gets me somewhere.
>>  
>>  Thank you,
>>  Laurent.
>
>
> Hello all,
>
> I think I had a breakthrough. I tried to create a local build and wasn't able 
> to. But I downloaded the 2nd Quadrant installer and the issue disappeared!!! 
> I think this is proof that it's not my personal environment, nor something 
> intrinsic in the codebase, but definitely something in the standard EDB 
> installer.
>
>

No, you're on the wrong track. As I reported earlier, I have reproduced
this issue with a vanilla build which has no installer involvement
whatsoever.

I'm pretty sure the reason you are not seeing this with the 2ndQuadrant
installer is quite simple: it wasn't build with NLS support.

Let me repeat what I said earlier. I will get to the bottom of this.
Please be patient and stop running after red herrings.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com





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

2021-08-31 Thread [email protected]


   >  -Original Message-
   >  From: Andrew Dunstan 
   >  Sent: Tuesday, August 31, 2021 09:40
   >  To: [email protected]; Julien Rouhaud 
   >  Cc: Tom Lane ; Ranier Vilela ;
   >  Justin Pryzby ; pgsql-
   >  [email protected]
   >  Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2
   >  and 13.4
   >  
   >  
   >  On 8/30/21 10:18 PM, [email protected] wrote:
   >  >>  I see on https://www.postgresql.org/download/ that there is a
   >  different
   >  >>  installer from 2ndQuadrant. I am going to try that one and see
   >  what I
   >  >>  come up with. Are there any other "standard" distros of Postgres
   >  that I
   >  >>  could try out?
   >  >>
   >  >>  I found out I could download Visual Studio community edition so I
   >  am
   >  >>  trying this, but may not have the time to get through a build any
   >  time
   >  >>  soon as per my unfamiliarity with the process. I'll follow 
Ranier's
   >  steps
   >  >>  and see if that gets me somewhere.
   >  >>
   >  >>  Thank you,
   >  >>  Laurent.
   >  >
   >  >
   >  > Hello all,
   >  >
   >  > I think I had a breakthrough. I tried to create a local build and wasn't
   >  able to. But I downloaded the 2nd Quadrant installer and the issue
   >  disappeared!!! I think this is proof that it's not my personal
   >  environment, nor something intrinsic in the codebase, but definitely
   >  something in the standard EDB installer.
   >  >
   >  >
   >  
   >  No, you're on the wrong track. As I reported earlier, I have reproduced
   >  this issue with a vanilla build which has no installer involvement
   >  whatsoever.
   >  
   >  I'm pretty sure the reason you are not seeing this with the 2ndQuadrant
   >  installer is quite simple: it wasn't build with NLS support.
   >  
   >  Let me repeat what I said earlier. I will get to the bottom of this.
   >  Please be patient and stop running after red herrings.
   >  
   >  
   >  cheers
   >  
   >  
   >  andrew
   >  
   >  
   >  --
   >  Andrew Dunstan
   >  EDB: https://www.enterprisedb.com

OK... I thought that track had been abandoned as per Julien's last message. 
Anyways, I'll be patient!

Thank you for all the work.
Laurent.




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

2021-08-31 Thread Julien Rouhaud
On Tue, Aug 31, 2021 at 10:51 PM [email protected]
 wrote:
>
> OK... I thought that track had been abandoned as per Julien's last message. 
> Anyways, I'll be patient!
>

I just happened to have both standard installer and locally compiled
versions available, so I could confirm that I reproduced the problem
at least with the standard installer.  Note that my message also said
" if default build on windows has NLS included".  After looking a bit
more into the Windows build system, I confirm that NLS isn't included
by default so this is not the problem, as Andrew said.

After installing gettext and a few other dependencies, adapting
config.pl I wish I could also confirm being able to reproduce the
problem on my build, but apparently I'm missing something as I can't
get any modification in config.pl have any effect.  I'm not gonna
waste more time on that since Andrew is already in the middle of the
investigation.




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

2021-08-31 Thread Andrew Dunstan


On 8/31/21 11:37 AM, Julien Rouhaud wrote:
> On Tue, Aug 31, 2021 at 10:51 PM [email protected]
>  wrote:
>> OK... I thought that track had been abandoned as per Julien's last message. 
>> Anyways, I'll be patient!
>>
> I just happened to have both standard installer and locally compiled
> versions available, so I could confirm that I reproduced the problem
> at least with the standard installer.  Note that my message also said
> " if default build on windows has NLS included".  After looking a bit
> more into the Windows build system, I confirm that NLS isn't included
> by default so this is not the problem, as Andrew said.
>
> After installing gettext and a few other dependencies, adapting
> config.pl I wish I could also confirm being able to reproduce the
> problem on my build, but apparently I'm missing something as I can't
> get any modification in config.pl have any effect.  I'm not gonna
> waste more time on that since Andrew is already in the middle of the
> investigation.



The culprit turns out to be the precise version of libiconv/libintl
used. There is a slight difference between the versions used in the
11.13 installer and the 13.4 installer. We need to dig into performance
more (e.g. why does the test take much longer on an NLS enabled build
even when we are using 'initdb --no-locale'?) But I'm pretty confident
now that this is the issue. I've started talks with our installer guys
about fixing it.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com





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

2021-08-31 Thread Julien Rouhaud
On Wed, Sep 1, 2021 at 1:56 AM Andrew Dunstan  wrote:
>
> The culprit turns out to be the precise version of libiconv/libintl
> used. There is a slight difference between the versions used in the
> 11.13 installer and the 13.4 installer. We need to dig into performance
> more (e.g. why does the test take much longer on an NLS enabled build
> even when we are using 'initdb --no-locale'?) But I'm pretty confident
> now that this is the issue. I've started talks with our installer guys
> about fixing it.

FTR it's consistent with my own setup.  I could finally compile
postgres with NLS support and libintl 0.18.1 and I only got a limited
overhead: the runtime increases from ~460ms to ~1.5s (and ~2s with
lc_messages to something else than C), but that's way better than the
~44s with the current edb version.