Managing the heap size

The maximum heap size of our PuppetDB will depend on the total number of nodes checking into the system, the frequency of the Puppet runs, and the amount of resources managed by Puppet. The easiest way to determine heap size needs is to estimate or use defaults, and monitor the performance dashboard.  If your database triggers an OutOfMemory exception, just provide a larger memory allocation and restart the service. If the JVM heap metric often gets close to maximum, you'll need to increase the max heap size using Java args, managed by the PostgreSQL init script. PuppetDB will begin handling requests from the same point in the queue as when the service died. In an open source installation, this file will be named puppetdb, and will be named pe-puppetdb in a Puppet Enterprise installation. On an Enterprise Linux distribution (such as Red Hat), these files will be located in /etc/sysconfig. Debian based systems such as Ubuntu will place this file in /etc/default.

In a Puppet Enterprise installation, we can set our heap size using the following Hiera values:

puppet_enterprise::profile::puppetdb::java_args:
Xms: 1024m
Xmx: 1024m

In an open source installation, preferably using puppet/puppetdb from the forge, we can simply set the Java args via the puppetdb class:

class profile::puppetdb {

class {'puppetdb':
java_args => {
'-Xmx' => '1024m',
'-Xms' => '1024m',
},
}

}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.39.23