Thread: Performance degradation after upgrading from 9.5 to 14
On 4/17/24 19:13, Johnathan Tiamoh wrote: > Hello, > > > I performed an upgrade from postgresql-9.5 to postgresql-14 and the > performance has degraded drastically. > > Please, is they any advice on getting performance back ? > There's very little practical advice we can provide based on this report, because it's missing any useful details. There's a number of things that might have caused this, but we'd have to speculate. For example: 1) How did you upgrade? pg_dump or pg_upgrade? 2) Did you run ANALYZE to collect statistics after the upgrade? 3) Did you transfer the configuration, or did you just create a new cluster with the default values? 4) What exactly is slower? Queries? Inserts? 5) Can you quantify the impact? Is it 2x slower? 100x slower? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
> On Apr 17, 2024, at 10:13, Johnathan Tiamoh <johnathantiamoh@gmail.com> wrote: > I performed an upgrade from postgresql-9.5 to postgresql-14 and the performance has degraded drastically. > > Please, is they any advice on getting performance back ? Run: VACUUM (ANALYZE, VERBOSE); More seriously (although make sure you did do that), "performance" is made up of a lot of components. There's no "go faster"switch in postgresql.conf you may have neglected. You'll need to do a bit of investigation first to find out whatis running slow, where it should be fast: I/O performance? Query times? Once you have that information, the communitycan provide much more assistance.
2) Did you run ANALYZE to collect statistics after the upgrade?
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?
4) What exactly is slower? Queries? Inserts?
5) Can you quantify the impact? Is it 2x slower? 100x slower?
On 4/17/24 19:13, Johnathan Tiamoh wrote:
> Hello,
>
>
> I performed an upgrade from postgresql-9.5 to postgresql-14 and the
> performance has degraded drastically.
>
> Please, is they any advice on getting performance back ?
>
There's very little practical advice we can provide based on this
report, because it's missing any useful details. There's a number of
things that might have caused this, but we'd have to speculate.
For example:
1) How did you upgrade? pg_dump or pg_upgrade?
2) Did you run ANALYZE to collect statistics after the upgrade?
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?
4) What exactly is slower? Queries? Inserts?
5) Can you quantify the impact? Is it 2x slower? 100x slower?
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
1) How did you upgrade? pg_dump or pg_upgrade?I use pg_ugrade with kink option.
2) Did you run ANALYZE to collect statistics after the upgrade?Yes. I ran vacuumdb-analyze in stages after the upgrade
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?I transfer the configuration
4) What exactly is slower? Queries? Inserts?queries
5) Can you quantify the impact? Is it 2x slower? 100x slower?it's more than 5 times slower than before. Very high load averagesOn Wed, Apr 17, 2024 at 1:25 PM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:On 4/17/24 19:13, Johnathan Tiamoh wrote:
> Hello,
>
>
> I performed an upgrade from postgresql-9.5 to postgresql-14 and the
> performance has degraded drastically.
>
> Please, is they any advice on getting performance back ?
>
There's very little practical advice we can provide based on this
report, because it's missing any useful details. There's a number of
things that might have caused this, but we'd have to speculate.
For example:
1) How did you upgrade? pg_dump or pg_upgrade?
2) Did you run ANALYZE to collect statistics after the upgrade?
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?
4) What exactly is slower? Queries? Inserts?
5) Can you quantify the impact? Is it 2x slower? 100x slower?
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
https://www.cybertec-postgresql.com/en/b-tree-index-improvements-in-postgresql-v12/
I reindexed all my database, when did upgrade pg<12 -> pg>=12 if pg_upgrade was a tool. exp-imp for upgrade does not need reindex.
br
Kaido
how about this:jit = off ?MarcinOn Wed, 17 Apr 2024 at 19:33, Johnathan Tiamoh <johnathantiamoh@gmail.com> wrote:1) How did you upgrade? pg_dump or pg_upgrade?I use pg_ugrade with kink option.
2) Did you run ANALYZE to collect statistics after the upgrade?Yes. I ran vacuumdb-analyze in stages after the upgrade
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?I transfer the configuration
4) What exactly is slower? Queries? Inserts?queries
5) Can you quantify the impact? Is it 2x slower? 100x slower?it's more than 5 times slower than before. Very high load averagesOn Wed, Apr 17, 2024 at 1:25 PM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:On 4/17/24 19:13, Johnathan Tiamoh wrote:
> Hello,
>
>
> I performed an upgrade from postgresql-9.5 to postgresql-14 and the
> performance has degraded drastically.
>
> Please, is they any advice on getting performance back ?
>
There's very little practical advice we can provide based on this
report, because it's missing any useful details. There's a number of
things that might have caused this, but we'd have to speculate.
For example:
1) How did you upgrade? pg_dump or pg_upgrade?
2) Did you run ANALYZE to collect statistics after the upgrade?
3) Did you transfer the configuration, or did you just create a new
cluster with the default values?
4) What exactly is slower? Queries? Inserts?
5) Can you quantify the impact? Is it 2x slower? 100x slower?
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Our practice has shown that enabling this parameter by default often resulted in less than optimal query plans in the cache.
Hello,I performed an upgrade from postgresql-9.5 to postgresql-14 and the performance has degraded drastically.Please, is they any advice on getting performance back ?King RegardsJohnathan T.
Цей електронний лист та будь-які передані разом із ним файли є кoнфіденцiйною iнформацiєю, що належить ПриватБанку й призначена тільки для використання фізичною або юридичною особою, якій їх адресовано. Якщо ви не зазначений адресат, то не маєте права зберігати, поширювати або копіювати цей лист. У разі помилкового отримання просимо видалити його та повідомити автору.
This email and any files transmitted with it are confidential information belonging to PrivatBank and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressее, you are not authorised to further store, disseminate or copy it. In case of receiving this email by mistake we kindly ask to delete it and inform the author.
On Tue, 23 Apr 2024 at 07:01, Олександр Янін <aleksandr.janin@privatbank.ua> wrote: > Try setting enable_memoize to off. > Our practice has shown that enabling this parameter by default often resulted in less than optimal query plans in the cache. It would be good to see a thread opened with details on this. I understand incorrect statistics can cause this but if there are other reasons, it would be good to know what they are. David
Same issue and took us ages to work out that is was JIT! The default is on, and setting off solves the problem. I have seen several blogs reporting the same and so wonder why this default is on?
Z
From: Олександр Янін <aleksandr.janin@privatbank.ua>
Sent: Monday, April 22, 2024 8:01 PM
To: Johnathan Tiamoh <johnathantiamoh@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Performance degradation after upgrading from 9.5 to 14
You don't often get email from aleksandr.janin@privatbank.ua. Learn why this is important |
CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe. Visit the information security portal (MetaCompliance - MyCompliance Cloud) to do your training.
Try setting enable_memoize to off.
Our practice has shown that enabling this parameter by default often resulted in less than optimal query plans in the cache.
ср, 17 апр. 2024 г. в 20:13, Johnathan Tiamoh <johnathantiamoh@gmail.com>:
Hello,
I performed an upgrade from postgresql-9.5 to postgresql-14 and the performance has degraded drastically.
Please, is they any advice on getting performance back ?
Same issue and took us ages to work out that is was JIT! The default is on, and setting off solves the problem. I have seen several blogs reporting the same and so wonder why this default is on?
I can confirm this, even in v16 we've turned JIT off.