elsonwx
elsonwx

Reputation: 1619

How to find the reason which cause Postgres CPU Utilization steep increase?

Every UTC 0:00,the aws Postgres RDS instance has a cpu utilizaiton steep increase.

enter image description here

Our backend program doesn't have a scheduled task at this time.There was no sudden request at this time either。the DB Connections,Free Storage Space,Freeable Memory,Write IOPS,Read IOPS are all in normal level.

and I have used

SELECT pid, age(query_start, clock_timestamp()), usename, query,state FROM pg_stat_activity WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' ORDER BY query_start desc;

to find some exception queries,but there is not any slow query.

so,where should I look for reasons?

Upvotes: 1

Views: 561

Answers (1)

Gagandeep Singh
Gagandeep Singh

Reputation: 74

You can check for your scheduled processes(either its backup or some db\application jobs) or try enabling log_min_duration_statement parameter in PostgreSQL.conf file to track any bad query.

Upvotes: 2

Related Questions