These forums are read-only!
Rails app instance memory usage (passenger)
  • I have an application that I am developing that consumes around 150mb as soon as the Passenger instance starts up. I am trying to figure out what (if anything) I can do to help decrease the memory footprint of this application. What factors affect memory usage? Number of gems? LOC?

    Any advice on would be much appreciated!

    P.S. I also have another app that uses fewer gems and is a fraction of the LOC that only takes up 40mb in memory, and a fresh app (no code, just a completely new app) takes up around 30mb on my setup, so I am assuming that the 150mb I am seeing with the app in question is not related to my server configuration.
  • 1) 32 bit vs 64 bit, 32 will use less
    2) yes the number of gems it uses will increase the ram usage
    3) yes the size of the app will increase the ram usage
    4) are your other apps configured to use the same passenger settings as the new app i.e. number of children cached (can't remember the actual setting name in passenger).
  • Thanks for the advice.

    Switching from 64 to 32 bit made a huge difference.
  • You might also want to check out Ruby Enterprise Edition, it claims to use less memory: http://www.rubyenterpriseedition.com/ (despite the buzzwordy name, it's free)
  • That's true, ruby enterprise does use less memory.
  • I've been using REE and been pleased with its performance
  • I am assuming that the 150mb I am seeing with the app in question is not related to my server configuration.
    http://www.uggbootsonlinesales.com
    http://www.nike-airmax.org