This is *almost* true. You need to be running their COW friendly GC
patch for ruby, otherwise the mark-and-sweep garbage collector will
write to most of your pages.
>
> Just don't try it on FreeBSD 7
> (http://code.google.com/p/phusion-passenger/issues/detail?id=16)
>
> Cheers
>
> Phil
>
>
>
> On 23/04/2008, at 4:26 PM, Henry Maddocks wrote:
>
> Anyone played with this yet?
>
> http://www.modrails.com/
>
>
>
>
>
>
>
> >
>
--
Cheers
Koz
>
>> This dramatically reduces the amount of memory used by your
>> applications.
>> Instead of just being 10x<your app here> like it is with a cluster of
>> Mongrels. It also means forking extra children to serve requests is
>> a lot
>> faster. Then most of the memory usage is from allocating objects,
>> RMagick
>> leaks etc.
>
> This is *almost* true. You need to be running their COW friendly GC
> patch for ruby, otherwise the mark-and-sweep garbage collector will
> write to most of your pages.
Which if anyone's interested can be downloaded from Github, not the
yet-to-be-created rubyenterpriseedition.com:
http://github.com/FooBarWidget/emm-ruby/tree/master
I have. It's sweet!
I am testing a few rails apps on it. So far no problems although I did
have to tweak things a little.
If you are going to give it a whirl here is some useful info.
create two files for your /etc/apache2/mods-available directory
mod_rails.load
-----------------------
LoadModule passenger_module
/var/lib/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
RailsSpawnServer
/var/lib/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
RailsRuby /usr/bin/ruby1.8
-------------------------
And
mod_rails.conf
--------------------
RailsDefaultUser your-web-server-user-name
RailsPoolIdleTime 600 #set this to whatever you feel comfortable
with. mod_rails will close the process to save memory after this many
seconds
RailsEnv production
in your /etc/apache2/sites-enabled create a file which has this
<VirtualHost *>
ServerName your.domain.name
DocumentRoot /var/www/application_name/current/public
</VirtualHost>
In your capistrano deploy.rb add this.
namespace :deploy do
task :start, :roles => :app do
end
task :stop, :roles => :app do
end
task :restart, :roles => :app do
run "touch #{release_path}/tmp/restart.txt"
end
task :after_update_code, :roles => :app do
run "rm -rf #{release_path}/public/.htaccess"
end
end
Now when you do cap deploy your code will be deployed on the server
and restarted.
Apache has a mod_xsendfile floating around too, which uses the same
header as Lighttpd.
--
Cheers
Koz
Henry Maddocks wrote:
> Anyone played with this yet?
>
> http://www.modrails.com/
I've had a quick play with this today. Mostly it's working nicely, but
I've come across a weird issue.
If I run it in 'production' mode, I get a method_missing error on a
standard AR find_by method in the application controller
(find_all_by_tag in this case). If I run in 'development' mode, I don't
get the error.
I might see if I can replicate it under a different app to see if it's a
common thing or if it's just this one.
Aside from that, it looks good, pretty close to mongrel in terms of
performance on individual requests. Will be interesting to see how it
handles under normal production loads.
Darryl.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFID6bJ1ybsVgZckYURAo/HAJ9ZqcYmAND3bGPRZmzDgpPk3wTuKACdG4s7
FkHLMZZIo1WFxUKFIxHPnow=
=HZZb
-----END PGP SIGNATURE-----
Don't underestimate the benefits of significantly reduced memory
usage. If you can run 8x processes in the space where 4x used to run,
you're instantly capable of handling twice the load (assuming you
weren't constrained by something other than number of processes).
Beside, it's cool to run thin or ebb or something now.
--
Cheers
Koz
--
Shane Mingins