1

I'm using a hosting, where I have 60MB RAM

My Rails3 app is using 63MB RAM.

I want to optimize it, but How I can find out, what code part takes most memory ?

fkoessler
  • 6,932
  • 11
  • 60
  • 92
astropanic
  • 10,800
  • 19
  • 72
  • 132
  • 1
    that doesn't solve the problem, How should an bigger hosting find out what eats most memory ? Read more carefully the questions – astropanic Dec 30 '10 at 14:33

2 Answers2

2

it depends on your rack middleware, but I'm not sure.

Plugins which helps you to log your memory usage on Github: Oink, MemoryLogic, Bleak_house.

For sure I would try a Caching plugin! Rack-cache seems a really pure one, find it on Github.

Read this ruby/ruby on rails memory leak detection

Ruby Enterprise Edition may halp, but I don't know your hosting provider. For first shot I found this for Passenger: sudo passenger-memory-stats Have you tried hosting on Heroku?

Sorry for not giving any url, but system didn't allow me. Good luck, gezope

Community
  • 1
  • 1
YogiZoli
  • 870
  • 1
  • 9
  • 17
0

You should use a service such as Appsignal / Sentry / ScoutAPM / New Relic to have a better understanding of what's happening in your production environment.

fkoessler
  • 6,932
  • 11
  • 60
  • 92