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
High CPU usage #40249
Comments
This is what's called a busy loop. The only thing it does is burn CPU. You should replace it with |
What @DisposaBoy said. It's the busy loop in the |
@ALTree Thanks for quickly replying, thanks alot, but I want to run the program indefinitely, This is what we use to do in "C", like while(TRUE); |
The |
Thanks alot @ALTree as you said, I replaced with select{} now it looks good. Thanks again for your quick reply. |
If you see "go_lang_prog" and "unix_server" are written in GO, and it is showing 779 MB of virtual memory, why it is taking such huge memory |
@santhoshkarthi it looks like your original question has been answered. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For asking questions, see:
|
What version of Go are you using (
go version
)?Go Version : 1.14.3
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?Linux AMD64, as well as ARM
go env
OutputWhat did you do?
I have just created two go routine and just printing one statement with sleep of 5 secs, so both go routine were running concurrently but when I checked the CPU always it was taking more than 70% in imx6ul(ARMv7)
What did you expect to see?
It should not use much CPU
What did you see instead?
It was taking more CPU,
The text was updated successfully, but these errors were encountered: