option overhead_type docsis

seems to get the job done

2 Likes

I respect what your saying and have read and tried those settings many times but after many hours of trial and error and only intending to make gaming performance better these work for me but I do mess with them sometimes the rtt i just added after watching logs the egress is always consistent between 25 and 30 on ingress side it is more inconsistent low 30 and high 60... if I ever set rtt on ingress is no bueno but egress seems to be working well for me...

5pm in my neighborhood docsis 3.1 test with Spectrum Business internet...

1 Like

But docsis will expand to overhead 18 mpu 64 so why not specify that directly? I guess a matter of personal preference.

Well, unless you have many small packets (like pure ACKs) on a link close to saturation you will not notice whether you have the correct mpu value or not. But foe docsis the answer is really simple.

Well, if that rtt value works better for you and you know the trade-off involved, that is your decision to make, I was just not sure you knew about the consequences; I guess I should have asked first.

2 Likes

six of one...

1 Like

I might be exceptionally daft today, but I have no clue what you are trying to convey here, care to expand?

1 Like

Probably a colloquial expression meaning a different way of saying the same thing, six of one, half a dozen of the other

4 Likes

Ah, thanks, I think I get it now. Sorry again, yesterday evening, after a children's birthday party I was clearly flattened and should have refrained from posting :wink:

