简体   繁体   中英

Can anyone recommend best practices for profiling Ruby on Rails software under Passenger/nginx combination in a live server environment?

I am attempting to determine what can possibly be the causative factor for 20+ second response times from a Rails 3 application located in EC2 using Elasticache. I have reason to believe the problem is in fact cache related, but I have no numbers to prove it. I'd like to get those numbers. For the sake of completeness, we're running the applications atop Ubuntu 12.04 .

Searching Google, I found nothing directly relevant to my situation, and no StackOverflow topics I could find were even remotely relevant to my situation. If anyone can point me to some documentation on the matter, I'd be quite appreciative. Thank you!

I've found the best tool for this to be New Relic.

http://newrelic.com/

I don't work for them and get no benefit from you trying them.

They have a free level that you can start with. If you go up to the non-free version you can literally trace all your requests through different models and into the database telling you how long the app spent in each section. It's a great tool for profiling.

Do you, by any chance have access to standard web logs including URLs and response times?

I faced a similar situation, searched the web, found nothing relevant, and eventually decided to roll my own, which I shared in this SO post:

Profiling a multi-tiered, distributed, web application (server side)

While it is far from perfect and may be too high level for some use-cases, it gave me a pretty quick and broad insight into where the application I was trying to profile is spending most of its time in, and what the slowest parts are. HTH.

The best parts of it are that:

  • It is 100% platform and programming language independent.
  • It is a 100% free software solution

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM