We recommend tuning the following settings as needed to improve the performance of PuppetDB.
See Tuning monolithic installations for recommended settings based on various monolithic installation sizes.
You can increase the JVM (Java Virtual Machine) memory that is allocated to Java services running on PuppetDB. This memory allocation is known as the Java heap size.
Instructions for using the PE console to increase the Jave heap size are detailed on on the Configuring Java Arguments for PE page.
Increasing the ulimit for pe-puppetdb
The various services in PE require up to one file handle per connected client. On most OS configurations, the defaults will not be high enough for more than a couple hundred clients. To support more clients, you need to increase the number of allowed file handles.
Instructions for increasing the number of file handles are detailed on the Increasing the ulimit for PE services page.
Configuring command processing threads
This defines how many command processing threads PuppetDB uses to sort incoming data. Each thread can process a single command at a time. This setting defaults to half the number of cores in your system.
To set the number of command processors to use, edit your Hiera default
.yaml file, and set the
command_processing_threads setting using the following code:
puppet_enterprise::puppetdb::command_processing_threads: <NUMBER of THREADS>
Configuring broker memory
Broker memory refers to the
Note: Tuning this setting involves writing Puppet code, as documented at Playing nice with the PuppetDB module.
Configuring report processors
The Puppet master generates agent run reports every time Puppet runs and submits these to PuppetDB. These can be enabled or disabled from the PE console or hiera. By default, this setting is set to
To enable/disable run report processors using the console:
- In the console, click Nodes > Classification, and in the PE Infrastructure group, select the PE Master group.
On the Classes tab, locate or add the
puppet_enterprise::profile::master::puppetdbclass, and specify parameters:
Parameter – Select report_processor_ensure.
Value – Enter
absentto disable or
- Click Add parameter, and commit changes.
To enable/disable run report processors using Hiera:
To enable/disable run report processors, you need to edit your Hiera default
.yaml file, and set the
report_processor_ensure setting using the following code:
puppet_enterprise::profile::master::puppetdb::report_processor_ensure: <PRESENT or ABSENT>
Use this parameter to set the “time-to-live” value before PE automatically deletes nodes that have been deactivated or expired. This will also delete all facts, catalogs, and reports for the relevant nodes.
Specify the time as a string using any of the following suffixes:
For example, a value of
14d would set the time-to-live to 14 days.
Edit your Hiera default
.yamlfile, and set the
node_purge_ttlsetting, as shown in the following code:
Configure blacklisted facts
facts_blacklist to exclude facts from being stored in the PuppetDB database.
Edit the Hiera default
.yaml file and set the
For example, to prevent the
mountpoints facts from being stored in PuppetDB:
- ‘mountpoints’ ~~~