I am developer from java background , new to ruby on rails. What's my doubt is I am having 24 GB RAM in my server in the cause of Java I can't effectively use it due to JVM Restrictions as discussed in that post Understanding max JVM heap size - 32bit vs 64bit. Do Ruby On Rails have any restrictions related with physical memory (RAM), I am giving an scenario can it possible to run N no of Rails applications with single Phusion Passenger until i am going to burst at least 20 GB of RAM. Why I am asking this is i am planning to put 50 school management applications with an single server , so 50 rails applications , is it possible or i am going to get out of memory error like the stuffs one that getting in java.
1 Answers
Managing memory in Rails is not an especially scientific process. The variation between applications is considerable and there is no easy benchmark. As a general rule of thumb, though, budget 50-100MB per active Rails instance. Passenger has some tricks that shares a good deal of memory between similar instances, but it's only so effective.
20GB of memory should be able to host at least 20 instances of your application, at least from the Rails perspective. You would want to budget at least 4-8GB of memory from that pool for your database, though, if these sites are busy.
There's no intrinsic limit in Ruby as to how much memory you can use, especially if it's spread across many different processes. Generally if it's available to user processes, it can be consumed.
If the sites aren't busy, they don't take up any memory at all. Passenger will automatically spin down processes that are idle to free them up. In practice a site that's visited intermittently will barely make an impact at all.

- 208,517
- 23
- 234
- 262