1 Like
===== interface wan: active =====
egress status:
qdisc cake 8001: root refcnt 2 bandwidth 12Mbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms ptm overhead 22
 Sent 77080072 bytes 231576 pkt (dropped 45, overlimits 68545 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 755Kb of 4Mb
 capacity estimate: 12Mbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       51 /    1546
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh        750Kbit       12Mbit        6Mbit        3Mbit
  target         24.2ms          5ms          5ms       6.05ms
  interval        119ms        100ms        100ms        101ms
  pk_delay       64.9ms       1.94ms       1.55ms       1.25ms
  av_delay       57.3ms        196us        329us        391us
  sp_delay       20.8ms          9us         10us         11us
  backlog            0b           0b           0b           0b
  pkts            76864          882        24015       129860
  bytes        45555343       249324      6570689     24767032
  way_inds            0            0          241           20
  way_miss            8          323         1246          374
  way_cols            0            0            0            0
  drops              32            0            8            5
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            2            1            4
  bk_flows            0            0            0            0
  un_flows            0            0            0            0
  max_len         30534         2908         4542         1383
  quantum           300          366          300          300


ingress status:
qdisc cake 8002: root refcnt 2 bandwidth 48Mbit diffserv4 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100ms ptm overhead 22
 Sent 235217812 bytes 219356 pkt (dropped 8, overlimits 251173 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 231408b of 4Mb
 capacity estimate: 48Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       70 /    1546
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh          3Mbit       48Mbit       24Mbit       12Mbit
  target         6.05ms          5ms          5ms          5ms
  interval        101ms        100ms        100ms        100ms
  pk_delay         15us       6.95ms        188us        176us
  av_delay          3us       4.96ms         11us         14us
  sp_delay          2us          3us          3us          4us
  backlog            0b           0b           0b           0b
  pkts           129217        10792        28000        51355
  bytes       186608801     14150991     10147029     24323103
  way_inds            0            0          240           20
  way_miss            7          116          671          376
  way_cols            0            0            0            0
  drops               5            3            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            1            2            0            0
  bk_flows            0            0            0            0
  un_flows            0            0            0            0
  max_len          6056         6320         4613         2968
  quantum           300         1464          732          366


root@OpenWrt:~#

# SSH
tcp:22    network_services

# NTP
udp:123   network_services

# DNS
tcp:53    network_services
tcp:5353  network_services
udp:53    network_services
udp:5353  network_services


dns:*.zcure-blr-ps4-east-us.hardsuitlabs.com AF31
dns:*.registrar-servers.com AF31
dns:*.armygamestudio.com AF31
dns:*.cloudfront.net AF31
dns:*.akamaiedge.net AF31
dns:*.demonware.net AF31
dns:*.activision.com AF31
dns:*.akamaitechnologies.com AF31



# DNS over TLS (DoT)
tcp:853   multimedia_conferencing
udp:853   multimedia_conferencing

# HTTP/HTTPS/QUIC
tcp:80    browsing
tcp:443   browsing
udp:80    browsing
udp:443   browsing

# Microsoft (Download)
dns:*1drv*                 bulk
dns:*backblaze*            bulk
dns:*backblazeb2*          bulk
dns:*ms-acdc.office*       bulk
dns:*onedrive*             bulk
dns:*sharepoint*           bulk
dns:*update.microsoft*     bulk
dns:*windowsupdate*        bulk

# MEGA (Download)
dns:*mega*                 bulk

# Dropbox (Download)
dns:*dropboxusercontent*   bulk

# Google (Download)
dns:*drive.google*         bulk
dns:*googleusercontent*    bulk

# Steam (Download)
dns:*steamcontent*         bulk

# Epic Games (Download)
dns:*download.epicgames*   bulk
dns:*download2.epicgames*  bulk
dns:*download3.epicgames*  bulk
dns:*download4.epicgames*  bulk
dns:*epicgames-download1*  bulk

# YouTube
dns:*googlevideo*   besteffort

# Facebook
dns:*fbcdn*         besteffort

# Twitch
dns:*ttvnw*         besteffort

# TikTok
dns:*tiktok*        besteffort

# Netflix
dns:*nflxvideo*     besteffort

# Amazon Prime Video
dns:*aiv-cdn*       besteffort
dns:*aiv-delivery*  besteffort
dns:*pv-cdn*        besteffort

# Disney Plus
dns:*disney*        besteffort
dns:*dssott*        besteffort

# HBO
dns:*hbo*           besteffort
dns:*hbomaxcdn*     besteffort

# BitTorrent
tcp:6881-7000    bulk
tcp:51413        bulk
udp:6771         bulk
udp:6881-7000    bulk
udp:51413        bulk

# Usenet
tcp:119          bulk
tcp:563          bulk

# Live Streaming to YouTube Live, Twitch, Vimeo and LinkedIn Live
tcp:1935-1936    broadcast_video
tcp:2396         broadcast_video
tcp:2935         broadcast_video


# Zoom, Microsoft Teams, Skype and FaceTime (they use these same ports)
udp:3478-3497    multimedia_conferencing

# Zoom
dns:*zoom*       multimedia_conferencing
tcp:8801-8802    multimedia_conferencing
udp:8801-8810    multimedia_conferencing

# Skype
dns:*skype*      multimedia_conferencing

# FaceTime
udp:16384-16387  multimedia_conferencing
udp:16393-16402  multimedia_conferencing

# GoToMeeting
udp:1853         multimedia_conferencing
udp:8200         multimedia_conferencing

# Webex Meeting
tcp:5004         multimedia_conferencing
udp:9000         multimedia_conferencing

# Jitsi Meet
tcp:5349         multimedia_conferencing
udp:10000        multimedia_conferencing

# Google Meet
udp:19302-19309  multimedia_conferencing

# TeamViewer
tcp:5938         multimedia_conferencing
udp:5938         multimedia_conferencing

# Voice over Internet Protocol (VoIP)
tcp:5060-5061    telephony
udp:5060-5061    telephony

# Voice over WiFi or WiFi Calling (VoWiFi)
udp:500          telephony
udp:4500         telephony

irq balance enabled and packet steering enabled i prefer finally with packet steering

egress is writed nowash but wash the packets

not need add port of gaming because the game inferior to 1270 packets is classed CS4 like every games

hi everybody what do you think of that only less 50 packet drop :wink:

my games is exceptionnal

root@OpenWrt:~# qosify-status
===== interface wan: active =====
egress status:
qdisc cake 8013: root refcnt 2 bandwidth 12Mbit diffserv4 dual-srchost nat nowas                                           h no-ack-filter split-gso rtt 100ms ptm overhead 22
 Sent 117491470 bytes 654940 pkt (dropped 13, overlimits 44706 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 792960b of 4Mb
 capacity estimate: 12Mbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       51 /    1546
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh        750Kbit       12Mbit        6Mbit        3Mbit
  target         24.2ms          5ms          5ms       6.05ms
  interval        119ms        100ms        100ms        101ms
  pk_delay        735us       4.71ms        1.4ms        711us
  av_delay         16us       1.15ms        111us        102us
  sp_delay          2us         54us          2us         10us
  backlog            0b           0b           0b           0b
  pkts            34488        10669        50456       559340
  bytes         2734625      8540850      6765304     99466855
  way_inds            0           23         1798         2144
  way_miss           28          939         2970         1805
  way_cols            0            0            0            0
  drops               0            8            0            5
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            1            1            2            5
  bk_flows            0            0            0            0
  un_flows            0            0            0            0
  max_len          3028         6056         3472         4542
  quantum           300          366          300          300


ingress status:
qdisc cake 8014: root refcnt 2 bandwidth 48Mbit diffserv4 dual-dsthost nat nowas                                           h ingress no-ack-filter split-gso rtt 100ms ptm overhead 22
 Sent 283167198 bytes 367063 pkt (dropped 40, overlimits 216580 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 309920b of 4Mb
 capacity estimate: 48Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       70 /    1546
 average network hdr offset:           14

                   Bulk  Best Effort        Video        Voice
  thresh          3Mbit       48Mbit       24Mbit       12Mbit
  target         6.05ms          5ms          5ms          5ms
  interval        101ms        100ms        100ms        100ms
  pk_delay       2.07ms        825us        146us        509us
  av_delay       1.39ms        287us         12us         64us
  sp_delay         10us          3us          3us          3us
  backlog            0b           0b           0b           0b
  pkts            82539        31924        28714       223926
  bytes       121945102     39866384      6168373    115245163
  way_inds            0          407          285          112
  way_miss           28          759         1462          938
  way_cols            0            0            0            0
  drops              21           19            0            0
  marks               0            0            0            0
  ack_drop            0            0            0            0
  sp_flows            0            1            1            0
  bk_flows            0            0            0            0
  un_flows            0            0            0            0
  max_len          6056         6056         4542         6056
  quantum           300         1464          732          366


root@OpenWrt:~#

@moeller0

2 Likes

Maybe it's possible to adapt some logic from the intel adaptive interrupt moderation code to classify packets?

Link to igb.c
Line: 5647+

I'm trying to hard cap cakes autorate feature.
Something like this should work?

--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -245,6 +245,8 @@ struct cake_sched_data {
 	u64		avg_packet_interval;
 	u64		avg_window_bytes;
 	u64		avg_peak_bandwidth;
+	u64		avg_peak_bandwidth_min;
+	u64		avg_peak_bandwidth_max;
 	ktime_t		last_reconfig_time;
 
 	/* packet length stats */
@@ -1842,6 +1844,15 @@ static s32 cake_enqueue(struct sk_buff *
 					ktime_add_ms(q->last_reconfig_time,
 						     250))) {
 				q->rate_bps = (q->avg_peak_bandwidth * 15) >> 4;
+
+				if (q->rate_bps >= q->avg_peak_bandwidth_max) {
+					q->rate_bps = q->avg_peak_bandwidth_max;
+				}
+
+				if (q->rate_bps <= q->avg_peak_bandwidth_min) {
+					q->rate_bps = q->avg_peak_bandwidth_min;
+				}
+
 				cake_reconfigure(sch);
 			}
 		}
@@ -2763,6 +2774,8 @@ static int cake_init(struct Qdisc *sch,
 
 	cake_reconfigure(sch);
 	q->avg_peak_bandwidth = q->rate_bps;
+	q->avg_peak_bandwidth_max = q->rate_bps;
+	q->avg_peak_bandwidth_min = (q->avg_peak_bandwidth * 2) / 5;
 	q->min_netlen = ~0;
 	q->min_adjlen = ~0;
 	return 0;

To cap the minimum autorate bandwidth to 40%/100% of the configured link speed?

To put tranfsers with around ~10Mbit/s and full size 1500 packets into the bulk class.
850+ packets/s as threshold should be fine?

Hello,

Already, thank you for this great script.

I just switched from Pfsense to OpenWRT (rasp 3B+) in order to solve my bufferbloat problem with CAKE.
Under pfsense, impossible to achieve anything.
I do not yet have a fiber link and I am currently using a fairly slow ADSL link (850kpbs in upload and 15mbps in download).
With a basic configuration under Luci, I already manage to obtain correct results, but, as soon as we are several to use the link, it is the drama.
So I want to try this script to prioritize some streams.

Is it possible to prioritize local machines via IP? for example, my pro machine which must have priority over everything else, whatever the flow?

For the installation, being new to OpenWrt, I have to:
1- disable the SQM in Luci
2 - deactivate my personal rules (traffic rules with DSCP marking)
3 - Create the files /etc/config/qosify and /etc/qosify/00-defaults.conf
4 - Create the file to launch at first boot with the commands provided? I didn't quite understand this part... Either I copy/paste the commands in ssh, or I create a script? but how, where?

Thank you for your answers and sorry for my broken English... :smiley:

my actual rules : (lower priority of webdav sync to my Nas & higher priority to my Pro computer)

1 Like

Hi this files create only, with packages qosify you are french ?

2 Likes

Yes, I'm French ! I unmasked :smiley:

Thks for your help. I've just add to install qosify packages et then, edit files with my up/down and other custom info ?

Hmm, sounds like a decent experiment, ideally one could cobfigure both the minimal and maximal limits in which autorate operates via tc, but for initial testing 40/100 min/max sounds like a plan. Please let us know whether that actually helps.

Is there a way to add ip address range like:

49.44.124.0-49.44.125.255              multimedia_streaming
Or
49.44.124.110/23             multimedia_streaming
2 Likes

If so would be great!!!

3 Likes

hi everybody i would like share new settings who seems better after one week for me so i'm on vdsl2 for the moment and my fiber is in 3 month

router e8450 linksys

my configuration is like that

i priviligy AF31 who are streaming au lieu de AF41 my games seems better because i use never multimedia conferencing
/etc/config/qosify

config defaults
	list defaults /etc/qosify/*.conf
	option dscp_icmp +besteffort
	option dscp_default_tcp unmarked_traffic
	option dscp_default_udp unmarked_traffic

config class unmarked_traffic
	option ingress CS1
	option egress CS1
	option prio_max_avg_pkt_len 1270
	option dscp_prio CS4
	option bulk_trigger_pps 600
	option bulk_trigger_timeout 10
	option dscp_bulk CS1

config class browsing
	option ingress CS0
	option egress CS0
	option prio_max_avg_pkt_len 575
	option dscp_prio AF31
	option bulk_trigger_pps 1000
	option bulk_trigger_timeout 10
	option dscp_bulk CS1

config class bulk
	option ingress CS1
	option egress CS1

config class besteffort
	option ingress CS0
	option egress CS0

config class network_services
	option ingress CS2
	option egress CS2

config class broadcast_video
	option ingress CS3
	option egress CS3

config class gaming
	option ingress CS4
	option egress CS4

config class multimedia_conferencing
	option ingress AF41
	option egress AF41

config class streaming
	option ingress AF32
	option egress AF32
	option prio_max_avg_pkt_len 575
	option dscp_prio AF31

config class telephony
	option ingress EF
	option egress EF

config interface wan
	option name wan
	option disabled 0
	option bandwidth_up 12mbit
	option bandwidth_down 48mbit
	option overhead_type bridged-ptm
	# defaults:
	option ingress 1
	option egress 1
	option mode diffserv4
	option nat 1
	option host_isolate 1
	option autorate_ingress 0
	option ingress_options ""
	option egress_options "wash"
	option options ""

config device wandev
	option disabled 1
	option name wan
	option bandwidth 100mbit

and /etc/qosify/00-defaut conf

# HTTP/HTTPS/QUIC
tcp:80    browsing
tcp:443   browsing
udp:80    browsing
udp:443   browsing

dns:*.cloudfront.net* 			streaming
dns:*.akamaiedge.net* 			streaming 
dns:*.demonware.net* 			gaming
dns:*.choopa.net* 			gaming
dns:*.activision.com* 			streaming
dns:*.vultrusercontent.com* 		gaming
dns:*.me-south-1.compute.amazonaws.com* gaming

# Microsoft (Download)
dns:*1drv*                 bulk
dns:*backblaze*            bulk
dns:*backblazeb2*          bulk
dns:*ms-acdc.office*       bulk
dns:*onedrive*             bulk
dns:*sharepoint*           bulk
dns:*update.microsoft*     bulk
dns:*windowsupdate*        bulk

# MEGA (Download)
dns:*mega*                 bulk

# Dropbox (Download)
dns:*dropboxusercontent*   bulk

# Google (Download)
dns:*drive.google*         bulk
dns:*googleusercontent*    bulk

# Steam (Download)
dns:*steamcontent*         bulk

# Epic Games (Download)
dns:*download.epicgames*   bulk
dns:*download2.epicgames*  bulk
dns:*download3.epicgames*  bulk
dns:*download4.epicgames*  bulk
dns:*epicgames-download1*  bulk

# BitTorrent
tcp:6881-7000    bulk
tcp:51413        bulk
udp:6771         bulk
udp:6881-7000    bulk
udp:51413        bulk

# Usenet
tcp:119          bulk
tcp:563          bulk


# YouTube
dns:*googlevideo*   besteffort

# Facebook
dns:*fbcdn*         besteffort

# Twitch
dns:*ttvnw*         besteffort

# TikTok
dns:*tiktok*        besteffort

# Netflix
dns:*nflxvideo*     besteffort

# Amazon Prime Video
dns:*aiv-cdn*       besteffort
dns:*aiv-delivery*  besteffort
dns:*pv-cdn*        besteffort

# Disney Plus
dns:*disney*        besteffort
dns:*dssott*        besteffort

# HBO
dns:*hbo*           besteffort
dns:*hbomaxcdn*     besteffort




# SSH
tcp:22    network_services

# NTP
udp:123   network_services

# DNS
tcp:53    network_services
tcp:5353  network_services
udp:53    network_services
udp:5353  network_services




## 





# Live Streaming to YouTube Live, Twitch, Vimeo and LinkedIn Live
tcp:1935-1936    broadcast_video
tcp:2396         broadcast_video
tcp:2935         broadcast_video



# DNS over TLS (DoT)
tcp:853   multimedia_conferencing
udp:853   multimedia_conferencing

# Zoom, Microsoft Teams, Skype and FaceTime (they use these same ports)
udp:3478-3497    multimedia_conferencing

# Zoom
dns:*zoom*       multimedia_conferencing
tcp:8801-8802    multimedia_conferencing
udp:8801-8810    multimedia_conferencing

# Skype
dns:*skype*      multimedia_conferencing

# FaceTime
udp:16384-16387  multimedia_conferencing
udp:16393-16402  multimedia_conferencing

# GoToMeeting
udp:1853         multimedia_conferencing
udp:8200         multimedia_conferencing

# Webex Meeting
tcp:5004         multimedia_conferencing
udp:9000         multimedia_conferencing

# Jitsi Meet
tcp:5349         multimedia_conferencing
udp:10000        multimedia_conferencing

# Google Meet
udp:19302-19309  multimedia_conferencing

# TeamViewer
tcp:5938         multimedia_conferencing
udp:5938         multimedia_conferencing

# Voice over Internet Protocol (VoIP)
tcp:5060-5061    telephony
udp:5060-5061    telephony

# Voice over WiFi or WiFi Calling (VoWiFi)
udp:500          telephony
udp:4500         telephony






i play majoritairement with fps and my hit marker with this settings so smoothy :slight_smile:

3 Likes

If you never use multimedia_conferencing...why you still have this class...just delete it.

no because sometimes i'm on teamviewer and anydesk but very rarely so i prefer keep this class if never :wink:

i said never compared to gaming

So the difference is only this?

config class multimedia_conferencing
	option ingress AF41
	option egress AF41

and that

config class streaming
	option ingress AF32
	option egress AF32
	option prio_max_avg_pkt_len 575
	option dscp_prio AF31

yes

2 Likes