Hi,
do any of you guys have expierence running Ruby on Rails on a low-end vps? Would it be possible to run on a 128MB RAM vps with lighttpd/fcgi?
I'd like to hear your expierences.
Hi,
do any of you guys have expierence running Ruby on Rails on a low-end vps? Would it be possible to run on a 128MB RAM vps with lighttpd/fcgi?
I'd like to hear your expierences.
I haven't tried since my vps is 1.5GB, but if your application isn't too hefty and you tune your stack then definitely.
Forget lighttpd/fcgi.
I'm currently deploying via nginx & phusion passenger[pp] with ruby enterprise[ree], both are highly configurable in terms of processes, using ruby enterprise will also allow you to tune the garbage collector, which by itself is... well, garbage-vanilla ruby is pretty good at destroying your vsz.
http://www.phusion.nl/products.html
I use ree as my system-wide ruby, a good idea unless you want to maintain more than one set of gems; it's fully compatible with 1.8.7.
Straightforward enough to set up with good documentation, combine it with the optimisations from lowendbox and I reckon you're cooking with gas.
3 months late to the party but if you read this and need any help just shout.
I've just installed a copy of http://www.redmine.org/ (a quite hefty project management app) on this box (1.5GB openvz).
ps aux:
PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
1 0.0 0.0 1980 692 ? Ss 03:51 0:00 init [2]
7838 0.0 0.0 1880 684 ? S 03:51 0:00 /usr/sbin/syslogd --no-forward
7848 0.0 0.0 4652 2104 ? Sl 03:51 0:00 PassengerNginxHelperServer /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9 /usr/local/bin/ruby 3 4 0 4 0 300 1 nobody 1001 1001 /tmp/passenger.7845
7866 0.1 0.3 16512 13220 ? S 03:51 0:00 Passenger spawn server
7872 0.0 0.0 5908 824 ? Ss 03:51 0:00 nginx: master process /opt/nginx/sbin/nginx
7873 0.0 0.0 6644 2148 ? S 03:51 0:00 nginx: worker process
7875 0.0 0.0 6372 1488 ? S 03:51 0:00 nginx: worker process
7876 0.0 0.0 6372 1488 ? S 03:51 0:00 nginx: worker process
7877 0.0 0.0 6372 1468 ? S 03:51 0:00 nginx: worker process
7898 0.0 0.0 5272 1036 ? Ss 03:51 0:00 /usr/sbin/sshd
7921 0.0 0.0 3292 800 ? Ss 03:51 0:00 /usr/sbin/cron
7934 0.0 0.0 116 24 ? Ss 03:51 0:00 runsvdir -P /etc/service log: .
7935 0.0 0.0 104 28 ? Ss 03:51 0:00 runsv git-daemon
7936 0.0 0.0 120 44 ? S 03:51 0:00 svlogd -tt /var/log/git-daemon
7938 0.0 0.0 3868 1172 ? S 03:51 0:00 /usr/local/bin/git-daemon
9943 0.6 1.5 70576 64932 ? S 03:52 0:02 Passenger ApplicationSpawner: /var/www/***
9954 0.2 1.5 70588 64428 ? S 03:52 0:00 Rails: /var/www/***
12206 0.0 0.0 5804 2872 ? Rs 03:54 0:00 sshd: ***@pts/0
12218 0.0 0.0 5152 2548 pts/0 Ss 03:54 0:00 -bash
17577 0.0 0.0 3580 1012 pts/0 R+ 03:57 0:00 ps aux
I'm showing about 120MB used in solusvm, as you can see I've got a couple of other things like git-daemon running, and I've got 4 nginx processes.
So it's possible, but you would get a lot more mileage out of 256MB.
Quick notes:
If you're setting your stack limit (ulimit -s) then you may want to play with the settings, 128k doesn't work, 256k seems ok but you may have to up it some-rails breaks with a stack limit too deep error.
MySQL: you don't need it, sqlite3 is sufficient if you're not doing stacks of writes (which can be slow); probably no good for a busy forum application, plenty good for most things though. http://pastie.org/ is (at least it was anyway) backed by sqlite3.
You must log in to post.