How to know if throttling occured?

37 views
Skip to first unread message

Stephan Hagemann

unread,
Feb 13, 2018, 6:21:30 PM2/13/18
to Google Cloud SQL discuss
Hi all,

I have a question regarding Postgres SQL.

A long-running query ran three times over the last couple of days. The first time it took about 20 minutes, the next time about 4 hours, the last time, well (my measurement timed out), longer than 4 hours.

Now I am working my way through https://cloud.google.com/sql/docs/postgres/diagnose-issues and stumbled across this line:

If your workload consists of CPU intensive queries (sorting, regexes, other complex functions), your instance might be throttled; add vCPUs.

Is this saying that active throttling might occur if I max out the CPUs?
If so, how do I find out whether I am being throttled?

The reason I am asking is that over the last couple of days my CPU usage did look like this (and my slow queries occured after the big 95% block). After the block no query bumps the load over 20%...

 

Thanks!
Stephan
Auto Generated Inline Image 1

Kenworth (Google Cloud Platform)

unread,
Feb 13, 2018, 9:20:23 PM2/13/18
to google-cloud...@googlegroups.com
Is this saying that active throttling might occur if I max out the CPUs?

Yes. Per this doc, if CPU utilization is over 98% for 6 hours, your instance is not properly sized for your workload and consequently be throttled.
 
If so, how do I find out whether I am being throttled?

You can monitor the Read/Write operations metric, Seconds Behind Master, or the CPU utilization (as you posted) from the GCP Console to indicate whether throttling is occurring. To monitor these usages and receive alerts at a specified threshold, set up a Stackdriver alert
Reply all
Reply to author
Forward
0 new messages