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

Wondershaper interferes with tc qdisc rules #56

Open
Raycoms opened this issue Oct 31, 2020 · 4 comments
Open

Wondershaper interferes with tc qdisc rules #56

Raycoms opened this issue Oct 31, 2020 · 4 comments
Labels

Comments

@Raycoms
Copy link

Raycoms commented Oct 31, 2020

I was attemtping to use wondershaper to reduce the bandwidth to 100mb/s and tc qdisc rules to add 20/100ms of latency.

However, it appears the two things are incompatible.
The set rule:

sudo tc qdisc add dev enp5s0f0 root netem delay 20ms 

Disappears after starting wondershaper with?

sudo wondershaper enp5s0f0 102400 102400

And after starting wondershaper, attempting to add the rule will trigger:

Error: Exclusivity flag on, cannot modify.
@magnific0 magnific0 added the bug label Jan 25, 2021
@magnific0
Copy link
Owner

I am not surprised, as wondershaper uses tc behind the scenes. It also quite indiscriminately clears current rules. So it definitely does not play nice with other setups that use tc. This is a bug and should be fixed.

However, not many people use custom rules and/or want delays, so my advice would be to make it work for yourself. See where in the script you might combine your delay rule with the rule from wondershaper. For instance https://github.com/magnific0/wondershaper/blob/master/wondershaper#L249

Let us know your results!

@magnific0
Copy link
Owner

Oh I forgot there's a related issue #29, you should chime in if you have any results!

@Raycoms
Copy link
Author

Raycoms commented Jan 26, 2021

I ended up using plane netem sudo tc qdisc add dev enp5s0f0 root netem delay 20ms limit 400000 rate 100mbit which solved it for me (found that out after digging around for weeks). Since wondershaper uses tc behind the scenes, latency could potentially become an optional parameter.

@magnific0
Copy link
Owner

@Raycoms , thanks for sharing. This combined latency and rate rule shoud be straight-forward to add to wondershaper. Still need some time for testing. Glad to hear the plane approach is working for your!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants