Ask Your Question
1

How should I tune Passenger to run Puppet?

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

ramindk gravatar image

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

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
3

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

ramindk gravatar image

updated 2016-10-04 23:55:33 -0500

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.

If you use RHEL/Centos, the EPEL repo provides Passenger 3.0.21. Given a choice between gem installing Passenger 5, building the module, etc etc I'd stick with the older package. Using the package should also avoid problems with selinux as well.

PhusionPassenger is now publishing Passenger 5.x RPMs for Redhat 6 and 7. I recommend moving to these packages if you're running Puppet 3.8.x. If you masters are still Redhat 5.x basesd, use EPEL.

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.

passenger.conf

# 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 ...
(more)
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

2 followers

Stats

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

Seen: 3,185 times

Last updated: Oct 04 '16