[Satellite6] How to change number of pulp workers?
Environment
- Red Hat Satellite 6
Issue
- there is a need to adjust number of worker processes in pulp
- default value is number of processors on the machine
- how to do that?
Resolution
Do NOT follow this tuning until specifically requested by Red Hat Support. Misconfiguring pulp might have negative impact to performance or stability of pulp server within Satellite.
To set e.g. 8 worker processes on each installer run:
For Satellite 6.3
- edit /etc/foreman-installer/custom-hiera.yaml and add this line:
katello::num_pulp_workers: "8"
For Satellite 6.4
- edit /etc/foreman-installer/custom-hiera.yaml and add this line:
pulp::num_pulp_workers: "8"
Change the number of workers, this file is overwritten during an installer run
- edit /etc/default/pulp_workers and place there:
PULP_CONCURRENCY=8
- to apply the change, restart all pulp services:
for i in pulp_resource_manager pulp_workers pulp_celerybeat; do service $i restart; done
IMPORTANT
- In case one decreases pulp worker processes, be aware of this pulp upstream bug. To workaround it, first stop all pulp services, ensure no process with
celeryin the command line is running (ps aux | grep python | grep -c celeryreturns 0), apply the change and then start the processes again. - Be careful of increasing
pulp workersto more than 8 even if server having more than 8 CPU's since I/O could become a bottleneck, esp. when other I/O demanding features are concurrently used. If required to have more workers than 8, it is recommended to experiment with e.g. 10 workers, check possible impact, then increase to 12 and see if I/O becomes a problem etc.
Diagnostic Steps
- With a system with less than 8 CPUs,
PULP_CONCURRENCYis set to the number of CPUs. With a system with more than 8 CPUs, it is set to 8.
FROM /usr/share/katello-installer-base/pulp/spec/classes/pulp_config_spec.rb
describe 'with processor count less than 8' do
it "should set the PULP_CONCURRENCY to the processor count" do
should contain_file('/etc/default/pulp_workers').with_content(/^PULP_CONCURRENCY=3$/)
end
end
describe 'with processor count more than 8' do
let :facts do
default_facts.merge({
:processorcount => 12
})
end
it "should set the PULP_CONCURRENCY to 8" do
should contain_file('/etc/default/pulp_workers').with_content(/^PULP_CONCURRENCY=8$/)
end
end
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
