Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Untagged Artifacts Takes Excessively Long Time (4-8s per Artifact) During Garbage Collection #21443

Open
jinghongzhaoying opened this issue Jan 21, 2025 · 1 comment

Comments

@jinghongzhaoying
Copy link

Description

When running Harbor garbage collection (GC), the operation to delete untagged artifacts is extremely slow, taking 4-8 seconds per artifact. This causes GC tasks to run for hours when dealing with a large number of untagged artifacts。

Environment

Harbor Version: 2.6.2
Database: PostgreSQL 14

Root Cause Analysis

Based on code review and testing, the slowness likely stems from:
Artifacts are deleted one-by-one in a blocking manner.

Suggested Solutions

Delete artifacts in batches (e.g., 100 artifacts per transaction) to reduce database overhead?

@Vad1mo
Copy link
Member

Vad1mo commented Jan 21, 2025

I suggest updating to latest harbor and try again, in the last years we have made some GC improvements.

Please comment if you still find it to be slow.
When you do please provide the following information

  • Data in Gib scheduled for GC
  • Amount of Artifacts
  • Your set up like object store etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants