Qos advices smart tv

Hi,

How to know if qos works and know if it's well configured?

I tried it but really not sure.
My tv is wired to my router + I have 2 laptops + 2 smartphones and I would like to be sure that my tv has more bandwidth to stream 4k vs others.

Thanks

What is the bandwidth your ISP delivers (just post a link to a speedtest according to https://forum.openwrt.org/t/sqm-qos-recommended-settings-for-the-dslreports-speedtest-bufferbloat-testing/2803)? And how much bandwidth do your 4k streams require (my guess would be around 25Mbps)?

1 Like

Thanks I will do the test.
But my isp provide 120mbps.
Yes about 25 to stream

Okay, so with 5 devices the equitable share would be 120/5 = 24 Mbps gross rate, that it amazingly close to what your tv needs, so I would start out with using sqm-scripts (opkg update; opkg install luci-app-sqm; select cake as qdisc and piece_of_cake as qos script) and configure it for per internal IP fairness, see the " Making cake sing and dance, on a tight rope without a safety net (aka advanced features)" section at https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details. That should already give each host at least 24 Mbps (if all 5 are concurrently active), which is close to what you need already.
I would try that with some heavy cross traffic generated on all other devices while streaming 4K on the TV. If you are really lucky, that might be all.
Otherwise, the next step will be to make sure the TV gets an extra boost...

Or like Moeller0 said....
In SQM go... Queue Discipline--->use Cake and Layer_cake_qos script--->
Show and Use Advanced Configuration. Advanced options will only be used as long as this box is checked (put tick on this)------>Show and Use Dangerous Configuration. Dangerous options will only be used as long as this box is checked (put tick on this).

Then put these settings according to photo...

diffserv4 nat dual-dsthost
diffserv4 nat dual-srchost

Then Save and Apply

Then go to Firewall---->Custom Rules

Copy and paste these rules...

iptables -t mangle -N dscp_mark
iptables -t mangle -F dscp_mark
iptables -t mangle -A POSTROUTING -j dscp_mark
iptables -t mangle -A dscp_mark -s 192.168.1.111 -j DSCP --set-dscp-class CS6

**Change 192.168.1.111 to your TV's IP.
These rules will give about 30Mbps to your TV ..
What you have done with this...
You use diffserv4...you mark packets from you tv's ip as CS6 and give to them 25% threshold.
According to this.

So, the idea is sound, but the implementation unfortunately not as straight forward, at least with a wifi router...

The issue is, the streaming packets will hit cake before iptables had a chance to change the dscp. Changing the setup to avoid this is possible, but not terribly straight forward....

I’d do this:

  1. Post your router model and kernel version you are using. Example:

root@OpenWrt:~# uname -a
Linux OpenWrt 4.19.106 #0 SMP Sat Mar 7 08:07:53 2020 armv7l GNU/Linux

  1. Post your baseline speedtest without SQM and try out 4K streaming without SQM (any issues?). Streaming 4K should be no issue with your ISP’s speed and vanilla settings.

  2. then if there is as issue with bufferbloat or lag you could turn SQM on - you could try fq_codel vs piece of cake vs layered cake (you have adequate bandwidth, prioritization may not be the issue, you probably just need a smart queue like piece of cake to maintain low lag).