Question gbit connexion and SQM + DSCP

question gbit connection and qos

hello surely the question has been asked a thousand and one times

but i have now a 1000/800 fiber, a perfect bufferbloat, no qos sqm etc

I'm with an orange company

when i play without my belkin rt3200 router directly on my livebox 6, the game runs very well,

when I put SQM and prioritization rules, it creates a very small scale a slight shift invisible to the naked eye but I feel that I lose duels in game that normally I do not lose

my question is do you need a QOS SQM with fiber and DSCP

or should I just put software offloading with HWO or both

with just dscp DSCP rules or not?

I use the router because my fai doesn't allow me to have a VPN while OpenWrt does

thanks to all !

Translated with www.DeepL.com/Translator (free version)

You only ever "need" sqm/QoS when it improves things, otherwise you are clearly better off without it. "Your network, your rules".

I would try what works best, in my case I always ended up using SQM but occasionally with a steep throughput sacrifice (shaping to 49/25 on a nominal 100/40 link), I tested and for me that was preferable, your milage will vary :wink:

I would assume that your rt3200 might simply run out of CPU-cycles when under sufficient load, so I would try with setting SQM to say 100/100 Mbps just to see whether the issue is independent of CPU load. If you test this, please report your experience to this thread.

1 Like

thank you for answering me so quickly, actually

I know that due to the overload of the router and sqm it has a 2x1.3 ghz processor which is not enough to manage sqm 1000

I have set the speeds to 400/400 mbps and during the test it goes up to these speeds which is not the case if I set to 700/700 for example

Do you think I should reduce it even more as you suggested?

at the time of test carried out towards 4h of the morning local time at my place I go down even in jitter in the 0.2 0.3 0.2 ms

This does not look terrible (but browser speedtest are always a bit approximate).

However with the shaper set to 400/400 only getting out 320/307 indicates some issues somewhere.
For testing I really would go down all the way to 100/100 or of you must 150/150, so that SQM/cake should not be CPU-limited.

1 Like

ok I will try 150 150 and will keep you informed

but I think it's a shame to take advantage of a fiber optic and only be able to put 150 150 unless you put x86 devices

150 seems low if I look for example iptv + 7 8 machines at the same time connected switch playstation and peripherals computer tablet

the network is not likely to be quickly saturated?

Keep in mind this is intended to test a hypothesis primarily... but yes it is unfortunate that affordable all in one routers only manage 500+ Mbps by leaning heavily on hardware acceleration... ARM cores exist that also have no issue, but these end often up much more expensive than x86 solutions. That said if x86 solves your problem why not use it?

Well, try it out, but do not forget this test is intended to see whether gaming with SQM works better when it is less likely that SQM is not getting enough CPU cycles.
I am on a gross 116/37 link and typically traffic shape down to 105/36 Mbps which for a family of 5 seems to be sufficient so far but whether that would work as well for your network I can not tell.
(I could change from 116/37 VDSL2 to ~1050/53 via DOCSIS for 5EUR more, but I do not see how this additional expense would noticeably improve our home networking*)

*) Yes, bulk downloads would be quicker, but we really do not download that much, and if we do cake's internal-IP-isolation makes this pretty painless for all other users.

1 Like

hi i just checked sqm i had not put 400/400 but 350/350, is there a way to know if the cpu cycle is not stifled, like a htop command or something else thanks to you

Please try with 100/100, no need to negotiate with me here, this is only intended as a test, not as a permant setting.
Monitoring CPU usage is a bit tricky, als sqm/cake are not primarily CPU throughput hogs but require timely access to the CPU when timers expire. That said I use htop configured to show detailed information including sirq per CPU.

1 Like

Ok I'll test this and get back to you tomorrow I guess if I put 100/100 my values will be about 80/80 on the test if all goes well?

You can calculate the theoretical maximal thoughput if you fill in a few assumptions:

  1. IP-packet-size: including headers (typically <= 1500 B over the internet)
  2. gross shaper overhead: e.g. 44 bytes (which cake will account in top of 1)
  3. gross shaper rate configured for cake
    (mind you the above is only generally true if 3) is set <= the true bottleneck gross rate and 2) is >= the true applicable effective overhead, but for 100/100 on a 1000/800 link that will not matter anyway)

expected throughput = gross_shaper_rate * ((IP-packet-size) / (IP-packet-size + gross_shaper_overhead))
However that gives you the gross IP throughput, while e.g. on-line speedtests typicall report TCP-payload rates, to get to this you need to add a fourth parameter:
4) IP/TCP/HTTTP overhead: this really depends on your link and end point configuration, the best case is IPv4 (without options) + TCP (without options) ignoring HTTPS: 20+20 = 40 byte
expected throughput = gross_shaper_rate * ((IP-packet-size + IP_TCP_HTTTP_overhead) / (IP-packet-size + gross_shaper_overhead))
Note: this does not include any fancy additional encapsulation like PPPoE or ds-lite:
IPv4:
100 * ((1500 - 20 - 20) / (1500 + 44)) = 94.56 Mbps
IPv6:
100 * ((1500 - 40 - 20) / (1500 + 44)) = 93.26 Mbps

