SQM issues with Ring Doorbell

Ok, I reset the stats and rang the doorbell. Here is the output.

root@LEDE:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc cake 8043: dev eth0 root refcnt 2 bandwidth 850Kbit besteffort triple-isolate rtt 100.0ms raw total_overhead 14 hard_header_len 14 
 Sent 2068643 bytes 3745 pkt (dropped 427, overlimits 5943 requeues 0) 
 backlog 0b 0p requeues 0 
 memory used: 369600b of 4Mb
 capacity estimate: 850Kbit
                  Tin 0
  thresh        850Kbit
  target         21.4ms
  interval      116.4ms
  pk_delay       21.8ms
  av_delay        6.6ms
  sp_delay         24us
  pkts             4172
  bytes         2622758
  way_inds            0
  way_miss          141
  way_cols            0
  drops             427
  marks               1
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1749

qdisc ingress ffff: dev eth0 parent ffff:fff1 ---------------- 
 Sent 673707 bytes 2858 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc fq_codel 0: dev eth1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
 Sent 908239014 bytes 979464 pkt (dropped 0, overlimits 0 requeues 3) 
 backlog 0b 0p requeues 3 
  maxpacket 1506 drop_overlimit 0 new_flow_count 2 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev br-wan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc noqueue 0: dev wlan1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
qdisc cake 8044: dev ifb4eth0 root refcnt 2 bandwidth 16875Kbit besteffort triple-isolate wash rtt 100.0ms raw total_overhead 14 hard_header_len 14 
 Sent 1019667 bytes 2858 pkt (dropped 0, overlimits 271 requeues 0) 
 backlog 0b 0p requeues 0 
 memory used: 15872b of 4Mb
 capacity estimate: 16875Kbit
                  Tin 0
  thresh      16875Kbit
  target          5.0ms
  interval      100.0ms
  pk_delay        871us
  av_delay        114us
  sp_delay          6us
  pkts             2858
  bytes         1019667
  way_inds            0
  way_miss          137
  way_cols            0
  drops               0
  marks               0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1749

root@LEDE:~#

This page says that you may experience a blank screen if certain ports are blocked by the firewall... Is it possible that SQM is either blocking ports are causing the UDP traffic to get blocked?

SQM doesn't block ports.

Two sites where you can test for ports open to the Internetā€¦

GRC ShieldsUP!

https://grc.com/x/ne.dll?bh0bkyd2

SpeedGuide Security Scan

https://www.speedguide.net/scan.php

The results should be "filtered" "open|filtered", or "stealth".

However, I would check if there is a setting to adjust the video quality down to a lower resolution on the Ring app.

Unfortunately, according to the Tech Specs on the Ring website, you do not meet the "minimum" WiFi upload speed requirements for the product...

Requires a minimum upload speed of 1Mbps, but 2Mbps is recommended for optimal performance.

Okay, this indicates that your kernel automatically adds 14 bytes of the overhead, so you should specify 40-14 = 26 Bytes to sqm (sqm has currently no way to measure how much overhead the kernel already adds to the packet size so this correction needs to be done manually). This is true for both ingress and egress.
This is also orthogonal to your Ring issue, but still you might as well fix this while we are at it :wink:

Best Regards

Regarding the speedtests, it would be even more informative if you could post the link to the results summary (follow the Results+Share button/link, here are some thoughts on how to do this https://forum.openwrt.org/t/sqm-qos-recommended-settings-for-the-dslreports-speedtest-bufferbloat-testing/2803?u=moeller0.

Best Regards

Ah, you could try to test that by setting upload/egress bandwidth in the sqm GUI to zero (which disables the shaper in that direction) if that gets you the video back it would indicate a egress bandwidth issue. You could also try the same with the download/ingress bandwidth for completeness.

Advertised upload speed is less than 1Mbps.

Does not meet the minimum system requirement for Ring.

This seems literally correct, but since the OP seems to get working video streams without sqm there might be a way. Also the Ring numbers 1 or 2 Mbps really look like someone applied generous rounding to get to nice numbers and not so much like the real technical limits.... (but without any real data, I might be deluded and the technical limit truly is 1Mbps).

Best Regards

I wouldn't call it "working", unless the bar for performance is set so low that you would trip over it when you walk.

I get your point, but is seems to me the OP was sort of accepting that that might be the best he could hope for and was more puzzled that with sqm he did not even get that... I could be wrong, since I can not read anybodies mind ;), but this is getting a bit off-topic, so I will try to refrain from further tangents (which I am just too prone to follow).

I hear tinfoil is good for that...

I appreciate the discussion and advice!

Yeah, I have accepted the poor performance... but it works well enough to know if I actually know the person at my door or not, and I could make out what they are saying. But poor performance and not working at all are worlds apart.
I have given Ring feedback that it would be a nice feature if the doorbell was able to livestream a low quality stream, while locally buffering the higher quality video. Once the live interaction is complete, upload the high quality stream. They probably wont do that, since apparently my nieghborhood is the only in the USA with such poor internet access.

When I set out to implement QoS in the router, I was going to do it the old school way. Prioritize the Ring over all other traffic, but I would still suffer from BufferBloat for our more interactive uses which makes me sad.

Is there a way that you can think of where I can apply SQM to everything except the Ring device?

One thing to understand about SQM is that you sacrifice some bandwidth for impoved stability.

You have no bandwidth to sacrifice.

1 Like

Technically on egress, and that is what we talking about here, the bandwidth sacrifice is really minimal, with proper link layer adjustments one should be able to almost reach 100% of line rate, but still a managed buffer is going to behave differently from a non-managed one...
@av_boy the exclude anything from traffic shaping idea unfortunately does not work, once you allow un-managed flows the bandwidth availabe to the shaper gets time vaiant and sqm is not equipped to deal with that.
But there might still be a few tricks up our sleeves to trade some more latency for more tolerable Ring video.
It might make sense to try to increase the interval and target fields in the GUI....

Not really, what it would do however is choke all other traffic while ring is streaming, allowing your neighbourgs to accidentally take you off the internet :wink: (most downloads require some feedback via uploaded packets, if those can not go out the download will drizzle out and stall).

1 Like

I can also attest that Ring, DSL and QoS don't mix. I have dozens of neighbors that have tried this, and on <1Mbps lines, it fails.

Having QoS on is preferred for everything else, so the Ring's get returned.

1 Like

It wouldn't surprise me if what happens is the lack of bufferbloat allows the ring device to determine it doesn't have the bandwidth it needs, and it turns off the video, whereas with bufferbloat it just saturates the buffers with video and never sees a drop, so it doesn't know that it's operating on a link that's too slow.

1 Like

could just be the default fair queueing which will give other concurrent flows as much chance/bandwidth as the Ring, in that case he might try the "besteffort" keyword, but in that mode sqm is not going to be too pleasant to use

Hey Guys,

I wanted to follow up and thank you for your help trying to fix my issue. I agree that its probably likely that bufferbloat is the reason why the ring is working without SQM. Looking at the minimum specs for the ring, its actually 2mbps for the version I have, not 1mbps. So, I agree that my internet capability is just too crappy to support that device.

I used the information you guys provided as well to tune SQM:

assuming standard PPPoE on the wire size of a packet: 53*(ceil((1500 + 6 + 6 + 2 + 18) / 48)) = 1696

15990 / ((1500-8-20-20)/(1696)) = 18677.02 Kbps
731 / ((1500-8-20-20)/(1696)) = 853.84 Kbps

linklayer atm overhead 40 mtu 2047 tsize 512
you should specify 40-14 = 26 Bytes per packet overhead

results with SQM off http://www.dslreports.com/speedtest/29352123
results with SQM on http://www.dslreports.com/speedtest/29353088

It i s a bit sobering that sqm and Ring seem to be incompatible, but it also seems that you now have bufferbloat in your uplink well under control, so half-full or half-empty, you decide :wink: