I'm moving a rails application from heroku to AWS in order to increase reliability and control over the stack architecture.

I was planning to use amazon RDS as I will need several app servers, and a managed MySQL solution on amazon network seemed a perfect match for our case. I configured the app server and new relic for tracing and profiling.

Unfortunatly my server perform worse than it did on heroku altough we're using 2 m3.medium instances for our tests (compared to a 2 1x dynos on heroku).

Looking at new relic it came out that is the database requiring 90% of time (~1.0 sec!) for simple select queries (nothing too complex as it worked out of the box on heroku/cleardb). Simple SELECT's are running in a second, so I tried out by tweaking the default configuration as I found some suggestions on a blog post, but nothing has changed (now the config is restored to the default)... I also tried by enabling IOPS (1000 where new relic counts ~6 req/s on the server -not already publicly available of course-), and still nothing has changed...

I am now moving from the db.m3.medium to db.m3.xlargeto check if something changes... Just for testing purposes I installed a local mysql on the machine and well... pages are server in ~0.2 seconds, so I am pretty sure it's the RDS instance causing the remaining delay.

Any suggestion on what can I try? I don't really need a big instance as db.m3.xlarge at the moment.

  • Run some EXPLAINs on your queries. – ceejayoz Aug 29 '14 at 15:05
  • Hi @ceejayoz I ran some explain from my rails console and it returned empty sets instead of query data (is this a right behaviour?) Btw it also tols me queries were run in 0.00sec which is not really possible.Do I need to set RDS to automatically run EXPLAINs as it receives any query? – CodeShining Aug 30 '14 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.