-
Notifications
You must be signed in to change notification settings - Fork 117
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
cwe_checher docker container use too much memory #473
Comments
Hi, unfortunately it is not uncommon for implementations of static analysis algorithms to use a lot of memory. This is true for any tool that does analyses that maintain a complex state. For most of our analyses memory consumption should approximately correlate linearly with program size (but program characteristics can also play a role). We frequently encounter cases where we use more then 20GiB of RAM on "large" programs. There is not much that can be done about that as we often need to trade resource consumption for precision. I'd generally recommend a system with at least 64GiB of RAM. If you run many analyses in parallel or want to avoid rendering the system unresponsive due to swapping I'd recommend limiting the memory usage of containers. |
thanks very much, I will try to limit the memory usage of docker container and observe the difference of time usage |
OS: Ubuntu 24 Server Even with these specs I face the issue of memory exhaustion. But I had some questions regarding how data is handled by cwe_checker docker on memory.
My knowledge in thread pooling and static analysis is a bit weak so please help me out here with any suggestions towards optimizing and best configuration I could use to improve performance and avoid code -137. Thank you! |
EDIT: updated figures after testing with a smaller binary Facing the same issue here, on a beefy machine. Running cwe-checker as a Docker container, latest image as of today. OS: Ubuntu 24.04, on WSL I'm testing cwe-checker on Timeline is roughly (by watching running processes), in mm:ss
Also, despite the System with more RAM are not easy to come by and I doubt it will solve the problem anyway. |
Can someone help give me some suggestions?
OS: Ubuntu 20.04.1
CPU: 4 cores
Mem: 16G
I run the cwe_checker:v0.8 docker container to scan a binary file, the I use "docker stats" command to monitor the memory usage, the memory usage of cwe_checker container reaches to 10.19G (see the picture below)
Could someone tell me how can I reduce the memory usage? Such as
(the binary file contains some sensitive data, so I can't upload here, sorry)
The text was updated successfully, but these errors were encountered: