RDS PostgreSQL 11.1: high CPU and Write IOPS after upgrade?

0

After upgrading our PostgreSQL database instance ("livedb") from 9.5 to 11.1, we are seeing CPU and Write IOPS spikes after 5 minute intervals, and ~20% usage when idle which is much more than earlier.
The load has been very low since and no other changes were made in the database, but the average CPU usage is at an all-time high and we are running out of CPU credits. I tried different configurations, but currently am using the default "default.postgres11" parameter group.

mrklk
asked 5 years ago1620 views
3 Answers
0

After upgrading my Postgres instance from 10.6 to 11.2, I'm seeing high IOPS and my queries are taking more time to complete.

Before the upgrade, my long running queries takes 300-400 write IOPS to complete.
After the upgrade, my long running queries takes 1000-1200 write IOPS to complete.

answered 5 years ago
0

Same problem here also if with Sql Server.

after an update to sql server some days ago, I am having problem of HIGH CPU utilization.

It is exactly the same situation of november (when I updated sql instance to a major release). I just rebooted the instance but did NOT solved the problem.... Please help me.

answered 5 years ago
0

Please note by default RDS postgres makes use of Pg_upgrade call for the major version upgrade. Although RDS is managed service but it doesn't applies any additional methods/activities over the Vanila Postgres defined actions/workflows. With reference to the following official PostgreSQL documentation[1] :

"Statistics: Because optimizer statistics are not transferred by pg_upgrade, you will be instructed to run a command to regenerate that information at the end of the upgrade."

Additionally, please check the note under AWS RDS PostgreSQL Major version Upgrade document[2], which states “After you have completed the upgrade, you should run the ANALYZE operation to refresh the pg_statistic table“. In future, you can make use of the below method for running ANALYZE for in a better and a faster way.

This also makes SQLs performing better. A better way to do that is using vacuumdb[3], like this:

vacuumdb -U [your user] -d [your database] -Ze -h [your rds endpoint]

It will optimize your database execution plan only, not freeing space, but will take less time than a complete vacuum.

References/Links:

[1] https://www.postgresql.org/docs/10/static/pgupgrade.html
[2] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html
[3] https://www.postgresql.org/docs/10/static/app-vacuumdb.html

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions