Qosify: new package for DSCP marking + cake

Since sqm's run time costs is really just the instantiated qdisc hierarchy's CPU requirements, qosify should be identical to layer_cake.qos/cake in sqm. In theory simplest.qos/fq_codel might be a bit less CPU-hungry, but the recommended SQM configuration with layer_cake.qos or piece_of_cake.qos will be just as CPU demanding. By the way is not actually the (flow-queueing) traffic scheduler or the AQM part that is so CPU-intensive, but the traffic shaper, and there is not much difference in the CPU cost of the available shapers (TBF, HTB, cake, HFSC).

4 Likes

Two different devices (mamba, rango) running same build, exact same /etc/confi/qosify, reboot,:

  • on mamba, qosify is running w cake loaded.
  • on rango, qosify process is listed in ps, cake is not loaded, there is no logread message daemon.info qosify: start interface wan. Issuing /etc/init.d/qosify restart | reload fires thiings up correctly.

Option option ingress_options "wash" makes a significant throughput difference in my environs, cable with docsis 3.1 modem; option ingress_options "besteffort wash" seemed to play about the same.

1 Like

Mmmh, could you run a packet capture for ingress traffic on the WAN side and check the DSCP values of those packets, please? Some ISPs mark considerable fractions of traffic CS1 (I believe this was reported for ComCast in the past) which ends up in cake's lowest priority tin and will see little throughput if there is traffic in the other tins.

besteffort will in deed make less work than the dual-XXXhost modes, but at the cost of not offering per IP fairness.

I just pushed another big qosify update:

  1. alias is renamed to class now, to better reflect its use. The old syntax is still supported for now.
  2. there is now a qosify-status script, which shows qdisc stats for all interfaces (egress and ingress)
  3. bulk/priority flow detection can now be configured per class (as requested by @moeller0)
  4. icmp defaults to best-effort now
7 Likes

So, if I wanted to use Qosify as it is at the moment...

I don't need to select luci-app-sqm if building my own, right? I just select, build, configure as needed and enable Qosify. Is this correct?

Correct. If you're building your own, you should leave out any other sqm-scripts related packages. You also need an LLVM toolchain. The easiest way is if you download the llvm-bpf tarball from the snapshot build of any target and unpack it directly into your OpenWrt source directory.

2 Likes

when i try to install the package i returned this error

Command failed: Request timed out

do you know why?

and the system log reports this

Sat Nov 20 08:18:18 2021 daemon.info procd: Instance qosify::instance1 s in a crash loop 6 crashes, 1 seconds since last crash

Did you build it yourself, or did you use the snapshot? Which version and which target did you use?
Please run qosify -o | nc termbin.com 9999 and send me the link.

Thanks for the reply,
i used the snapshot

OpenWrt SNAPSHOT r18117-ea5fce3f46 / LuCI Master git-21.322.38385-6507b1f

the target is

ramips/mt7621

I am attaching the log generated by qosify -o | nc termbin.com 9999

log

What's the version of the qosify package installed on your device?

qosify	2021-11-12-bfc2cafe	

Please try to update the qosify package. A new snapshot build with the latest version just finished.

Is there any guide I can follow to tailor this software to my needs? Thanks in advance.

so on wrt3200acm

/etc/init.d/qosify status shows running

however no process or tc shows qdisc

running qosify on its own

libbpf: map 'config': created successfully, fd=4
libbpf: failed to mkdir /sys/fs/bpf/qosify_data/config: No such file or directory
libbpf: map 'config': failed to auto-pin at '/sys/fs/bpf/qosify_data/config': -2
libbpf: map 'config': failed to create: No such file or directory(-2)
libbpf: failed to load object '/lib/bpf/qosify-bpf.o'
bpf_object__load: No such file or directory

Thanks! Now I really need to get my old test router in service again so I can build and test this.

Why? It should be enough to simply not enable sqm on the same interface. One of the things sqm-scripts has going for it is that it allows multiple instances on different interfaces (which occasionally is actually useful).

Thanks for the hint. That approach makes it really easy to include qosify in a build.

Documenting the steps for others:

  • download the llvm-bpf-13.0.0.tar.xz from your router's target downloads to your buildroot. E.g. https://downloads.openwrt.org/snapshots/targets/ipq806x/generic/llvm-bpf-13.0.0.tar.xz

  • extract the files into the buildroot: tar -xvf llvm-bpf-13.0.0.tar.xz

  • Change toolchain option to use a prebuilt LLVM toolchain, and enable qosify. I only needed to add these two lines into my .config recipe, and all other dependencies got pulled in automatically:

    CONFIG_USE_LLVM_PREBUILT=y
    CONFIG_PACKAGE_qosify=y
    

If you have extracted the LLVM toolchain properly, it will get detected by make menuconfig or defconfig, and the related options get set correctly in .config. If the toolchain is missing, the modified config settings will not show up in .config.

4 Likes

There's nothing in qosify that conflicts with sqm-scripts. I mentioned this only because many people get confused thinking that qosify is an add-on to sqm-scripts and that they need both.

3 Likes

Which OpenWrt version are you using? Does /sys/fs/bpf exist on your device, and what's in it?

master + /sys/fs/bpf exists but nothing under