SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Rails Resources

  1. #1
    SitePoint Enthusiast EddM's Avatar
    Join Date
    Oct 2006
    Location
    Reading, UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rails Resources

    Hey everyone,

    I've been developing/learning in Ruby for a short while now, but every application I've made (which amounts to just 2 right now) uses insane amounts of memory when running as opposed to what I used to churn out in PHP.

    It was twice as easy and quick to develop in Ruby as opposed to PHP, but they're hogging so many resources -- and these applications I've developed are relatively small.

    Is this because PHP is fully interpreted and Ruby just runs a single pass or because each instance of Mongrel/Webrick uses loads of memory on its own? Is this just standard with ruby or am I missing some major optimization?

    Still loving ruby,
    Edd
    Edd Morgan
    Cake Media Studios, Wokingham UK

    Ashes to ashes, zeros and ones.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Is your app bringing down your server? No? Then don't worry so much about memory usage.

    Mongrel/WEBrick do carry their own memory overhead for each instance you start up, to answer your question. A mongrel process typically hangs around 20MB usage or so. It's not a big deal as long as you have enough RAM.

  3. #3
    SitePoint Enthusiast EddM's Avatar
    Join Date
    Oct 2006
    Location
    Reading, UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On my local development machine I have 3gb's of memory so its no problem during testing, but after deployment (specifically on MediaTemple's Gridserver service /w 64MB ruby container) it does become a problem.

    It's just something I have to accept with the resources I have I suppose. Developing under rails is definitely worth it, it's saved me so much precious time. It's even quite fun come to think of it!
    Edd Morgan
    Cake Media Studios, Wokingham UK

    Ashes to ashes, zeros and ones.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by EddM View Post
    On my local development machine I have 3gb's of memory so its no problem during testing, but after deployment (specifically on MediaTemple's Gridserver service /w 64MB ruby container) it does become a problem.
    Well keep using the MT container, but I believe you can order additional memory for your Mongrel container for an extra monthly fee.

    Or you can go VPS/dedicated once you've outgrown your 64MB container, it just depends on your needs and finances.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your problem may be more with the GridServer, than with your app.

    The MT servers have been extremely slow and sluggish (at least for me) for a few weeks now. This is across about 25 sites that we currently have and maintain, that are on the MT GridServers.

    Just a thought....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •