Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Our web app is running on a Linode 2048 server at the moment (~ 2048 GB of RAM)

The MYSQL database is on another linode of it's own so this server is really only handling NGINX and and the Rails application.

The application itself uses about 185976 of memory per instance (RSS).

Our traffic is < 1000 per day and the pages are mostly cached so there are fewer hits to the rails app itself.

My question is - how can I calculate optimal NGINX config settings for my app?

Below is the current config:

worker_processes  1;

# pid of nginx master process
pid /var/run/nginx.pid;

events {
  worker_connections  1024;
}


http {

  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;

  passenger_root /home/user/.rvm/gems/ree-1.8.7-2011.01@URTV/gems/passenger-3.0.3;
  passenger_ruby /home/user/.rvm/rubies/ree-1.8.7-2011.01/bin/ruby;

  include       mime.types;
  default_type  application/octet-stream;

  sendfile        on;

  tcp_nopush    on;
  tcp_nodelay   on;

  # gzip settings
  gzip  on;
  gzip_http_version 1.0;
  gzip_comp_level 2; 
  gzip_vary on;
  gzip_proxied any; 
  gzip_types text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

  # load extra modules from the vhosts directory
  include /opt/nginx/vhosts/*.conf;
}

Any advice would be appreciated! :)

share|improve this question

migrated from stackoverflow.com Jun 16 '11 at 18:18

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 1 down vote accepted

You can have a look a this blog post: http://www.alfajango.com/blog/performance-tuning-for-phusion-passenger-an-introduction/ which will explain how to calculate it

share|improve this answer
    
Thanks for the link –  bodacious Jun 21 '11 at 21:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.