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
질문됨 5년 전1638회 조회
3개 답변
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.

답변함 5년 전
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.

답변함 5년 전
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

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