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

Extreme cpu and memory usage #76

Closed
phanirithvij opened this issue Mar 4, 2023 · 3 comments
Closed

Extreme cpu and memory usage #76

phanirithvij opened this issue Mar 4, 2023 · 3 comments

Comments

@phanirithvij
Copy link

phanirithvij commented Mar 4, 2023

Gup updates all packages at once which when there are many (eg ~70 in my case) takes up all the ram 8GB and all cores are at 100% at 89°C. As it spawns ~1900 threads. Thus it is unusable and I had to force quit linux.

Maybe limit it to the number of cores like make -j8. i.e. provide a -j cli arg for people who need it. And set default value to no. of cores.

nao1215 added a commit that referenced this issue Mar 5, 2023
Fix Issue #76: Limit the number of goroutines
@nao1215
Copy link
Owner

nao1215 commented Mar 5, 2023

@phanirithvij
Thank you for your bug report.

The gup command was designed to create as many goroutines as the number of binaries existing in $GOBIN.
However, in an environment with a large number of binaries, the CPU load was abnormally high.

Therefore, from Ver. 0.19.0, the upper limit of the number of goroutines created is set to the number of CPU cores.
The upper limit for the number of CPU cores used can be changed with the "--jobs" option. The default is the maximum number of CPU cores.

@phanirithvij
Copy link
Author

phanirithvij commented Mar 5, 2023

Thanks for the quick fix, I will test it and report back.

@phanirithvij
Copy link
Author

Works! Hit 3GB ram usage max, 59°C (idle is 37°C), updated in 8m20s

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

No branches or pull requests

2 participants