Server Specs for deployment

The rails app I have created is an online assessment for 3rd - 5th
graders. When the project goes into production there will be 300-400
kids accessing the site at the same time. I have been speeking with
several hosting companies and the last one I spoke with suggested
measuring the memory usage for one user and multiply that by the number
of users (300-400). Then they will give me suggestions on what I should
be using for a hosting package.

Does anyone know how to check the memory usage of the rails app? I have
never worried or have had to deal with this before and am lost. This is
the first app I am deploying.

Or does anyone have suggestions on hosting packages that would be
suitable for 300-400 users hitting the site at once. I am guessing a
dedicated server will be needed but I am also trying to do this low cost
without having the site be extremely slow.

Any suggestions?

Thanks in advance!



I haven't seen in my rails applications a linear correlation

between users and memory, not sure how is coded yours.

The memory of healty rails process starts around 40MB and goes up

to whaetever the garbage collector allows. In my case have seen that
this processes (thin, mongrels) stay around 80MB, this will depend on
your app.

You will need at leats a couple of mongrels, thins, whatever to

run your site. Adding a bunch of mongrels withouts supporting cores
usually wont help, don’t runn to start too many mongrels at first.

 I have found that a basic VPS setup for a rails app with a

moderated traffic, supporting a couple of mongrels, nginx in the
front, database and Monit or God for monitoring requires 384 MB, but
you can make it fit 256 MB if you fine tune it and you are short on

I would recommend starting with such configuration, having a clear

option to add more CPU and Memory if required, keeping an eye in the
logs, and caching where necessary. Check with your hosting company.

Off course if you can afford a dedicated server as starting point,

just go and get it. An easy way to make this scale is using
virtualization to configure it as separated servers, database, web,
application, etc. But that is another discussion.

Best regards,

Aníbal Rojas

On May 14, 5:59 pm, Chris H. [email protected]

Hi Chris,

I’m Maykel from As Anibal said, your Rails
application is going to use around 40-100MB RAM per Mongrel instance
depending on your code and server architecture (your application is
going to use around 2x memory in 64 bits servers). Multiplying the
amount of memory needed for one user per the number of users is not
correct at all.

The most important thing is how many Mongrel instances you have for
your Rails application, since every Mongrel instance can respond to
only one request at the same time (that’s why you will be always using
the memory you need for one user, not for 300-400 users) you will need
around 3-4 Mongrel instances to ensure your application can respond to
300-400 simultaneous users, considering you will be receiving around
100-200 requests per second (let’s say all the users won’t be clicking
at the same time) and considering your application can respond to
50-60 requests per second (which is good actually, could be less).

Hope this help. If you need further information about our hosting
plans just send us and email, our site is been updated now but you can
contact us at sales [at] speedyrails [dot] com.


Maykel Rodriguez
Easy to use Rails hosting

Get a slicehost account (or other virtual host) with 256MB of ram for
twenty bucks
and run ab or httperf over your app with a bit of concurrency.

Then, when everything goes to hell consider adding some really basic
I don’t think you’ll need to stress that much - but file based caching
will serve a lot of requests.

Good luck.

On May 16, 10:26 am, “[email protected][email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs