Ask Your Question

How should I tune Passenger to run Puppet?

asked 2014-08-20 16:32:06 -0600

ramindk gravatar image

updated 2014-08-20 19:33:24 -0600

The default Passenger/vhost config example provided by Puppet doesn't work with Passenger 4 unless modified. Additionally there isn't an explanation of tuning for dedicated Puppet masters. The docs for setting up a master using Passenger does not cover it either. Is there an example of a config and performance settings for dedicated Puppet master servers?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-20 16:33:34 -0600

ramindk gravatar image

updated 2017-11-07 17:13:39 -0600

Setting up Passenger and the Puppet master vhost for a dedicated Puppet master instance

Note: None of the settings or config below will make your master process requests faster. Each request will still take the same amount of time. However these setting can allow your server to handle more concurrent requests, always be ready to handle incoming requests, and generally page you less in the middle of the night.

Which Passenger should I install?

Passenger 3 or better. Passenger 2 is over 4 years old and does not support a number of features discussed below. I currently recommend Passenger 5.x as the safest assuming you're running Puppet 3.8.x or greater.

How should I install Passenger?

If you use Debian/Ubuntu I highly recommend the very current packages PhusionPassenger provides.

PhusionPassenger publishes Passenger 5.x RPMs for Redhat 6 and 7. I recommend moving to these packages if you're running Puppet 3.8.x. Latest is Passenger 5.1.11 and is confirmed working.

Any other distro will need to use local packages if they exist or gem install.

Which module from the Forge should I use to install Passenger?

tl;dr, None of them are very good and make bad assumptions in the config.

There are three recent modules that install and config Passenger. I'm not a fan of any of them because they include unneeded and broken settings in passenger.conf, don't attempt to tune Passenger at all, or do unneeded build from src installs. If you already use one of the modules below, you might consider forking and updating the config templates.

Tuning Passenger itself

Passenger provides several parameters for tuning. The full set of docs are quite good and located here. In this example I'm going to assume that the server had four cores and 4GB of RAM. Each master process is going to require 200-250MB of RAM. Each catalog request is going to hit the CPU pretty hard making CPU the number one limiting factor of your Puppet master.

The following values should be safe to set globally. If you run other applications on your server you may want to move the non global setting to your Puppet master vhost.


# MaxPoolSize is a global setting. It can only be set once. I usually recommend
# 2 * cores on physical machines and 1.5 on VMs. This is the max number of
# application processes Passenger will spawn on the server. If you have multiple
# applications such as Puppet and Puppet Dashboard this is max of both instances
# combined. If you find that your server is consistently hitting 80-90% usage you may
# want to lower this setting. By reducing the number of active application processes
# you should reduce CPU usage. The same applies for RAM use as well.
  PassengerMaxPoolSize 8

# MinInstances is not a global setting. It can be set in vhost, directory, htaccess ...
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-08-20 16:32:06 -0600

Seen: 4,014 times

Last updated: Nov 07 '17