-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
perf(misconf): High memory usage (9.5 GB) and long scan time (45 min) on some repos #6557
Comments
Looks like the issue lies here We seem to spend an awful lot of time getting the underlying metadata for the code snippets to show in the results. This involves reading each file that has a misconfiguration, which is expensive to do with large repos as there are many files. ResultsInput: https://github.com/kubernetes/minikube.git Before
After
Possible solutions
To be clear, misconfigurations are still shown, just not the code snippets. They will look as follows:
|
I also have some thoughts:
|
It would be great to be able to toggle code snippets with a CLI flag. Disable them when not needed to improve performance. |
@simar7 i agree with @ptupitsyn . |
I'm still wondering why it consumes 9.5 GB. If it reads each file individually, it doesn't use so much memory. Or does it keep all the file content in memory? |
I agree with @ptupitsyn's approach |
Discussed in #6549 and #6517
Originally posted by ptupitsyn April 24, 2024
Description
Some repos, like https://github.com/kubernetes/minikube, take a very long time to scan (45 minutes on
t3.xlarge
) and consume up to 9.5 GB of RAM.Desired Behavior
Memory consumption below 1 GB, scan time under 5 minutes.
Actual Behavior
Memory consumption of 9.5 GB, scan time 45 minutes.
Reproduction Steps
Target
Filesystem
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
Ubuntu 22.04
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: