Bug 2036408 - Change default pulp workers if RHUA has lower cpu count
Summary: Change default pulp workers if RHUA has lower cpu count
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: 4.4.0
: 4.x
Assignee: RHUI Bug List
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-31 22:20 UTC by Paul Dudley
Modified: 2023-05-03 14:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 14:56:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHUI-377 0 None None None 2023-04-25 14:13:38 UTC
Red Hat Product Errata RHSA-2023:2101 0 None None None 2023-05-03 14:56:50 UTC

Description Paul Dudley 2021-12-31 22:20:14 UTC
Currently pulp workers are set to 8 and this is hard-coded in the `/usr/share/rhui-installer/playbooks/rhua-provision.yml` file here:
~~~
  vars:
    - pulp_workers: 8
~~~

With the minimum hardware settings from the docs of 4 cpus and 8GB memory 8 workers is likely not the best case for these systems.

It would be good if worker count could be set dynamically based on cpus present up to a certain value, perhaps something like 'if less than 8 cpus are present set the worker count to match cpus'.

Comment 1 Paul Dudley 2021-12-31 22:33:13 UTC
Pulp docs [1] state anywhere from 1-3 GB should be allocated per pulp worker. If a RHUI system of 4CPUs and 8GB memory, which still fits the requirements in the docs, is created with 8 workers and is managing many repositories we should reasonably doubt that this would be stable long-term.

[1] https://docs.pulpproject.org/pulpcore/installation/hardware-requirements.html

Adding another task to the playbook to adjust the variable helped reduce cpu count when the rhui-installer is run:
~~~
     70 
     71     - name: Set Pulp_workers to less than 8 if VCPU<8
     72       set_fact:
     73         pulp_workers: "{{ ansible_processor_vcpus }}"
     74       when: 'ansible_processor_vcpus < 8'
     75 
~~~

This is just an example of what could work before permanent changes are made, assuming the ansible fact above returns the proper cpu count.

Comment 2 Gregg Tanzillo 2022-01-26 15:16:56 UTC
It seems like initially, the documentation and/or the default number of workers should be changed so that they are in alignment.

Comment 3 Gregg Tanzillo 2022-01-26 15:29:11 UTC
Perhaps, the documentation should be changed to state the amount of RAM per worker should be 4GB. Also, at a minimum, that should be no more than 1 worker per CPU core. This is what is recommended for Pulp.

This would be in addition to implementing the suggested dynamic worker setting.

Comment 4 Radek Bíba 2023-04-24 14:02:17 UTC
RHUI 4.4 will bring an installer option to set the number of Pulp workers.

Comment 9 errata-xmlrpc 2023-05-03 14:56:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHUI 4.4.0 release - Security Fixes, Bug Fixes, and Enhancements Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2101


Note You need to log in before you can comment on or make changes to this bug.