# 256MB of RAM enough for ruby on rails and mysql?

**URL:** <https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355>\
**Category:** Rails\
**Created:** [November 16, 2007, 3:56am UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355 "2007-11-16T03:56:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [November 16, 2007, 3:56am UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355/1 "2007-11-16T03:56:03Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [November 16, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355/2 "2007-11-16T13:08:09Z")

</div>

On Nov 16, 2:55 am, Dave [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [November 16, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355/3 "2007-11-16T13:34:29Z")

</div>

Hi all,

On Nov 16, 2007 4:07 AM, fieldy1973 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

–  
Freelance Web Specialist

> **[Ryan Christensen](https://rpch.io/)**
>
> Experienced web, tech, and operations geek. Occasional taker-of-pictures and adventure-oriented hobbyist. Found in and around Seattle.

[http://glaciermedia.com](http://glaciermedia.com)

---

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [November 17, 2007, 12:43am UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355/4 "2007-11-17T00:43:48Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [November 16, 2007, 7:08pm UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355/5 "2007-11-16T19:08:45Z")

</div>

I’ve had better luck running a VPS with that setup using nginx,  
however it should be fine.
