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

High CPU usage with bandwidth_control #73

Open
Qiaoj opened this issue Dec 22, 2019 · 2 comments
Open

High CPU usage with bandwidth_control #73

Qiaoj opened this issue Dec 22, 2019 · 2 comments

Comments

@Qiaoj
Copy link

Qiaoj commented Dec 22, 2019

BANDWIDTH_CONTROL has too hight cpu usage to be usable. constant >10% (DAEMON_FREQ is set to 10 seconds)

I suspect something is wrong, because iftop wasn't installed, though last release says "Added iftop as new dependency". I installed it but nothing changed.

With BANDWIDTH_CONTROL=false cpu is not used, so it is bandwidth monitoring problem.

Just reporting. Probably needs some checking before using it. May be some broken loop is going here because of DAEMON_FREQ=0?
Command like "ddos -v4" for bandwidth_control would be great, so we can know does it works at all.

@Qiaoj
Copy link
Author

Qiaoj commented Dec 22, 2019

I don't know bash, but I can't wrap my head around DAEMON_FREQ=0
Doesn't it mean, that if BANDWIDTH_CONTROL=true it runs like constantly and not what DAEMON_FREQ is set in .conf?
It says "# we force DAEMON_FREQ to zero because iftop takes 3 seconds # to calculate correct bandwidth usage." but where do these 3 seconds appear in code? After them you should return DAEMON_FREQ to original value, right?

@jgmdev
Copy link
Owner

jgmdev commented Jan 16, 2020

Maybe you can try commenting/removing that line out and seeing if it works any better for you. I don't remember why I took that decision... Maybe I exaggerated while doing some extreme sample testing...

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