pyrovski / wrtbwmon

Linux bandwidth monitor with per-device tracking
Other
176 stars 47 forks source link

wrtbwmon may reduce throughput on high-speed connections #9

Open pyrovski opened 8 years ago

pyrovski commented 8 years ago

Even though the kernel does all the accounting, having many iptables rules can slow down a home router, especially if its already nearing its NAT throughput limit.

didi1357 commented 4 years ago

I don't think this should be an issue of your application. Just note it in the readme. All monitoring solutions which don't use (most likely proprietary) NAT acceleration ICs and drivers will need to rely on the CPU being fast enough to count while NATing packets using iptables. This is just a matter of processing power I think. There is nothing you can do.

Maybe the kernel also drops counting in favor of keeping throughput high? So possibly related to #37 ?

pyrovski commented 4 years ago

I left this as a bug because it could be partially mitigated by changing construction of the iptables rules. If the rules were laid out in consideration of how the kernel processes them, we could reduce the number of rule evaluations required per packet per device.