SQM Struggle Continues

Agreed, though you do learn a lot from these very time consuming issues. I have been there more than once myself, it really matures you in networking :wink:

2 Likes

From SQM's perspective it does not really matter whether the modem is bridged or whether you use double NAT, as long as no device in your network bypasses your sqm-openwrt router by directly connecting to the docsis modem-router (be it via wifi or via wired ethernet). SQM needs to be in control of data on the true bottleneck and that requires that it knows about each and every packet sent (or at the very least almost all of the packets, a few additional ARP packets from your modem should not really matter too much, but a another computer say watching netflix connected directly to the modem-router will be an insurmountable challenge for sqm).

2 Likes

well now i need help setting this up, looks like its setup like this as of now:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdab:bbcc:401e::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option ifname 'eth1.2'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth1.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 3 5t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

But the preferable option would be a modem in full bridge mode behind the router which is running SQM for the wan interface right? I was always told to avoid double NAT at any time...

Oh, I agree double NAT is a pain in the a**. But from SQM's perspective it does not matter. Sometimes double NAT is impossible to avoid.

2 Likes

Yeah, didn't explain it well enough, double NAT does influence some speed tests, so that might give you results that are not to your liking. But if you have put the router (not sure if you did or not) in the switch port and not the internet port, you are basically going around the SQM script altogether. Since we don't know those kind of details, I always assume the worst to eliminate those things as issues.

@Happi do you have problems when the only traffic to/from the Internet is your gaming traffic (e.g. all other devices are disconnected, and on your gaming device no programs apart from your game are running in foreground or background that could be accessing the Internet)?

If you have problems even when all the bandwidth is dedicated to your game, SQM wouldn't help, maybe your ISP network is congested which would be outside of your control, but you could try switching to a different ISP.

If the problems go away in that set up, you should be able to shape the traffic to fix the problems, so that it'd work as if your game had the whole bandwidth to itself. You could mark your gaming traffic with DSCP on your gaming device and apply strict prioritization on the router, so that other traffic would be prevented from competing with your gaming traffic (other traffic would only use the bandwidth not needed by your game), if you do it properly, you'd be able to play games with minimum latency while uploading/downloading heavily (e.g. running p2p file sharing programs like bittorrent). More information can be found in the post below

SQM with DSCP tagging for gaming is a great idea but with a default config of SQM + Layer_cake and most Network setups (e.g. OpenWrt Router with Wifi AP) this will only work for egress afaik, unless you work with veth, nftables or a script for ingress DSCP, which isn't always so easy to implement for many people (myself included).

@Happi mentioned that the connection was 100 down / 5 up, I'd hazard a guess that it's the egress traffic that's suffering from congestion.

Assuming the speed is in Mbps, 5Mbps upload isn't much nowadays, so cake with DSCP may not be sufficient as cake is designed to achieve fairness, it doesn't use strict prioritization, it prevents low priority traffic from being starved, so if the game requires higher percentage of bandwidth than what cake deems fair, the gaming traffic would be throttled and the latency would go up. prio qdisc on the other hand uses strict prioritization, so it would never throttle high priority traffic to benefit the low priority traffic.

While the fairness offered by cake is very useful when the broadband is shared by people who don't know each other well. I think it isn't always useful in a home network because it's unlikely that a family member would complain about p2p download not getting its fair share due to other family members using too much bandwidth for gaming etc, it's far more likely that the p2p downloading family member would throttle the speed willingly to reduce the impact on others. prio simply automates this dynamically in real-time while keeping network utilization maximized.

1 Like

i have tried everything, so far nothing has helped, including disabling all other devices or WIFI etc. i could definitely try another approach the one you just linked but i have no idea where to start, unless i could follow the tutorial or something. i have already tried hisham2630 approach and it didn't help me much, you can see my posts on those threads as well. it would be nice if you could share a full tutorial or something that goes step by step and i could give it a try. thanks

First we need to establish whether the problem could be solved by traffic shaping. Could you answer the question quoted below?

As a new user, I can't post more than 3 replies in a thread, so I'll keep updating this post until I'm allowed to post more replies

Update 1

Well, a traffic shaping script may work really well in one network and fail miserably in another. What's important is does the script address the problem you have , or even can the problem be fixed by traffic shaping? We don't want to start fixing a problem that's not fully understood as we could end up trying to fix the unfixable (e.g. game server is located on Mars resulting in high latency :slight_smile: ) . To get started, we first need to know what/where the problem is. Please do what I mentioned in my previous post again. If you can plug your gaming device directly to the modem, that would be better, otherwise please disable all SQM and traffic shaping on the router, I would recommend you factory reset OpenWrt and only configure the WAN (if it needs configuring) and keep all other devices disconnected (WiFi should be disabled by default after factory reset, so you'd just need to unplug Ethernet cables from the router), close/kill all foreground and background processes on your gaming device that could access the Internet.

After the test, ideally we should have a simple answer like

  • yes the problem happens even when the whole bandwidth is dedicated to the game, with no SQM or traffic shaping being applied

or

  • no the problem doesn't happen when the game is the only thing that's using the Internet, with no SQM or traffic shaping being applied

Update 2

That sounds like traffic shaping would help. If you plug your gaming device to the modem, does it go downhill over time too? When you get a chance, please do carry out the test suggested earlier.

Update 3

If you have this problem with all games, it would suggest that either there's something wrong with the ISP network (e.g. network is congested), or there's an issue with the signal to the modem (e.g. bad singal power level).
As you're getting problems even when XBOX One is the only device plugged to the modem, it's not something that SQM can fix.
As @Sparks suggested, it's best to log a fault with your ISP. If it's a signal problem, it's relatively easy to fix, in the UK, the ISP would arrange an engineer visit to adjust the power level etc at the customer's address, if it's network congestion, it could take time to expand the capacity.
You may want to check the bandwidth usage when the problem occurs to see if your game requires more than 5Mbps of upload bandwidth (which is unlikely). Factory reset OpenWrt and open http://openwrt.lan/cgi-bin/luci/admin/status/realtime/bandwidth , click on the tab that corresponds to your WAN and keep it open, take screenshots of the graph when the problem happens. I would keep SQM disabled until the problem is fixed otherwise it might interfere with diagnosis.

1 Like

even using standard Qos or normal firmware, the traffic shaping works here and there but the problems still exists. SQM makes it even worse as traffic shaping is not possible without some complicated scripts. so the answer is No, no traffic shaping really helps.

like i said i have used those methods mentioned in that thread to traffic shape and it doesn't solve the issues.

As someone said earlier it sounds like a localized capacity issue with your Isp in your area.

What kind of stability do you get if you intentionally set sqm Download bandwidth lower to say 20 or 40mbs , and your upload to 3mbs ?

Make no difference, I set it low as 5 down and 1 up and see no improvement at all. As mentioned earlier things will work great for a moment during fresh start on firmware setup and then continue to go downhill afterward untill the firmware is newly installed again or changes made to SQM back and forth.

Can you see any errors on your wan interface or the modem if you have access to it? If you see issues at even 5mbs there’s got to be some fundamental issue causing all this

the problem is even worse when modem is directly hooked to the xbox one, it was 100% dedicated toward it in this test.

how do i check for that?

Assuming it’s the Netgear cm1000, take a look at pages 13-16 in this pdf http://www.downloads.netgear.com/files/GDC/CM1000/CM1000_UM_EN.pdf

Edit - also, if you haven’t already be sure to log a fault with your isp. Keep pushing that your not getting the speeds your paying for until they investigate. The isp might even be able to tell if your modem is faulty potentially.

SQM and traffic profiling mainly help when the congestion is caused by your own traffic.

So if your twitch streaming at the same time as your gaming then SQM will help over normal traffic profiling as it prevents one traffic class starving the other.

Physically disconnect all devices, turn off SQM, and just game, make sure you graph the traffic on your upload to make sure your not exceeding your 5mbit, gaming should use like 1mbit average or even less.

You should also do that at different times during the day, early morning, afternoon, evening (peak) IF you find that performance differs between these times then more than likely its just your ISP with congestion, and no amount of end device profiling will help you.

quick update: i updated the firmware with Dave firmware and it seems to help, not sure if its fully working or not but this is what i have tried:

Layer cake
option iqdisc_opts 'docsis besteffort ingress nat'
option eqdisc_opts 'docsis ack-filter nat'

so far i have only added those two line and i could use your help on other steps mentioned in that link, i need help setting up "wash" and "Nat Table" with some simple configuration. so far this is working quite well on the COD games which i always had the issue with, example: being host and bullet not being registered has always been the issue in one of my thread or post that i posted, with this setup, its working now, but i think i could push for even better results with those other options with your help.