Wednesday, February 1, 2012

Re: Terrible performance when deployed to GAE

Thanks for the infos Derrick.

There's 2 contributing factors I can see right away.

1 - Your instance just started at 12:42; probably awaken by the GAE request. Instances are essentially swapped out when they don't see requests, so this is expected. After a restart, the cache is cold, so it need to read from disk more than if it was warm and is slower.
2 - You're using Myisam, which only gets a small amount of cache RAM (we currently dedicate most of the RAM to the innodb cache), so we expect queries using myisam to be significantly slower (on a local machine, your OS cache hides the disk accesses).

Now it'd be interesting to gather query-level latency measurements from your app, and compare against the console timing, to see if there's a huge difference. You could first start with a single query and then start varying them to see if cache misses trigger the multi second latencies you're seeing.

Also, is your application configured to be an HR app? If not, this would also contribute to additional latency between the app and the DB.

jm.



No comments:

Post a Comment