Why consumed disk space of /var/lib/pulp varies a lot over Capsules?

Solution Verified - Updated

Environment

Red Hat Satellite and Capsule 6.10 +

Issue

Satellite WebUI (or "df" command on Capsules) shows quite different / varying "Pulp storage" sizes - different Capsules require different amount of /var/lib/pulp disk space.

Assuming all Capsules are assigned with the same set of Lifecycle Environments and the Capsules are properly synchronized, what can explain the differenc ein disk space consumption?

Resolution

One possible reason is On Demand download policy of many repositories. For On Demand download policy, Capsule does not store any repository content until requested by a client. If clients of one Capsule have requested much more content than clients of another Capsule, the Capsules store different amount of content. See Diagnostic Steps to identify this possibility.

Another cause could be different Download Policy set for different Capsules (or their repositories). This can be checked e.g. via WebUI by editing the given Capsule.

For more KB articles/solutions related to Red Hat Satellite 6.x Capsule Sync Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Capsule Sync Issues.

Diagnostic Steps

Compare below numbers on Capsules with different /var/lib/pulp size content:

  • number of pieces of content (say, packages) that are known to the Capsule but not downloaded:
su - postgres -c "psql pulpcore -c \"SELECT count(*) FROM core_contentartifact WHERE artifact_id IS null;\""
  • number of pieces of content that are already downloaded to /var/lib/pulp:
su - postgres -c "psql pulpcore -c \"SELECT count(*) FROM core_contentartifact WHERE artifact_id IS NOT null;\""
  • amount of disk space occupied by downloaded artifacts / content:
su - postgres -c "psql pulpcore -c \"COPY (SELECT size FROM core_artifact) TO STDOUT;\"" | awk '{ sum+=$1 } END { print sum }'

Sum of the first and the second output should be very similar for all Capsules. The bigger 2nd or 3rd number is, the more content the Capsule downloaded and stored under /var/lib/pulp.

SBR
Product(s)
Components
Category

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.