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

CPU max usage #7

Closed
InfiniteCod3 opened this issue Aug 22, 2022 · 15 comments
Closed

CPU max usage #7

InfiniteCod3 opened this issue Aug 22, 2022 · 15 comments

Comments

@InfiniteCod3
Copy link

Hello, I have set up hopper to proxy a basic spigot server. even when no one uses the proxy, hopper tends to spike the cpu at 100% for like 10 minutes.
unknown (3)
unknown (4)

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

Hi. Thank you for showing interest in the project. This is a potential issue I am aware of and I'd like to investigate further with you.

  • Can you please enable debug logging by running hopper with RUST_LOG="debug" ./hopper? Please share here any unexpected output

  • Also, can you share your config file here?

Thank you very much

@InfiniteCod3
Copy link
Author

here is my config
Config.zip
and i will turn on the debugging and see if there is anything unexpected going on

@InfiniteCod3
Copy link
Author

It's just weird 1 person joined cpu spiked to 50% second person joined cpu spiked to 100% and there are no errors or any unexpected output.

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

@InfiniteCod3 this is interesting. May I know what version of linux are you running? Also what distro? How are you running the program? Thanks

@InfiniteCod3
Copy link
Author

Ubuntu 20.04.4 LTS, I'm running the program as root in the root directory with ./hopper or RUST_LOG="debug" ./hopper for the debug

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

Also, your config file is wrong. It shouldn't be the cause of the problem but you might want to try with a correct configuration file:

listen = "0.0.0.0:25565"

[routing.routes]
"katana.lol" = { ip-forwarding = "bungeecord", ip = "178.63.42.237:20006" }

@InfiniteCod3
Copy link
Author

oh yeah thanks, i doubt its gonna fix the issue tho

@LegendaryOfCats

This comment was marked as spam.

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

i doubt its gonna fix the issue tho

yea i know, can you try running it without bungeecord ip forwarding? thanks

@InfiniteCod3
Copy link
Author

i doubt its gonna fix the issue tho

yea i know, can you try running it without bungeecord ip forwarding? thanks

stills does the same, the cpu still spikes up

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

stills does the same, the cpu still spikes up

The issue may be the low core count which creates some sort of spinlock condition between tasks. I will try doing some local testing with a limited number of cores

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

image
I was indeed able to recreate the issue with a low core count. Yikes.

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

I have just checked. Any core count ties hopper in an infinite loop. This appears to be a problem with the latest version.

@BRA1L0R
Copy link
Owner

BRA1L0R commented Aug 22, 2022

Hi. I think i have identified and solved this issue. Can you check on your end once the CI produces the binary? Thank you very much for your patience

@InfiniteCod3
Copy link
Author

Hi, the problem has been solved hopper no longer eats the whole cpu. Thanks for the quick fix 👍

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

3 participants