Hi, I was wondering if 256MB of RAM is enough to run a ruby on rails server and mysql server. My application does not do any complex queries, but it does deal with quite a lot of data (potentially tables as large as 100MB). The number of concurrent users should be low, never more than 10. Currently I'm serving RoR using Lighttpd via fastcgi. The only thing I've changed from the default config files was to set the number of fastcgi processes to 1. Do you think that's enough memory for my application and are there any options I should change to minimize memory usage (I don't mind taking up more CPU, I expect the CPU load to be very low). Thanks in advance for your replies!
It should be enough. I've got a 256MB slice with Slicehost and run Nginx, MySQL (with some tweaks to reduce it's memory footprint slightly) and two mongrel instances for one of my rails apps and still have 90MB memory to spare for an additional mongrel (perhaps two) as needed.
You could always use sqlite instead of MySQL if you aren't getting hammered with database requests to reduce your memory footprint.
Hi all,
It should be enough. I've got a 256MB slice with Slicehost and run Nginx, MySQL (with some tweaks to reduce it's memory footprint slightly) and two mongrel instances for one of my rails apps and still have 90MB memory to spare for an additional mongrel (perhaps two) as needed.
I've got a few 256M VPS' also running Nginx/MySQL/mogrel at Servint (who I *highly* recommend, by the by), and don't have any problems. Load is, of course, relative to the popularity of a given application. 256 is as good a starting point as any, though.
We also test each application pretty thoroughly with Apache Bench (among other things) before release to help gauge what system resources are required for the load we expect -- so that might be a good idea as well.
Cheers,
Ryan
I've had better luck running a VPS with that setup using nginx, however it should be fine.
So the consensus is that nginx uses less memory than lighttpd?
Does this ever make a difference? I would expect the ruby and mysql processes to use far more memory than the http server. That's certainly the case so far, but the database is mostly empty now and I'm the only user testing the system, so that may change.
Thanks for your responses!