Saturday, November 24, 2018

[google-cloud-sql-discuss] Re: Google Cloud SQL (Postgres) 30% slower than local PC

Thanks Dan. We got it to a point now where the performance is fair enough. It's a tidy bit slower then our previous setup but it can handle load better, so we are fine with it for now. Will go through the articles soon to see if we can improve it a bit more. 

Op maandag 19 november 2018 22:09:26 UTC+1 schreef Dan (Cloud Platform Support):

Hello,


It seems that you didn't create this report two times, there are no worries.


Unfortunately, there is no way to compare the Cloud SQL Postgre performance with another Cloud SQL service from my side.


It seems that you're following the right steps to improve the Database performance, such as check the location, increase the tier when the instance looks throttled and upgrade the disk since larger disks have more IOPS available. I would add on your to-do list to implement cache, case your queries will not be constrained to I/O performance. Ideally, the entire data set can fit in 70% of RAM. Additionally, I recommend that you investigate non-Cloud SQL issues, like optimized queries by adding appropriate indexing, reduce the scanned data and avoid extra round trips. Uou can find some information regarding this in the following website[1].


You can troubleshoot performance issues by following the instructions in the following documentation[2].


I hope this documentation could help you to determine the root cause of this performance issue,


[1] https://use-the-index-luke.com/

[2] https://cloud.google.com/sql/docs/postgres/diagnose-issues



On Thursday, November 15, 2018 at 11:07:03 AM UTC-5, Marcel wrote:
Hi,

I hope I don't post this duplicate because I already posted this, but I cannot find it anywhere so maybe something went wrong.

We are migrating our APP + DB to Google Cloud. However, we can't get the database to a level of performance as needed. We created a heavy select query with lots of joins and on my local PC it's way faster than it's on Google Cloud SQL. We are moving from a managed Amazon solution, and the current setup on Amazon is also faster. On both my PC and Amazon it's somewhere nere 30% faster on any query. 

How come Google Cloud SQL Postgres is so slow? I tried a lot of things to increase the performance:
  • Upgraded the disk to improve read/write speed as suggested by Google
  • Added more CPUs and RAM (makes no difference)
  • The database instance runs in Frankfurt which is close to my home so I don't think there is any noticable latency on this end
What else can I try to improve the performance? I find it very strange that my PC (which is not optimized to run Postgres) is 30% faster than a optimized instance on Google Cloud. 

How can I debug this and how can I improve this? 

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/78df2a8f-acf3-4c9b-8955-5640af3cee18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment