Anyone got any tips for running Rails (w/ either webrick or lighttpd/fcgi) on a VPS with a pretty small amount of memory (like 64MB memory and 64MB swap). Thanks, Joe
And on that note, could someone recommend a place where I could (cheaply) have root access and have enough speed/memory to run rails apps? Seems like a lot of VPS plans are really limited in memory and Ruby loves the memory. On Wed, 9 Mar 2005 00:25:05 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone got any tips for running Rails (w/ either webrick or > lighttpd/fcgi) on a VPS with a pretty small amount of memory (like > 64MB memory and 64MB swap). > > Thanks, > Joe >
On Wed, 9 Mar 2005 01:36:08 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> And on that note, could someone recommend a place where I could > (cheaply) have root access and have enough speed/memory to run rails > apps? > > Seems like a lot of VPS plans are really limited in memory and Ruby > loves the memory.By VPS, I think you are talking about Virtual Private Servers? Funny you should ask, because I am running rails on just such a server, with 64 MBs RAM and 64 MBs swap. I can''t say "works great!" because I''ve just started with rails and I''m still in the process of migrating things from blosxom to rails. So I will say "lighttpd/fastcgi is nice and fast on my VPS, even with apache still running!" instead. I ran into several problems during setup, but nothing that I wasn''t able to fix. Look in the list archives for posts made by me. http://www.redwoodvirtual.com/ is my hosting company. You get 1 IP (or more if you want to pay for them), and you get root on that box, you get full control, I love it. Cheap, too. I recommend debian testing for best lighttpd/fastcgi support. No stability issues to speak of, but the packages aren''t all 5 years old like in debian stable. -- One Guy With A Camera http://rbpark.ath.cx
* Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [2005-03-09 04:42]:> And on that note, could someone recommend a place where I could > (cheaply) have root access and have enough speed/memory to run rails > apps?I just signed up with Rimu for the same reason: http://rimuhosting.com/ I''m in the middle of packing and moving my physical self though so I''ve not yet had a chance to do much with my VPS. They do have a nice variety of plans though, and set me up right quick. also choices of: whitebox (redhat enterprise), redhat9, fedora, or debian -- ______________________________ toddgrimason*todd-AT-slack.net
On Wed, 9 Mar 2005 02:59:55 -0700, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, 9 Mar 2005 01:36:08 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > And on that note, could someone recommend a place where I could > > (cheaply) have root access and have enough speed/memory to run rails > > apps? > > > > Seems like a lot of VPS plans are really limited in memory and Ruby > > loves the memory. > > By VPS, I think you are talking about Virtual Private Servers? > > Funny you should ask, because I am running rails on just such a > server, with 64 MBs RAM and 64 MBs swap. I can''t say "works great!" > because I''ve just started with rails and I''m still in the process of > migrating things from blosxom to rails. So I will say > "lighttpd/fastcgi is nice and fast on my VPS, even with apache still > running!" instead. I ran into several problems during setup, but > nothing that I wasn''t able to fix. Look in the list archives for posts > made by me. > > http://www.redwoodvirtual.com/ is my hosting company. You get 1 IP (or > more if you want to pay for them), and you get root on that box, you > get full control, I love it. Cheap, too. > > I recommend debian testing for best lighttpd/fastcgi support. No > stability issues to speak of, but the packages aren''t all 5 years old > like in debian stable. >I''m using redwood virtual too. It''s really "nice and fast" w/ lighttpd/fastcgi? Starting up webrick takes up like 67% of all available memory. I''ve disabled apache, tuned mysql down to use hardly any memory, and it''s still extremely slow. I''m using the latest rails too. Doing a "gem install rails" took like 10 minutes to complete.
I am another fan of http://rimuhosting.com/. I have had all kinds of stuff out there for over a year now and been quite happy. John-Mason P. Shackelford
On Wed, 09 Mar 2005 16:05:48 -0600, John-Mason P. Shackelford <john-mason-Grinw8Jr/8zZYwk40xCobA@public.gmane.org> wrote:> I am another fan of http://rimuhosting.com/. I have had all kinds of > stuff out there for over a year now and been quite happy. > > John-Mason P. Shackelford > >What plan did you get? I''m just not impressed at the performance of ruby applications at Redwood Virtual. ''gem install rails'' takes sooo long to complete. And a Rails application is freaking slow and uses a ton of memory.
That sounds like your setup. Update ruby gems, they had a performance bug which is now fixed. And make sure your rails applications are running on fastcgi. Lighttpd will be well worth the switch as it needs a lot less memory. On Wed, 9 Mar 2005 14:59:17 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, 09 Mar 2005 16:05:48 -0600, John-Mason P. Shackelford > <john-mason-Grinw8Jr/8zZYwk40xCobA@public.gmane.org> wrote: > > I am another fan of http://rimuhosting.com/. I have had all kinds of > > stuff out there for over a year now and been quite happy. > > > > John-Mason P. Shackelford > > > > > > What plan did you get? > > I''m just not impressed at the performance of ruby applications at > Redwood Virtual. ''gem install rails'' takes sooo long to complete. > And a Rails application is freaking slow and uses a ton of memory. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
I''m using rubygems 0.8.6, just installed the latest one. And I tried lighttpd/fastcgi. The ruby process takes forever to start and takes up about 30MB. And when it starts I''m routinely seeing loads greater than 1 and 2. It''s horrid. I''m wondering if something like http://www.jvds.com/freebsdpackages.php would be better, I''d have access to more memory. On Wed, 9 Mar 2005 18:07:32 -0500, Tobias Luetke <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That sounds like your setup. Update ruby gems, they had a performance > bug which is now fixed. And make sure your rails applications are > running on fastcgi. Lighttpd will be well worth the switch as it needs > a lot less memory. > > > On Wed, 9 Mar 2005 14:59:17 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Wed, 09 Mar 2005 16:05:48 -0600, John-Mason P. Shackelford > > <john-mason-Grinw8Jr/8zZYwk40xCobA@public.gmane.org> wrote: > > > I am another fan of http://rimuhosting.com/. I have had all kinds of > > > stuff out there for over a year now and been quite happy. > > > > > > John-Mason P. Shackelford > > > > > > > > > > What plan did you get? > > > > I''m just not impressed at the performance of ruby applications at > > Redwood Virtual. ''gem install rails'' takes sooo long to complete. > > And a Rails application is freaking slow and uses a ton of memory. > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -- > Tobi > http://www.snowdevil.ca - Snowboards that don''t suck > http://www.hieraki.org - Open source book authoring > http://blog.leetsoft.com - Technical weblog >
On Wed, 9 Mar 2005 14:59:17 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m just not impressed at the performance of ruby applications at > Redwood Virtual.What, do you think redwood is doing something deliberately to make rails slow that you won''t encounter at a different provider? rails is rails is rails is rails; a VPS is a VPS is a VPS is a VPS... I think you are doing something wrong in your setup of rails. P.S. I never even bothered with webrick on the server, I only use webrick for developing rails on the local machine before uploading to the server. I''ve found that the speed of webrick on my AXP 2100 is comparable to the speed of lighttpd/fastcgi on my server (ok, "comparable" is a bad word, what I mean is "they''re both so fast that I don''t really notice the load times at all"). -- One Guy With A Camera http://rbpark.ath.cx
On Wed, 9 Mar 2005 15:09:38 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using rubygems 0.8.6, just installed the latest one. And I tried > lighttpd/fastcgi. The ruby process takes forever to start and takes > up about 30MB. And when it starts I''m routinely seeing loads greater > than 1 and 2.Well, when I first start up lighttpd, it seems to suck up a bit of CPU to initialize the fastcgi processes, and I see load average go up momentarily to around 2 or 3. Within a few minutes, load average actually goes down to 0 ;) (not kidding, I regularly see load average of 0.00 while running lighttpd, but then again I guess that would be normal for an idling server). -- One Guy With A Camera http://rbpark.ath.cx
On Thu, 10 Mar 2005 00:53:17 -0700, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, 9 Mar 2005 14:59:17 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m just not impressed at the performance of ruby applications at > > Redwood Virtual. > > What, do you think redwood is doing something deliberately to make > rails slow that you won''t encounter at a different provider? rails is > rails is rails is rails; a VPS is a VPS is a VPS is a VPS... I think > you are doing something wrong in your setup of rails. > > P.S. I never even bothered with webrick on the server, I only use > webrick for developing rails on the local machine before uploading to > the server. I''ve found that the speed of webrick on my AXP 2100 is > comparable to the speed of lighttpd/fastcgi on my server (ok, > "comparable" is a bad word, what I mean is "they''re both so fast that > I don''t really notice the load times at all"). >I''m not sure, but I tried out another VPS at a different company today. Same setup, same OS, same rails application. The application flies. Doing gem installs don''t take five minutes anymore, instead they take seconds. Running the site under webrick loads up pages in less than a second, instead of the 5 to 30 seconds I was waiting before. Not sure what the deal was. I also noticed that when I did anything performance intensive, if I was copying anything to the server the transfer rate would drop to 10% of the original rate.
Have you guys looked at what kid of virtualization software these hosting companies are using? I had a round with some of these types of hosts and the worst use Virtuozzo. If you can verify that they are using usermode linux or better yet vmware then I have found much better response times and speed in general. Also Virtuozzo is breaking the GPL ;) so I try to stay away from that. Finally I just got sick of the whole virtualization scene. Unless you can verify the exact hardware that runs you VPS and find out how many VPS share that same hardware and find out what kind of virtualization software they are running. If they wont answer any of these 3 questions then I would avoid them like the plague as they are most likely trying to pack so many VPS''s on each piece of physical hardware that is why you were seeing such poor performance IMHO. So if you can find a VPS provider that runs VMware I have found it to be the best w/regards to speed and also verify that they are not overloading their hardware with too many VPS''s. Eventually I couldn''t handle the poor results so I just got a dedicated debian sarge server from rackforce.com and it is super nice to stretch out on my own hardware that no one else is running on. Granted actual dedicated servers will cost you much more than a VPS but not too much more for what you get. If you are planning on running a high traffic site or many smaller sites a dedicated server will pay for itself. Mine is costing me $99/month and for that I get a P4 3.4Ghz with 1GB RAM and 2 x 80GB HD with its own dedicated T1 with no bandwidth limit or overage charges. I have just finished moving 26 php/mysql sites over and I still am hardly stressing the server at all. So thats my rant on VPS. It can be a great option but just do a little research about what they are using and how much they load up the hardware before you sign that contract. -Ezra On Mar 10, 2005, at 12:13 AM, Joe Van Dyk wrote:> On Thu, 10 Mar 2005 00:53:17 -0700, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Wed, 9 Mar 2005 14:59:17 -0800, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> wrote: >>> I''m just not impressed at the performance of ruby applications at >>> Redwood Virtual. >> >> What, do you think redwood is doing something deliberately to make >> rails slow that you won''t encounter at a different provider? rails is >> rails is rails is rails; a VPS is a VPS is a VPS is a VPS... I think >> you are doing something wrong in your setup of rails. >> >> P.S. I never even bothered with webrick on the server, I only use >> webrick for developing rails on the local machine before uploading to >> the server. I''ve found that the speed of webrick on my AXP 2100 is >> comparable to the speed of lighttpd/fastcgi on my server (ok, >> "comparable" is a bad word, what I mean is "they''re both so fast that >> I don''t really notice the load times at all"). >> > > I''m not sure, but I tried out another VPS at a different company > today. Same setup, same OS, same rails application. The application > flies. Doing gem installs don''t take five minutes anymore, instead > they take seconds. Running the site under webrick loads up pages in > less than a second, instead of the 5 to 30 seconds I was waiting > before. > > Not sure what the deal was. I also noticed that when I did anything > performance intensive, if I was copying anything to the server the > transfer rate would drop to 10% of the original rate. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ezra, Good points. I had to do some shopping around before I landed on http://rimuhosting.com/. They use usermode linux and will tell you exactly what the conditions are on the VPS host. I''ve been very happy there. John-Mason P. Shackelford
Redwood Virtual was also using UML (usermode linux). Although, Rob said that his application was working perfectly fine. I think there was probably a problem with the particular server I was on, or some configuration problem. Not sure actually. I also switched to rimuhosting.com and it''s great. I''ve got the following (don''t laugh yet, it''s nowhere near finished) running there on webrick and sqlite (images loading from db): http://prettypucker.net:3000/houses/show/1 It''s definately fast enough for me.. images are pretty slow though. Possibly because I''m using sqlite2. I tried sqlite3, but then ruby was crashing all the time. No clue why. On Thu, 10 Mar 2005 17:28:21 -0600, John-Mason P. Shackelford <john-mason-Grinw8Jr/8zZYwk40xCobA@public.gmane.org> wrote:> Ezra, > > Good points. I had to do some shopping around before I landed on > http://rimuhosting.com/. They use usermode linux and will tell you > exactly what the conditions are on the VPS host. I''ve been very happy there. > > John-Mason P. Shackelford > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Thu, 10 Mar 2005 17:03:08 -0700, Benjamin Bytheway <ben-NuqyjPHk0SwAvxtiuMwx3w@public.gmane.org> wrote:> Joe Van Dyk wrote: > > >I tried sqlite3, but then ruby > >was crashing all the time. No clue why. > > > > > > > I was having similiar problems a couple of weeks ago, and have a couple > of things to try. > > First, the pure-ruby sqlite3 drive uses DRI, which is not thread safe > and will crash everytime with webrick. The sqlite3-ruby gem will > generate and prefer the native driver, but for me it was never building > on install. I finally realized that I needed to have swig installed for > it to build. Once I installed swig, it generated and things started > working again. > > I''m assuming you have sqlite3 headers installed to, which I''m sure you do. > > Hope this helps, > > -Ben >Ah, you''re right. I was wonderng why it didn''t seem to compile anything. I''ll try it again with swig.