Skip to content

Commit bf905d8

Browse files
README.md: added a couple of tuning tips
1 parent 8c2cd9b commit bf905d8

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Diff for: README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Currently only supports nssfq-codel and no traffic classification / marking due
2626

2727
If you're building OpenWRT yourself, you can add this script to your build with a feed:
2828

29-
echo "src-git sqm_scripts_nss https://github.com/rickkdotnet/sqm-scripts-nss.git >> feeds.conf
29+
echo "src-git sqm_scripts_nss https://github.com/rickkdotnet/sqm-scripts-nss.git" >> feeds.conf
3030
./scripts/feeds update
3131
./scripts/feeds install sqm-scripts-nss
3232

@@ -67,16 +67,30 @@ If it's working the output from tc should look something like this:
6767
maxpacket 1518 drop_overlimit 0 new_flow_count 5081 ecn_mark 0
6868
new_flows_len 0 old_flows_len 1
6969

70-
## Known bugs, limitations
70+
## Configuration notes
71+
72+
* DO try lowering the codel interval to the worst-case latency of the internet services you frequently use. This make codel more aggressive/quicker to react. I use "interval 50ms" in the advanced options string
73+
* DO try lowering the codel target a little if you're on a low latency connection, it could shave off another ms or so.
74+
* DO try adding "quantum 304" to the advanced options string for the lowest latency for games, voip etc. This essentially gives <304 bytes packets a 5x higher priority than 1518 packets to get dequeued.
75+
* DON'T set the queue size so small that you have taildropping (drop_overlimit counter in tc -s increasing), as this causes significant bufferbloat in the first few seconds of a speedtest (try pinging with a short interval while starting your test). Popular opinion is that 1000 packets should be enough for gigabit, but I needed more than 2000 packets on my 350 Mb/s nssifb interface. This might be a quirk of NSS/nssifb.
76+
* DO your own testing and draw up your own conclusions. First there's a lot of hear-say on the internet, and second your situation might very well be different.
77+
78+
FYI, as of March 2023, my tc config looks like this:
7179

80+
qdisc nsstbl 1: dev eth0 root refcnt 2 buffer/maxburst 4554b rate 37Mbit mtu 1518b accel_mode 0
81+
qdisc nssfq_codel 10: dev eth0 parent 1: target 3.5ms limit 304p interval 50ms flows 1024 quantum 304 set_default accel_mode 0```
82+
qdisc nsstbl 1: dev nssifb root refcnt 2 buffer/maxburst 45540b rate 360Mbit mtu 1518b accel_mode 0
83+
qdisc nssfq_codel 10: dev nssifb parent 1: target 3.5ms limit 2964p interval 50ms flows 1024 quantum 304 set_default accel_mode 0
84+
85+
## Known bugs, limitations
7286

7387
* Due to limitations of the driver:
7488
* Only fq-codel is supported as a queue discipline
7589
* No marking or traffic classification is currently possible, this also means that DSCP squashing does not work
7690
* ECN marking is not supported
7791
* The script does not does anything with the Link Layer Adaptation fields.
7892
* On kernel 5.10 the script does not remove the nssifb interface if it's stopped, because removing or even bringing down the interface frequently crashed my router. This could cause problems if you're switching to a script which set up regular ifb4ethX interfaces. You probably need to reboot if you want to switch to another SQM script.
79-
# On kernel 5.15 the above problem has been resolved, but in some cases (I think under high load), the router crashes on ip link up of nssifb, *especially* when called from hotplug. Because of this, there's workaround in the script that prevents the script from executing when it's called from hotplug.
93+
* On kernel 5.15 the above problem has been resolved, but in some cases (I think under high load), the router crashes on ip link up of nssifb, *especially* when called from hotplug. Because of this, there's workaround in the script that prevents the script from executing when it's called from hotplug.
8094

8195

8296

0 commit comments

Comments
 (0)