Oded Harth
Oded Harth

Reputation: 4406

track application memory usage on heroku

I'm hosting a rails application on Heroku.

Is there a way I could track the memory usage of the running dynos?

Upvotes: 23

Views: 13617

Answers (4)

shinnc
shinnc

Reputation: 913

Heroku has a log-runtime-metrics feature to monitor the memory usage now.

To enable, run

$ heroku labs:enable log-runtime-metrics

and the memory usage will be shown on the server log. Read Heroku log-runtime-metrics docs for more information.

Upvotes: 32

Sim
Sim

Reputation: 13548

None of the answers provide a good way to track the memory usage of dynos, especially if you want to separate stack & heap usage from shared libraries, etc.

In my answer to another SO question I provide code that takes detailed snapshots of process memory usage and adds the ability to do threshold-based diffing to identify the areas with changing memory usage over time.

Here is the gist with the code for tracking the memory footprint of Heroku dynos.

Upvotes: 3

John Beynon
John Beynon

Reputation: 37507

Using the Heroku New Relic Standard addon - it's free and it's awesome, plus it has a specific 'Dynos' tab when used via Heroku.

Upvotes: 0

Jef
Jef

Reputation: 5474

I would advice you to open an account on New Relic.

More information here :

http://newrelic.com/docs/ruby/new-relic-for-ruby

and here :

http://devcenter.heroku.com/articles/newrelic

Upvotes: 8

Related Questions