Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
From: Sebastian Moeller <moeller0@gmx.de>
To: leetminiwheat <LeetMiniWheat@gmail.com>
Cc: cerowrt-devel <cerowrt-devel@lists.bufferbloat.net>
Subject: Re: [Cerowrt-devel] squash/ignore DSCP and mangle table questions
Date: Wed, 22 Apr 2015 11:19:08 +0200	[thread overview]
Message-ID: <70F5A05D-79AF-40BA-BCA3-3A0599745614@gmx.de> (raw)
In-Reply-To: <CAGHZhqGMt0+dg4B4THd6P=FcWdo9j5vG9jhXn_AUozr_uw2f2Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]

Hi leetminiwheat,


On Apr 22, 2015, at 02:28 , leetminiwheat <LeetMiniWheat@gmail.com> wrote:

> Correcton on P.S. section: 3 and 5t not 4 and 5t.

	This is confusing me ;)

> 
> also regarding my tc qdisc output: i clearly need to reboot or
> something to fix the duplicate IFBs after testing a bunch of QoS.

	You could also try to run /usb/lib/sqm/stop.sh $NAME_OF_THE_INTERFACE (so not ifb5gw00 but rather gw00) that hopefully cleans up the left, let me know how that works...

> I currently have to hand-mix the latest ones with Cero since I don't
> have an updated luci-sqm
> 

Please find attached the most recent sqm-scripts and the most recent luci-sqm (the relevant script) please copy sqm-cbi.lua to:
/usr/lib/lua/luci/model/cbi/sqm.lua and you should be as up to date as you can be. Make sure to also move all the files from the attached sqm-scripts folder to the matching folders on your cerowrt router; that should hopefully fix the leftover IFB issue to some degree (we currently do not clean up when an interface goes away, only when the interface gets upped again)


Best Regards
	Sebastian

[-- Attachment #2: sqm-cbi.lua --]
[-- Type: application/octet-stream, Size: 8144 bytes --]

--[[
LuCI - Lua Configuration Interface

Copyright 2014 Steven Barth <steven@midlink.org>
Copyright 2014 Dave Taht <dave.taht@bufferbloat.net>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id$
]]--

local wa = require "luci.tools.webadmin"
local fs = require "nixio.fs"
local net = require "luci.model.network".init()
local sys = require "luci.sys"
--local ifaces = net:get_interfaces()
local ifaces = sys.net:devices()
local path = "/usr/lib/sqm"

m = Map("sqm", translate("Smart Queue Management"),
	translate("With <abbr title=\"Smart Queue Management\">SQM</abbr> you " ..
		"can enable traffic shaping, better mixing (Fair Queueing)," ..
		" active queue length management (AQM) " ..
		" and prioritisation on one " ..
		"network interface."))

s = m:section(TypedSection, "queue", translate("Queues"))
s:tab("tab_basic", translate("Basic Settings"))
s:tab("tab_qdisc", translate("Queue Discipline"))
s:tab("tab_linklayer", translate("Link Layer Adaptation"))
s.addremove = true -- set to true to allow adding SQM instances in the GUI
s.anonymous = true

-- BASIC
e = s:taboption("tab_basic", Flag, "enabled", translate("Enable"))
e.rmempty = false

n = s:taboption("tab_basic", ListValue, "interface", translate("Interface name"))
-- sm lifted from luci-app-wol, the original implementation failed to show pppoe-ge00 type interface names
for _, iface in ipairs(ifaces) do
--     if iface:is_up() then
--	n:value(iface:name())
--     end
	if iface ~= "lo" then 
		n:value(iface) 
	end
end
n.rmempty = false


dl = s:taboption("tab_basic", Value, "download", translate("Download speed (kbit/s) (ingress):"))
dl.datatype = "and(uinteger,min(0))"
dl.rmempty = false

ul = s:taboption("tab_basic", Value, "upload", translate("Upload speed (kbit/s) (egress):"))
ul.datatype = "and(uinteger,min(0))"
ul.rmempty = false

-- QDISC

c = s:taboption("tab_qdisc", ListValue, "qdisc", translate("Queueing discipline"))
c:value("fq_codel", "fq_codel ("..translate("default")..")")
c:value("efq_codel")
c:value("nfq_codel")
c:value("sfq")
c:value("codel")
c:value("ns2_codel")
c:value("pie")
c:value("sfq")
c.default = "fq_codel"
c.rmempty = false

local qos_desc = ""
sc = s:taboption("tab_qdisc", ListValue, "script", translate("Queue setup script"))
for file in fs.dir(path) do
  if string.find(file, ".qos$") then
    sc:value(file)
  end
  if string.find(file, ".qos.help$") then
    fh = io.open(path .. "/" .. file, "r")
    qos_desc = qos_desc .. "<p><b>" .. file:gsub(".help$", "") .. ":</b><br />" .. fh:read("*a") .. "</p>"
  end
end
sc.default = "simple.qos"
sc.rmempty = false
sc.description = qos_desc

ad = s:taboption("tab_qdisc", Flag, "qdisc_advanced", translate("Show and Use Advanced Configuration"))
ad.default = false
ad.rmempty = true

squash_dscp  = s:taboption("tab_qdisc", ListValue, "squash_dscp", translate("Squash DSCP on inbound packets (ingress):"))
squash_dscp:value("1", "SQUASH")
squash_dscp:value("0", "DO NOT SQUASH")
squash_dscp.default = "1"
squash_dscp.rmempty = true
squash_dscp:depends("qdisc_advanced", "1")

squash_ingress = s:taboption("tab_qdisc", ListValue, "squash_ingress", translate("Ignore DSCP on ingress:"))
squash_ingress:value("1", "Ignore")
squash_ingress:value("0", "Allow")
squash_ingress.default = "1"
squash_ingress.rmempty = true
squash_ingress:depends("qdisc_advanced", "1")

iecn = s:taboption("tab_qdisc", ListValue, "ingress_ecn", translate("Explicit congestion notification (ECN) status on inbound packets (ingress):"))
iecn:value("ECN", "ECN ("..translate("default")..")")
iecn:value("NOECN")
iecn.default = "ECN"
iecn.rmempty = true
iecn:depends("qdisc_advanced", "1")

eecn = s:taboption("tab_qdisc", ListValue, "egress_ecn", translate("Explicit congestion notification (ECN) status on outbound packets (egress)."))
eecn:value("NOECN", "NOECN ("..translate("default")..")")
eecn:value("ECN")
eecn.default = "NOECN"
eecn.rmempty = true
eecn:depends("qdisc_advanced", "1")

ad2 = s:taboption("tab_qdisc", Flag, "qdisc_really_really_advanced", translate("Show and Use Dangerous Configuration"))
ad2.default = false
ad2.rmempty = true
ad2:depends("qdisc_advanced", "1")

ilim = s:taboption("tab_qdisc", Value, "ilimit", translate("Hard limit on ingress queues; leave empty for default."))
-- ilim.default = 1000
ilim.isnumber = true
ilim.datatype = "and(uinteger,min(0))"
ilim.rmempty = true
ilim:depends("qdisc_really_really_advanced", "1")

elim = s:taboption("tab_qdisc", Value, "elimit", translate("Hard limit on egress queues; leave empty for default."))
-- elim.default = 1000
elim.datatype = "and(uinteger,min(0))"
elim.rmempty = true
elim:depends("qdisc_really_really_advanced", "1")


itarg = s:taboption("tab_qdisc", Value, "itarget", translate("Latency target for ingress, e.g 5ms [units: s, ms, or  us]; leave empty for automatic selection, put in the word default for the qdisc's default."))
itarg.datatype = "string"
itarg.rmempty = true
itarg:depends("qdisc_really_really_advanced", "1")

etarg = s:taboption("tab_qdisc", Value, "etarget", translate("Latency target for egress, e.g. 5ms [units: s, ms, or  us]; leave empty for automatic selection, put in the word default for the qdisc's default."))
etarg.datatype = "string"
etarg.rmempty = true
etarg:depends("qdisc_really_really_advanced", "1")



iqdisc_opts = s:taboption("tab_qdisc", Value, "iqdisc_opts", translate("Advanced option string to pass to the ingress queueing disciplines; no error checking, use very carefully."))
iqdisc_opts.rmempty = true
iqdisc_opts:depends("qdisc_really_really_advanced", "1")

eqdisc_opts = s:taboption("tab_qdisc", Value, "eqdisc_opts", translate("Advanced option string to pass to the egress queueing disciplines; no error checking, use very carefully."))
eqdisc_opts.rmempty = true
eqdisc_opts:depends("qdisc_really_really_advanced", "1")

-- LINKLAYER
ll = s:taboption("tab_linklayer", ListValue, "linklayer", translate("Which link layer to account for:"))
ll:value("none", "none ("..translate("default")..")")
ll:value("ethernet", "Ethernet with overhead: select for e.g. VDSL2.")
ll:value("atm", "ATM: select for e.g. ADSL1, ADSL2, ADSL2+.")
-- ll:value("adsl")	-- reduce the options
ll.default = "none"

po = s:taboption("tab_linklayer", Value, "overhead", translate("Per Packet Overhead (byte):"))
po.datatype = "and(integer,min(-1500))"
po.default = 0
po.isnumber = true
po.rmempty = true
po:depends("linklayer", "ethernet")
-- po:depends("linklayer", "adsl")
po:depends("linklayer", "atm")


adll = s:taboption("tab_linklayer", Flag, "linklayer_advanced", translate("Show Advanced Linklayer Options, (only needed if MTU > 1500)"))
adll.rmempty = true
adll:depends("linklayer", "ethernet")
-- adll:depends("linklayer", "adsl")
adll:depends("linklayer", "atm")

smtu = s:taboption("tab_linklayer", Value, "tcMTU", translate("Maximal Size for size and rate calculations, tcMTU (byte); needs to be >= interface MTU + overhead:"))
smtu.datatype = "and(uinteger,min(0))"
smtu.default = 2047
smtu.isnumber = true
smtu.rmempty = true
smtu:depends("linklayer_advanced", "1")

stsize = s:taboption("tab_linklayer", Value, "tcTSIZE", translate("Number of entries in size/rate tables, TSIZE; for ATM choose TSIZE = (tcMTU + 1) / 16:"))
stsize.datatype = "and(uinteger,min(0))"
stsize.default = 128
stsize.isnumber = true
stsize.rmempty = true
stsize:depends("linklayer_advanced", "1")

smpu = s:taboption("tab_linklayer", Value, "tcMPU", translate("Minimal packet size, MPU (byte); needs to be > 0 for ethernet size tables:"))
smpu.datatype = "and(uinteger,min(0))"
smpu.default = 0
smpu.isnumber = true
smpu.rmempty = true
smpu:depends("linklayer_advanced", "1")

lla = s:taboption("tab_linklayer", ListValue, "linklayer_adaptation_mechanism", translate("Which linklayer adaptation mechanism to use; for testing only"))
lla:value("htb_private")
lla:value("tc_stab", "tc_stab ("..translate("default")..")")
lla.default = "tc_stab"
lla.rmempty = true
lla:depends("linklayer_advanced", "1")

-- PRORITIES?

return m

[-- Attachment #3: sqm-scripts.zip --]
[-- Type: application/zip, Size: 27965 bytes --]

[-- Attachment #4: Type: text/plain, Size: 7617 bytes --]

> 
> On Tue, Apr 21, 2015 at 8:19 PM, leetminiwheat <LeetMiniWheat@gmail.com> wrote:
>> Sorry this is getting a bit off-topic here.
>> 
>>> On Wed, Apr 15, 2015 at 5:05 AM, Sebastian Moeller <moeller0@gmx.de> wrote:
>>> 
>>>> On Apr 15, 2015, at 03:35 , leetminiwheat <LeetMiniWheat@gmail.com> wrote:
>>> 
>>>> I assume tweaking ring parameters from default RX:128 and TX:32
>>>> doesn't matter anymore thenr?
>>> 
>>>        As far as I know we leave that alone, see: http://www.bufferbloat.net/projects/bloat/wiki/Linux_Tips:
>>> “Set the size of the ring buffer for the network interface
>>> 
>>> NOTE: THIS HACK IS NO LONGER NEEDED on many ethernet drivers in Linux 3.3, which has Byte Queue Limits instead, which does a far better job."
>>> 
>> I noticed Dave mentioned on a mailing list that changing tx ring still
>> does have some benefit, and his notes in debloat script suggest BQL
>> doesn't always work as implied.
>>> 
>>>> 
>>>>> [...]
>>>>> If you have time and netperf-wrapper it would be good to convince yourself and us again, that txqueuelen really does not matter for BQL’d interfaces by running RRUL tests with and without your modifications….
>> 
>> Thanks, after extensive RRUL testing.... I've come to the same
>> conclusion Dave did, that changing tx perameters just isn't worth it
>> and causes instability. I noticed on 120s tests my WAN connection
>> would reset with ath9k: pll_reg and latencies would skyrocket
>> thereafter. I don't quite have a producible error, but it seemed like
>> associating/diassociating wireless clients might be related to it
>> (with Revert "debloat: stop changing wifi qlen") but I was also
>> changing txring on ethernet for testing at 4, 8, 16, etc.
>> 
>> Also, I tested some custom HFSC+fq_codel qos scripts here:
>> https://github.com/zcecc22/qos-nxt
>> He defaults to 90% (meaning you have to adjust your b/w limits), and
>> the 2-bin codel doesn't seem to work very well. Seemed like an
>> interesting compromise between simple and simplest, but the results
>> were pretty terrible. I'd like to test CAKE more, but it seems
>> 3.10.50-1 doesn't have the required kernel support.
>> 
>> Recent changes in barrier breaker to txring seem pretty dumb, they
>> default to 256 txring now I believe, ticket here was closed with
>> "worksforme" https://dev.openwrt.org/ticket/13072 so I'm reluctant to
>> upgrade, plus I don't fully understand the extent of which Dave's
>> kernel hacks impact things. Closer inspection/comparison/diffs are
>> needed if I'm to upgrade and integrate Cero's tweaks.
>> 
>> Oddly enough, simplest.qos on WAN gives me better throughput/latency
>> at times (likely due to less overhead), but other times simple.qos is
>> doing what it should and giving more throughput and lower latency to
>> higher priority traffic. I seem to get better RRUL tests with LIMIT=
>> blank, and ILIMIT/ELIMIT set to auto which results in this:
>> 
>> qdisc fq_codel a: dev se00 root refcnt 2 limit 1514p flows 1024
>> quantum 1514 target 5.0ms interval 100.0ms ecn
>> qdisc htb 1: dev ge00 root refcnt 2 r2q 10 default 12
>> direct_packets_stat 0 direct_qlen 1000
>> qdisc fq_codel 110: dev ge00 parent 1:11 limit 1024p flows 1024
>> quantum 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 120: dev ge00 parent 1:12 limit 1024p flows 1024
>> quantum 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 130: dev ge00 parent 1:13 limit 1024p flows 1024
>> quantum 300 target 5.0ms interval 100.0ms ecn
>> qdisc ingress ffff: dev ge00 parent ffff:fff1 ----------------
>> qdisc mq 1: dev sw10 root
>> qdisc fq_codel 10: dev sw10 parent 1:1 limit 800p flows 1024 quantum
>> 500 target 10.0ms interval 100.0ms
>> qdisc fq_codel 20: dev sw10 parent 1:2 limit 800p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 30: dev sw10 parent 1:3 limit 1000p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 40: dev sw10 parent 1:4 limit 1000p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms
>> qdisc mq 1: dev sw00 root
>> qdisc fq_codel 10: dev sw00 parent 1:1 limit 800p flows 1024 quantum
>> 500 target 10.0ms interval 100.0ms
>> qdisc fq_codel 20: dev sw00 parent 1:2 limit 800p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 30: dev sw00 parent 1:3 limit 1000p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 40: dev sw00 parent 1:4 limit 1000p flows 1024 quantum
>> 300 target 5.0ms interval 100.0ms
>> qdisc htb 1: dev ifb4ge00 root refcnt 2 r2q 10 default 12
>> direct_packets_stat 0 direct_qlen 32
>> qdisc fq_codel 110: dev ifb4ge00 parent 1:11 limit 1024p flows 1024
>> quantum 500 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 120: dev ifb4ge00 parent 1:12 limit 1024p flows 1024
>> quantum 1500 target 5.0ms interval 100.0ms ecn
>> qdisc fq_codel 130: dev ifb4ge00 parent 1:13 limit 1024p flows 1024
>> quantum 300 target 5.0ms interval 100.0ms ecn
>> qdisc htb 1: dev ifb4gw00 root refcnt 2 r2q 10 default 12
>> direct_packets_stat 0 direct_qlen 32
>> qdisc fq_codel 110: dev ifb4gw00 parent 1:11 limit 1024p flows 1024
>> quantum 500 target 10.3ms interval 105.3ms ecn
>> qdisc fq_codel 120: dev ifb4gw00 parent 1:12 limit 1024p flows 1024
>> quantum 1500 target 10.3ms interval 105.3ms ecn
>> qdisc fq_codel 130: dev ifb4gw00 parent 1:13 limit 1024p flows 1024
>> quantum 300 target 10.3ms interval 105.3ms ecn
>> 
>> image of RRUL 45s graph here with simple.qos, no tx changes, auto
>> LIMIT on FiOS 32/25 (30Mb/22.5Mb QoS): https://screencloud.net/v/tVV0
>> - looks pretty good to me, but I should set up more MARK or DSCP
>> classifications for my important/unimportant traffic. MARK is probably
>> a better idea since it won't unnecessarily mis-flag outgoing traffic.
>> I assume QOS_MARK_ge00 sees marks from other interfaces too.
>> 
>> I'm still unsure whether to apply simple/simplest to my secure
>> wireless or leave it alone, Dave's debloat script seems to have
>> wireless-specific optimizations when left on auto, does simple.qos
>> handle VO/VI/BE/BK queues as efficiently? I never top out my wireless
>> since it's used only for mobile phones anyways and I run HT20 which
>> seems to be more reliable/less latency. however my guest wifi I do
>> need to limit and segregate via firewall so I have it enabled.
>> 
>> P.S. I learned the hard way NEVER to enable port 4 on the switch,
>> results in broken ethernet. port4 is unused and likely internally
>> reserved for unknown purposes. I'm still trying to figure out how it
>> maps an interface to an actual port, since I'd like to assign a single
>> switch switch port to it's own subnet for my FiOS router instead of
>> having to use a secondary router to clone the ge00 interface on the
>> backend router to forward FiOS ports to the verizon/FiOS MOCA bridge
>> router in order for alerts to display on set-top boxes such as caller
>> ID. There has to be a way of doing this without needing 3 routers...
>> My current thoughts are to remove the port (port3 in this case) from
>> the switch and make a new switch config with just 4 and 5t and somehow
>> make a new interface on that for the FiOS router, but assigning the
>> same ip address as the default gateway/route from ge00 on that port
>> might confuse routing. More information on their rather complicated
>> and seemingly unnecessary config with a backend router is located
>> here: http://www.dslreports.com/faq/verizonfios/3.0_Networking#16710


  reply	other threads:[~2015-04-22  9:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13  6:37 leetminiwheat
2015-04-13  7:36 ` Sebastian Moeller
2015-04-13 10:27   ` leetminiwheat
2015-04-13 10:36     ` leetminiwheat
     [not found]     ` <ECC39EB0-9C54-4C17-9285-2484AD08ACF3@gmx.de>
2015-04-13 13:43       ` leetminiwheat
2015-04-13 14:16         ` leetminiwheat
2015-04-13 14:23           ` Sebastian Moeller
2015-04-13 16:48             ` leetminiwheat
2015-04-13 21:39               ` Sebastian Moeller
2015-04-15  1:35                 ` leetminiwheat
2015-04-15  9:05                   ` Sebastian Moeller
2015-04-22  0:19                     ` leetminiwheat
2015-04-22  0:28                       ` leetminiwheat
2015-04-22  9:19                         ` Sebastian Moeller [this message]
2015-04-22  9:03                       ` Sebastian Moeller
2015-04-22 10:17                         ` leetminiwheat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70F5A05D-79AF-40BA-BCA3-3A0599745614@gmx.de \
    --to=moeller0@gmx.de \
    --cc=LeetMiniWheat@gmail.com \
    --cc=cerowrt-devel@lists.bufferbloat.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox