4
votes

Now, I admit I'm new to using Google Cloud SQL but I have several years of experience running MySQL servers locally and I consider myself almost an expert on it.

Now, since a few days I have uploaded the database used for the mobile phone game RummyFight to Google Cloud SQL. A MySQL database that is normally run on a 2GHz PC with 2 GB RAM only (Win Server 2000). At peak hours it handles about 250 requests per second and since it's well built with good usage of indexes, my local machine has been able to cope with it.

I've been monitoring the Cloud SQL during these days and I can see very severe drops in performances from time to time. It's almost like it's standing still. My customers playing the game are experiencing the same.

Please take a look at the attached screen capture from tonight and explain to me if this is normal or not. I really need a reliable database and I don't know if I demand too much to Google's cloud SQL. Maybe it's more built for volumes than speed.

Please advice.

P.S. The cloud database is configured as a D4-2 GB RAM with asynchronous writes.

P.S #2: Yes, I have ruled out that the problem is in the web server since it's the same as have been used with the local DB. Besides, it's only at 2% load at the maximum.

Pic of database performance

1
Can you please contact us at [email protected] with the exact name of the instance? - Razvan Musaloiu-E.
I am having the same issue.. queries that take 0.0002 on my server are taking 0.06-0.07 on GCS. even running a simple SELECT * FROM table for an empty with 5 fields table takes 0.04-0.02 seconds ... :-( - Fabrizio
Did you find out why the performances dropped from time to time? I have the exact same problem: it's good most of the time, and then suddenly the performance drops for 1 day. I hope your solution was not to rollback the shift to google cloud, but this is what I fear. - Christophe Fondacci
best way to get performance out of Cloud SQL is Stored Procedure. As the latency between DB server and Application server are high it may be better to use Procedure to reduce the data transfer delay - arvindwill

1 Answers

2
votes

Several things can influence Cloud SQL's responsiveness, chief amongst them is the Activation Policy if set to "On Demand": this causes the instance to shut down after 15 minutes of inactivity. Next request after that needs to take into account a boot-up delay (to avoid a time-out).

Also, Cloud SQL is designed with scalability, and reliability in mind, rather than raw performance. For such applications, the ideal set-up would be an adequately potent Compute Engine instance using Local SSD, and running MySQL.