What is the recommended size of /var/cache/pulp on Red Hat Satellite server?
Environment
- Red Hat Satellite 6.9 and lower versions.
Issue
- Why
/var/cache/pulpis getting full? - What is the recommended size of
/var/cache/pulpon 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/pulpat 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/pulpdirectory will store 12GB of data. -
For large repos, metadata are off-loaded to *.db files to the cache. The size of the
.dbfiles 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 GBfor theSatelliteserver and32 GBfor theCapsuleserver. -
The size of the
/var/cache/pulpis 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/pulpand/var/lib/pulpcan decrease the time required to move the content from/var/cache/pulpand/var/lib/pulpafter the synchronization. It should be also safe to have a symlink from/var/cache/pulpto a directory like/var/lib/pulp/cacheto 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/pulphas 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.
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.