I am running my own webserver on a 384MB VPS from Slicehost to serve two Ruby on Rails applications on separate Virtual Hosts. I am running Phusion Passenger with Apache2. The following is the contents of my Passenger.conf
<IfModule passenger_module>
PassengerRoot /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerLogLevel 0
PassengerRuby /usr/local/bin/ruby
PassengerUserSwitching on
PassengerDefaultUser nobody
PassengerMaxPoolSize 3
PassengerMaxInstancesPerApp 2
PassengerPoolIdleTime 300
# Ruby on Rails Options
RailsAutoDetect on
RailsSpawnMethod smart
NameVirtualHost *:80
</IfModule>
If i do a 'top' on my server I have 314MB used on average, this seems like too much? Am I mistaken and if not what possible steps can I take to reduce the Memory usage?
Thanks!
Best Answer
It all depends on the applications you are trying to host. The more models / controllers an application has the bigger the application will be. To get a better feel for how much the rails application itself is using try issuing the command.
My medium-sized application at this moment is using:
According to passenger. If you have a bunch of sites running on the same passenger instance it could look more like:
Also consider that if you run a stock mysql-server the settings are not really optimized for VPS (and thus low memory) usage.