-
Notifications
You must be signed in to change notification settings - Fork 107
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
[Bug]: High CPU utilization #2155
Comments
It looks like the bug was introduced in #2085, when the |
@patrick-esentire @danielsand yes, we are aware of this issue. Thanks for reporting it. We will get to this as soon as folks are back from holidays. |
Note that depending on configuration, |
resolves project-zot#2155 Signed-off-by: Andrei Aaron <[email protected]>
resolves project-zot#2155 Signed-off-by: Andrei Aaron <[email protected]>
resolves project-zot#2155 Signed-off-by: Andrei Aaron <[email protected]>
resolves project-zot#2155 Signed-off-by: Andrei Aaron <[email protected]>
resolves project-zot#2155 Signed-off-by: Andrei Aaron <[email protected]>
resolves #2155 Signed-off-by: Andrei Aaron <[email protected]>
zot version
v2.0.0
Describe the bug
zot is consuming one CPU core minimum. You can see this behavior with the
example/config-minimal.json
The problem appears to be in the scheduler, there is a spin loop at line 261 in pkg/scheduler.go that appears to never hit the throttle condition, and instead loops infinitely against scheduler.getTask looking for tasks that don't (and won't) exist.
To test this theory, I added a 1ms sleep in the loop I mentioned above, and it reduced the CPU utilization down to approx 20 millicpu
To reproduce
Expected behavior
The expected behavior would be near-zero CPU utilization when there are no images and no work being done.
Screenshots
This is from a 30s cpu profile, showing the main utilization coming from the scheduler and scheduler.getTask
Additional context
Here is the log output, when running using the minimal config.
The text was updated successfully, but these errors were encountered: