NanoPi R4S-RK3399 is a great new OpenWrt device

I installed the latest Friendlywrt image rk3399-sd-friendlywrt-5.15-20220420 and the download speed dropped from 940 to 480. What could it be?

Mmmhhh, yet there are some services that do not support nftables, e.g. banip ...

1 Like

Cause the cpu affinity in the last builds of friendlywrt is bad, its mainly using two a53 cores by default while every other build of openwrt for the R4S uses the two A72 cores by default.

Install htop, and you will easily be able to see what i mean.

There 3 ways of fixing this:

1 - Fix the cpu affinity manually which provides the best results.
2 - Fix the cpu affinity the automatic way, by using packet steering + irqbalance package.
3 - Going into /etc/hotplug.d/net and change the file 40-net-smp-affinity, so the cpu affinity will be like in the other openwrt builds, in other words, everything goes to the a72 cores.

3 Likes

Thanks Master :v:

Excuse the beginner question: How do I update Anaelorlinski firmware and not lose apk and settings? (ext4 image)

hey should I install the latest snapshot or the stable version and where can i find the stabel version ?
Is this the right website ?:

I've been running a recent snapshot for 7 days on my main gateway router. Nothing too complicated: CAKE SQM, Adblock, VLANs. Still, it has been running great. No complaints.

I'd start with:
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz

3 Likes

Get on an OpenWrt build, snapshot, RC.
Use the online image builder to create the image with the packages you want.
Add this and you will never again lose your packages during an upgrade/update.
I've been doing this for months now and it works perfectly.
Once we have an official release, really no reason to worry about not being able to install a package. But until then, this is the best way I've found.

Attended Sysupgrade

The attended sysupgrade service allows to easily upgrade vanilla and custom firmware images.

This is done by building a new firmware on demand via an online service.

Thanks for pointing out did not know there is a online image builder :smiley: just build my first image with the packages I use.
I have one other question if am running a version is it possible to upgrade to a later version.
Just by flashing the new build over the existing one?
What I do now is completely flash new SD card and then install all the packages and load my generated backup to get all of the settings as I had.

Ahum reading is not my strongest point I see you explained this :sweat::sweat:
So when I build the image I can flash it an upgrade?

You have many forks or versions for your NanoPi R4S. This is one of them (immortalwrt). If you want to try official OpenWrt go to this webside: https://asu.aparcar.org/?version=SNAPSHOT&target=rockchip%2Farmv8&id=friendlyarm_nanopi-r4s
There still isn't a stable version out yet, we will get it with 22.03. You have 3 latest versions now (snapshot, which is nightly, snapshot 22.03, and future stable release 22.03.0 RC1-release candidate 1). I'm currently on snapshot 22.03 with firewall (not firewall4) and its running just fine.

1 Like

so lets say i want to install the snapshot how do i do that ?

Download the Openwrt firmware and install it via Rufus on the micro sd ?
Can i then acces the r4s over my browser and just enable sqm ?

Yes, download one of the 3 latest versions, you can use rufus or balena etcher or similar to extract the firmware to micro SD card, insert the card to your NanoPi and open the browser, 192.168.1.1. If you enable sqm or not that's completely dependant on your needs.

1 Like

Attended Sysupgrade creates and applies the update.
Once you install this, look under the system menu for it.
After opening it, hit the configuration tab and select this:
Show advanced options like package list modification
Then you get a list of your packages and you are also able to add new packages.

Easy, give it a try.

so i installed the OpenWrt 22.03.0-rc1 "stable" firmware & luci-app-sqm

without sqm i get my 950/54

but with it only get 650/42

these are my settings im on a 1000/50 cable connection, i also tried packet steering which was even worse:

1

3

i set the per packet overhead to 22 but i dont use vlan so can i use 18 ?
i also have a nativ ipv4 how can i disable ipv6 ?

These are my parameters for a 1000/50 cable connection with piece_of_cake:

/etc/config/sqm

config queue
	option interface 'eth0'
	option download '800000'
	option upload '47000'
	option debug_logging '0'
	option verbosity '5'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option qdisc_advanced '1'
	option squash_dscp '0'
	option squash_ingress '0'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'nat dual-dsthost ingress docsis'
	option eqdisc_opts 'nat dual-srchost ack-filter docsis'
	option linklayer 'none'
	option enabled '0'

I shape download bandwidth to 80% currently, you can change that. I'm setting Link Layer Adaptation to None and supplying to advance options in ingress and egress the parameter docsis as I have my router connected to a cable model, just like you, I reckon.

1 Like

For upload, getting 42 of the 45 Mbps you've set for upload seems about right. I generally get ~93% of whatever speed I set.

Download is looking a little tired though. You might try installing irqbalance and enabling it in the config file. CAKE is going to run on one CPU core regardless, but if you can spread the routing load to other cores better it may help.

Also, have you turned on software flow offloading in the firewall menu? You cannot offload SQM, but again, this may free up some more CPU cycles for CAKE.

I've not done it myself, so I cannot give you specific guidance, but I'm pretty sure there is a way to force CAKE to run on one of the fast A72 cores instead of one of the relatively slower A53 cores too.

One other thought - try multiple speed tests to gauge your speed, not just buffer bloat oriented tests. Now that I have a device fast enough to use all of my 400/20 cable service, I've noticed for instance that the waveform test can sometimes top out before I reach my ISP speed depending on how busy its servers are. 5 am in the morning is a good time to use it for testing, but not the middle of the day.

do you get the full 800mbit ?

i tried software flow offloading and it didnt work, do i install irqbalance where i installed sqm ?

okay tried it and it works but haha.
The only thing that does not is that i have a 8GB sd-card.
I partitioned it with g-parted runnng linux from a usb stick.
I installed the generated update and now the root partition is 100 MB lol.
Is there anayway to update without touching the size of root?