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

Increase in CPU usage scanning helm repositories #1637

Open
agarcia-oss opened this issue Mar 14, 2024 · 2 comments
Open

Increase in CPU usage scanning helm repositories #1637

agarcia-oss opened this issue Mar 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@agarcia-oss
Copy link
Contributor

Description

While scanning helm repositories, we have detected a significant CPU usage increase from version 3.0.3 to 3.0.4 and above.

Environment

OS: Mac OS Darwin Kernel Version 23.4.0
Version: v3.0.5

Steps To Reproduce

  1. Execute kubescape 3.0.3
time kubescape_3.0.3 scan https://github.com/kubescape/helm-charts/tree/main/charts

 ✅  Initialized scanner
 ✅  Loaded policies
 ✅  Loaded exceptions
 ✅  Loaded account configurations
 ℹ️   cloning. repository url: https://github.com/kubescape/helm-charts
 ✅  Done accessing local objects
Control: C-0002 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (34/34, 90 it/s)
 ✅  Done scanning Repo
 ✅  Done aggregating results

kubescape_3.0.3 scan https://github.com/kubescape/helm-charts/tree/main/chart  1.36s user 0.29s system 11% cpu 14.188 total
  1. Execute kubescape 3.0.5
time kubescape_3.0.5 scan https://github.com/kubescape/helm-charts/tree/main/charts

 ✅  Initialized scanner
 ✅  Loaded policies
 ✅  Loaded exceptions
 ✅  Loaded account configurations
 ✅  Done accessing local objects
Control: C-0042 100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (50/50, 6 it/s)
 ✅  Done scanning Repo
 ✅  Done aggregating results

kubescape_3.0.5 scan https://github.com/kubescape/helm-charts/tree/main/chart  31.32s user 1.68s system 92% cpu 35.572 total

This CPU usage increase is even more noticeable with larger helm repositories with multiple charts.

Expected behavior

CPU usage should remain constant between kubescape versions.

Actual Behavior

CPU usage in kubescape 3.0.4+ increases from 11% cpu to 92% cpu during some basic testing.

Additional context

We have replicated the issue on several environments.

@agarcia-oss agarcia-oss added the bug Something isn't working label Mar 14, 2024
@matthyx
Copy link
Contributor

matthyx commented Mar 15, 2024

thanks @agarcia-oss we'll look into it

@matthyx
Copy link
Contributor

matthyx commented Apr 2, 2024

@dwertent we'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants