What is the recommended size of /var/cache/pulp on Red Hat Satellite server?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.9 and lower versions.

Issue

  • Why /var/cache/pulp is getting full?
  • What is the recommended size of /var/cache/pulp on Red Hat Satellite server?
  • How to clean /var/cache/pulp?

Resolution

  • During a normal yum repo sync, a maximum of 5 RPMs are stored in /var/cache/pulp at a time. As each download is completed and verified, the file gets moved into /var/lib/pulp/content/.

  • However, pulp does also sync ISOs, docker repos and other large items. In that case, the size of the content being retrieved is difficult to predict. If someone is downloading 3 DVD images concurrently that are 4GB each, then it is expected that the /var/cache/pulp directory will store 12GB of data.

  • For large repos, metadata are off-loaded to *.db files to the cache. The size of the .db files roughly corresponds to unpackaged *other* and *filelist* repodata files. The size of such content depends on the repository metadata size, which is for example 4GB for 7Server repository.

  • Basically for a non-yum repo, the whole repo content is kept in the cache for some time.

  • Therefore the maximum size very depends on the usage of the specific Satellite; the bigger non-yum repos are synced, and the more such repos in concurrent are synced, the bigger disk space for the cache is needed. If not knowing your usage in advance, the default recommendation per installation guide is 20 GB for the Satellite server and 32 GB for the Capsule server.

  • The size of the /var/cache/pulp is dynamic. it will increase during the sync task and should reduce ( into KB's of size only) once the sync task is completed. So there is no need to manually clean the content of the directory.

  • If one suspects there is some orphaned content in the cache, then let run the below cleanup procedure - when no Sync/Publish/Promote is in progress:

    # service pulp_workers stop
    # rm -rf /var/cache/pulp/*
    # service pulp_workers start
    
  • Using the same volume of /var/cache/pulp and /var/lib/pulp can decrease the time required to move the content from /var/cache/pulp and /var/lib/pulp after the synchronization. It should be also safe to have a symlink from /var/cache/pulp to a directory like /var/lib/pulp/cache to achieve this and to deal with the disk space requirements of the cache. Be aware of a This content is not included.bug in backup online present in Satellite versions prior to 6.9.5 that become end-less when using this symlink.

  • The following bugzilla's have been opened to address the issue with increasing size requirements for /var/cache/pulp:
    This content is not included.This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=1891000
    This content is not included.This content is not included.https://bugzilla.redhat.com/show_bug.cgi?id=1889005

  • This issue has been addressed in Red Hat Satellite 6.10 and higher versions that uses pulp3. The old /var/cache/pulp has been replaced by /var/lib/pulp/tmp.

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

Root Cause

  • During the download or synchronization of the repositories or ISOs on the Red Hat Satellite server, the data is stored temporarily in the /var/cache/pulp. Once the task is completed and verified the files gets moved into /var/lib/pulp/content.
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.