Limiting Synchronization Speed of Red Hat Satellite 6

Updated

Overview

Many users of Red Hat Satellite would like to limit the synchronization speed of their Satellite. This is generally done to avoid exhausting available bandwidth or other Quality-Of-Service (QOS) reasons.

Notes/Caveats

This article document describes how to limit the synchronization speed of a Satellite by configuring files normally configured via the installer. These configuration settings will not persist via upgrades and will need to be reapplied.

Requirements

  • Red Hat Satellite 6.1 - 6.9
  • NOT applicable to Satellite 6.10 or newer

Details

Satellite's effective synchronization speed is a property of two variables which are multiplied together:

  • PULP_CONCURRENCY - This value, set in /etc/default/pulp_workers controls the number of synchronization jobs that can run in parallel.
  • max_speed - This value, set on the respective Pulp importer (in units of bytes/sec), controls that maximum speed used per sync task.

Thus to limit Satellite's synchronization speed, it is required to set both the PULP_CONCURRENCY and max_speed values.

Workflow

First, configure the PULP_CONCURRENCY value in /etc/default/pulp_workers. Example follows:

# cat /etc/default/pulp_workers

# Configuration file for Pulp's Celery workers

# Define the number of worker nodes you wish to have here. This defaults to the number of processors
# that are detected on the system if left commented here.
PULP_CONCURRENCY=4

# Configure Python's encoding for writing all logs, stdout and stderr
PYTHONIOENCODING="UTF-8"

Next, configure the respective importer. This example uses the yum importer and affects only RPM content. Repeat for the other importers (if desired) in /etc/pulp/server/plugins.conf.d/
Example follows:

# cat /etc/pulp/server/plugins.conf.d/yum_importer.json

{
    "proxy_host": null,
    "proxy_port": null,
    "proxy_username": null,
    "proxy_password": null,
    "max_speed": 10
}

List of typical importers in Satellite6:

docker_importer
iso_importer
ostree_importer
puppet_importer
yum_importer

Optional - Verify the syntax of your file after editing. This uses the json_verify command, provided by the yajl package

# json_verify < /etc/pulp/server/plugins.conf.d/yum_importer.json
JSON is valid

Restart all Satellite services:

katello-service restart

Applying Settings (Post Upgrade)

As stated above the settings that are described in this KCS WILL be overwritten on an upgrade. Prior to an upgrade it is advisable to backup these files so that the values within can be restored.
Additionally, you can run the installer in dry-run mode to verify which configuration files will be changed.

Satellite 6.1

katello-installer --upgrade --verbose --noop

Satellite 6.2+

satellite-installer --upgrade --verbose --noop

Additional References

Product(s)
Article Type