ddos-deflate
ddos-deflate copied to clipboard
High CPU usage with bandwidth_control
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.
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?
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...