So 80/80 would be quite pessimal I would expect something closer to 93 or even 94 Mbps (or even more a number of speedtests are quite optimistic when aggregating throughput over multiple flows and end up reporting numbers slightly above the theoretical limits).

1 Like

hi seb i tried with 100 100 same i have the impression that in fiber optic compared to my vdsl2 of before, sqm and layer cake don't mix well

I am testing fq codel and simplest.qos

my player is much more fluid

can we add dscp with simplest.qos as we would with cake and layer cake and if so what should we apply as fields for example for the game i was using cs4 with cake and diffserv4 thank you

Translated with www.DeepL.com/Translator (free version)

Sorry, no, simplest.qos is without priority tiers, simple.qos however supports three priority tiers.

1 Like

ok if I put simple.qos

is there a graph that indicates the dscp to apply according to the function ?

during simple.Qos it tells me that I have to install iptables.nft and ip6tables.nft is this necessarily necessary?

I think simple.qos sorts:
EF, CS3, CS6, and AF42 into the high priority tier

SQM: ERROR: No ip6tables binary found, please install 'ip6tables' or 'ip6tables-nft' to use this script
SQM: simple.qos was started on wan successfully

ok i see

do you has a schema for be sure
i search but not found

Yepp, still on iptables, maybe just install ip6tables-nft?

1 Like

ok is right

thanks

SQM: simple.qos was started on wan successfully

to see the different priorities applied I guess the tc -s qdisc is different from cake diffserv4

fq_codel will not give detailed statistics like cake (and you might want to also look at tc -d qdsic in addition to tc -s qdisc)

1 Like
root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc noqueue 0: dev lan2 root refcnt 2
qdisc noqueue 0: dev lan3 root refcnt 2
qdisc noqueue 0: dev lan4 root refcnt 2
qdisc htb 1: dev wan root refcnt 2 r2q 10 default 0x12 direct_packets_stat 0 ver 3.17 direct_qlen 1000
 linklayer ethernet overhead 38
qdisc fq_codel 120: dev wan parent 1:12 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
qdisc fq_codel 130: dev wan parent 1:13 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
qdisc fq_codel 110: dev wan parent 1:11 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc htb 1: dev ifb4wan root refcnt 2 r2q 10 default 0x10 direct_packets_stat 0 ver 3.17 direct_qlen 32
 linklayer ethernet overhead 38
qdisc fq_codel 110: dev ifb4wan parent 1:10 limit 1001p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
root@OpenWrt:~# 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 fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 797109250 bytes 1514848 pkt (dropped 0, overlimits 0 requeues 5)
 backlog 0b 0p requeues 5
  maxpacket 5832 drop_overlimit 0 new_flow_count 2659 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc htb 1: dev wan root refcnt 2 r2q 10 default 0x12 direct_packets_stat 0 direct_qlen 1000
 Sent 1205060 bytes 4270 pkt (dropped 0, overlimits 287 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 120: dev wan parent 1:12 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
 Sent 1187729 bytes 4136 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 10312 drop_overlimit 0 new_flow_count 1587 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 130: dev wan parent 1:13 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 110: dev wan parent 1:11 limit 1001p flows 1024 quantum 300 target 5ms interval 100ms memory_limit 4Mb drop_batch 64
 Sent 17331 bytes 134 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 385 drop_overlimit 0 new_flow_count 128 ecn_mark 0
  new_flows_len 1 old_flows_len 20
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
 Sent 1032038 bytes 4136 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 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 wlan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc htb 1: dev ifb4wan root refcnt 2 r2q 10 default 0x10 direct_packets_stat 0 direct_qlen 32
 Sent 1244250 bytes 4136 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 110: dev ifb4wan parent 1:10 limit 1001p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 1244250 bytes 4136 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 4494 drop_overlimit 0 new_flow_count 1482 ecn_mark 0
  new_flows_len 1 old_flows_len 1
root@OpenWrt:~#

if I want to prioritize my console which is wired

I have to give it one of the dscp that you quoted above

but I would also like to prioritize the video conference dns ...

I now know nftables quite well and I think I can create an express chain.

example for cake for classification thank i know

 #From sched_cake.c:
    # /*  Further pruned list of traffic classes for four-class system:
    # *
    # *	    Latency Sensitive  (CS7, CS6, EF, VA, CS5, CS4)
    # *	    Streaming Media    (AF4x, AF3x, CS3, AF2x, TOS4, CS2, TOS1)
    # *	    Best Effort        (CS0, AF1x, TOS2, and those not specified)
    # *	    Background Traffic (CS1)
    # *
    # *		Total 4 traffic classes.
    # */
    
    #and for diffserv8:
    # /*	Pruned list of traffic classes for typical applications:
    # *
    # *		Network Control          (CS6, CS7)
    # *		Minimum Latency          (EF, VA, CS5, CS4)
    # *		Interactive Shell        (CS2, TOS1)
    # *		Low Latency Transactions (AF2x, TOS4)
    # *		Video Streaming          (AF4x, AF3x, CS3)
    # *		Bog Standard             (CS0 etc.)
    # *		High Throughput          (AF1x, TOS2)
    # *		Background Traffic       (CS1)
    # *
    # *		Total 8 traffic classes.

what do you sort this information please