Skip to content

Add a ResourceBudget mechanism which keeps disk usage in check during syncs#7649

Draft
dralley wants to merge 2 commits intopulp:mainfrom
dralley:resource-budget
Draft

Add a ResourceBudget mechanism which keeps disk usage in check during syncs#7649
dralley wants to merge 2 commits intopulp:mainfrom
dralley:resource-budget

Conversation

@dralley
Copy link
Copy Markdown
Contributor

@dralley dralley commented Apr 27, 2026

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

When set, small artifacts will download with high concurrency while large artifacts
will automatically throttle to avoid exhausting disk space.

Defaults to 5120 (5gb)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a hard limit? Will this option prevent syncs to succeed with one 6gb file?
(Not that this is a bad thing, just maybe worth mentioning. TBF the available diskspace is already a hard limit...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should always let one file through at a time no matter how large. In theory

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, then we don't need to mention it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's worth adding a note that this does not prevent bigger to be synced.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is user facing documentation I would prefer dropping specific references to ArtifactDownloader and ArtifactSaver.

dralley added 2 commits April 30, 2026 23:13
Artifacts stay on disk between the ArtifactDownloader stage and the
ArtifactSaver stage. If too many large files build up, it can exceed the
allotted filesystem space of the working directory.

Previously we used unecessarily small batch sizes by default in order to
ensure the worst case was avoided.

This approach dynamically controls how much disk space is being used by
the task and provides backpressure when the limit is exceeded, flushing
batches and preventing new artifacts from being downloaded.

closes pulp#7559
Assisted-By: claude-opus-4.6
@dralley dralley force-pushed the resource-budget branch from 3b86771 to 7ba48f8 Compare May 1, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants