MT6000 custom build with LuCi and some optimization - kernel 6.12.x

Does anyone know how to locate the source of the pesa1234's optimizations/changes? I've spent a few hours digging and talking with AI but haven't been able to pinpoint where the code for the changes lives. The AI seems to think they are pulled in from a private repo, but that can't be right (stupid AI!) But with that said, the pesa1234 openwrt repo seems to be just a mirror with no changes of from official openwrt repo? Imma noob to this, maybe they are there in plain sight?

My goal is to get better at all this, and also to build from the official repo while including some of pesa1234's optimizations, preferably as .patch files, but idk if there are other better ways of doing it.

-b1k

Additionally, it appears (after a LOT of digging) there were some patch files committed to pesa1234's MT6000_cust_build repo but were deleted a few days ago, along with the history of their existence. Maybe it was an accidental delete, or there was a good reason for it? Again, I'm a super noob, no idea on why a dev would do that. Maybe the patch files were faulty and the delete in history was because of some reason?

The usefulness of irqbalance and similar tools is debatable. There is a lot to say for reduction of context switching, especially when trying to maintain low latency. Irqbalance and similar tools can often increase context switches as they rebalance cores, so again, it's kind of a "try it and see" thing to know if it helps or hurts your usage.

Honestly, I have 1gb symmetric fiber and prefer to let /etc/init.d/advanced_setup (included in Pesa's latest builds) just set the IRQs and affinity and then don't touch it again. I am not seeing any of the reported issues at this point, though I am running my MT6000s as WAPs only.

I would say just flash the build and then do some testing to see if irqbalance helps or hurts for you.

Bonus Good watch for the curious: https://www.youtube.com/watch?v=hjMWVrqrt2U

1 Like

Yep, go to his openwrt repo branches and filter commits by 'pesa1234':

And his mt76 repo:

Yep, as one who works with AI on a daily basis professionally, it's not all it's hyped up to be. Its usefulness is still very much dependent on who is invoking it and how. :slight_smile:

They're not hiding, but you have to know where to look :wink:

One trick (well, not really a trick...) that not everyone knows is that anytime you are on a Github commit, for example: https://github.com/pesa1234/openwrt/commit/2c8a556d2331dc7c7f2b04252f81735e252d2570

Just go to the URL and append .patch to the end of the URL and you get a standard patch file from the commit, as here: https://github.com/pesa1234/openwrt/commit/2c8a556d2331dc7c7f2b04252f81735e252d2570.patch

Hope that helps :slight_smile:

5 Likes

Thanks for the info. That’s what I was aiming to do. I am not fimilar with manually running commands in openwrt though. I prefer to use Luci. Therefore, what I was wondering is if irqbalance was already installed on pesa firmware and active or is there a way to active via Luci?

Interesting, but still not seeing the specific changes by pesa1234, listed in the OP:

  • RSS and Jumbo packet
  • iBF settings & QAM-256 VHT on 2g activable in Luci
  • WED setting and ATF HW-ATF is on LuCi
  • EDCCA setting
  • USB speed
  • Background radar setting can be activable in LuCi
  • TWT setting activable in LuCi

I see a bunch of stuff from mainline (openwrt's official repo) written by mediatek employee Howard Hsu.

Again, noob, probably blind - but neither of those commit links seem to show the changes written by pesa1234 - relevant to this OP.

Is it that all these things are simply in the official openwrt repo now, and re-written by the mediatek people?

Pesa imports alot from here:

2 Likes

There a bunch of goodies in this one...

I don't have time to continue pasting more here, but they are all out there. Just have to look. Sometimes there are additional things in each commit beyond just what the commit message says. :wink:

7 Likes

Hi!
The official openwrt Flint 2 page suggests the following AQL tweaks to be in /etc/rc.local:

aql_txq_limit_l=2500
aql_txq_limit_h=8500
for ac in 0 1 2 3; do echo $ac $aql_txq_limit_l $aql_txq_limit_h > /sys/kernel/debug/ieee80211/phy0/aql_txq_limit; done
for ac in 0 1 2 3; do echo $ac $aql_txq_limit_l $aql_txq_limit_h > /sys/kernel/debug/ieee80211/phy1/aql_txq_limit; done

Is this still valid or better leave it defaults?
I will use the router as main AP (wireless and cable) but behind the ISP router (I can't avoid it).

They’re still legit, though they can be tweaked/tuned based on personal preferences. Lower values tend to favor lower latency whereas higher values tend to lead to higher overall throughput.

For example, I prefer lower latency, so I run with the follow values:

aql_txq_limit_l=1500
aql_txq_limit_h=2500
1 Like
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3423,12 +3423,12 @@ enum wiphy_params_flags {
 #define IEEE80211_DEFAULT_AIRTIME_WEIGHT	256
 
 /* The per TXQ device queue limit in airtime */
-#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L	5000
-#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H	12000
+#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L	1500
+#define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H	5000
 #define IEEE80211_DEFAULT_AQL_TXQ_LIMIT_BC	50000
 
 /* The per interface airtime threshold to switch to lower queue limit */
-#define IEEE80211_AQL_THRESHOLD			24000
+#define IEEE80211_AQL_THRESHOLD			12000
 
 /**
  * struct cfg80211_pmksa - PMK Security Association

and this is the setting on my build

4 Likes

Thank you.
Nice to know, I'll do some tests with different values then.

I wanted to share a modification to the advanced_setup script to adjust the CPU_RPS, which in my case resolved the CPU saturation. I modified the block from:

CPU0_RPS="$WIFI_IF_LIST"
CPU1_RPS="$WIFI_IF_LIST"
CPU2_RPS="$WIFI_IF_LIST"
CPU3_RPS="$WIFI_IF_LIST"

to

CPU0_RPS="eth0 $WIFI_IF_LIST"
CPU1_RPS="eth1 $WIFI_IF_LIST"
CPU2_RPS="eth1 $WIFI_IF_LIST"
CPU3_RPS="eth1 $WIFI_IF_LIST"

And now with Software Offload and Packet Stearing All CPUs, no cores are saturated. Can you try it, @pesa1234?

5 Likes

@pesa1234 systemcrash on the main gl-mt6000 thread noticed kmod-phy-aquantia is included and loaded via lsmod. I see you have this in your .config too. I know it is often used for SFP but we don't have that. Wondering if it should be removed from this device. Do you know if we need this?

1 Like

Hi, no, we don't need it, some build ago I removed it, maybe it is come back.
Thanks

3 Likes

Cool, just so you are aware: GL.iNET Flint 2 (GL-MT6000) discussions - #2585 by systemcrash

1 Like
CPU0_RPS="eth0"
CPU1_RPS="$WIFI_IF_LIST"
CPU2_RPS="$WIFI_IF_LIST"
CPU3_RPS="$WIFI_IF_LIST"

Can you tell me if this setting is working good?

No, with this configuration CPU0 is saturated at 100% and the other CPUs are not used, it only manages to download at 350 Mbps. The tests are made with wired ethernet.

Do you have packet steering enabled? If yes All CPUs?

That is: Packet Steering All CPUs and Software Flow Offloading