I'm relatively new to Linux management and Passenger.
I have a quad core dedicated server w/ 8GB of RAM running Fedora Core
9, REE 1.8.6, Passenger 2.2.4, Postgres 8.3, Apache 2.2.9, Rails
2.3.4, and about 30 Rails apps most of which are not demanding a lot
of traffic.
When using Memorylogic it shows that each app is running on an average
of 80MB of memory.
Running top shows similar stats w/ virt pushing 180MB for Rails, and
275MB for httpd.
passenger-memory-stats returns:
-------------- Apache processes ---------------
PID PPID Threads VMSize Private Name
-----------------------------------------------
2378 20420 1 274.8 MB ? /usr/sbin/httpd
2551 20420 1 274.9 MB ? /usr/sbin/httpd
4517 20420 1 285.7 MB ? /usr/sbin/httpd
4526 20420 1 285.7 MB ? /usr/sbin/httpd
4801 20420 1 274.8 MB ? /usr/sbin/httpd
4899 20420 1 274.7 MB ? /usr/sbin/httpd
5859 20420 1 274.8 MB ? /usr/sbin/httpd
14319 20420 1 289.7 MB ? /usr/sbin/httpd
16417 20420 1 285.7 MB ? /usr/sbin/httpd
20270 20420 1 287.5 MB ? /usr/sbin/httpd
20420 1 1 274.1 MB ? /usr/sbin/httpd
### Processes: 11
### Total private dirty RSS: 0.00 MB (?)
------------ Nginx processes -------------
### Processes: 0
### Total private dirty RSS: 0.00 MB
--------- Passenger processes ----------
PID Threads VMSize Private Name
----------------------------------------
20109 1 187.7 MB ? Rails: /var/www/
worldwariiaviation.org/current
20427 13 81.7 MB ? /opt/ruby-enterprise-1.8.6-20090610/
lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/
ApplicationPoolServerExecutable 0 /opt/ruby-enterprise-1.8.6-20090610/
lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server /
opt/ruby-enterprise-1.8.6-20090610/bin/ruby /tmp/passenger.20420
20494 1 184.7 MB ? Rails: /var/www/
tessacs.org/current
25677 1 66.6 MB ? Passenger spawn server
25678 1 184.6 MB ? Passenger ApplicationSpawner: /var/
www/
tessacs.org/current
27094 1 183.6 MB ? Passenger ApplicationSpawner: /var/
www/
gracebiblecs.org/current
27211 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
vacationhomeinhavasu.com/current
27792 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
pawspueblo.org/current
27908 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
santafetrailbusinesspark.com/current
27926 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
typeapo.com/current
27948 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
aspenheatcool.com/current
27954 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
westpacrestorations.com/current
29289 1 176.6 MB ? Passenger ApplicationSpawner: /var/
www/
myhavasuvacationhome.com/current
29398 1 177.6 MB ? Passenger ApplicationSpawner: /var/
www/
laurusta.com/current
29478 1 187.6 MB ? Passenger ApplicationSpawner: /var/
www/
worldwariiaviation.org/current
### Processes: 15
### Total private dirty RSS: 0.00 MB (?)
And top shows:
top - 08:37:54 up 49 days, 22:50, 1 user, load average: 0.07, 0.05,
0.00
Tasks: 160 total, 1 running, 159 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1%us, 0.3%sy, 0.0%ni, 97.6%id, 0.0%wa, 0.0%hi,
0.0%si, 0.0%st
Mem: 8103952k total, 7637488k used, 466464k free, 1110564k
buffers
Swap: 2040212k total, 256k used, 2039956k free, 3080676k
cached
What I'm trying to figure out is how many apps can I toss on this
server. Top says we've just about maxed out our memory. I've been
reading a lot on memory optimization for performance, and I'm a little
confused as to how much memory I am using and how much is available.
Should I be concerned about these numbers? Does it appear that we have
room for more sites? Have we maxed out? We'd like to deploy as many
apps on this server as possible.