R7800 cache scaling issue

Again my test are done with a loaded system
Will kill any process any try again...
Still there is a problem with l2 cache scaling.

There is no argument here. We all are just trying to figure out how to measure the impact of the changes and making sure that the router is not slower than it used to be with the broken L2 cache scaling.

1 Like

Tweaking some code as i notice there are some small problem in the scaling logic...
Anyway we have peak but still can't exceed 700mb

root@No-Lag-Router:~# ./mbw 32
Long uses 4 bytes. Allocating 2*8388608 elements = 67108864 bytes of memory.
Using 262144 bytes as blocks for memcpy block copy test.
Getting down to business... Doing 10 runs per test.
0       Method: MEMCPY  Elapsed: 0.05364        MiB: 32.00000   Copy: 596.614 MiB/s
1       Method: MEMCPY  Elapsed: 0.04946        MiB: 32.00000   Copy: 646.935 MiB/s
2       Method: MEMCPY  Elapsed: 0.04380        MiB: 32.00000   Copy: 730.677 MiB/s
3       Method: MEMCPY  Elapsed: 0.04356        MiB: 32.00000   Copy: 734.568 MiB/s
4       Method: MEMCPY  Elapsed: 0.04394        MiB: 32.00000   Copy: 728.249 MiB/s
5       Method: MEMCPY  Elapsed: 0.05945        MiB: 32.00000   Copy: 538.249 MiB/s
6       Method: MEMCPY  Elapsed: 0.06197        MiB: 32.00000   Copy: 516.404 MiB/s
7       Method: MEMCPY  Elapsed: 0.06210        MiB: 32.00000   Copy: 515.306 MiB/s
8       Method: MEMCPY  Elapsed: 0.06188        MiB: 32.00000   Copy: 517.147 MiB/s
9       Method: MEMCPY  Elapsed: 0.06211        MiB: 32.00000   Copy: 515.223 MiB/s
AVG     Method: MEMCPY  Elapsed: 0.05419        MiB: 32.00000   Copy: 590.510 MiB/s
0       Method: DUMB    Elapsed: 0.83081        MiB: 32.00000   Copy: 38.517 MiB/s
1       Method: DUMB    Elapsed: 0.84676        MiB: 32.00000   Copy: 37.791 MiB/s
2       Method: DUMB    Elapsed: 0.82403        MiB: 32.00000   Copy: 38.834 MiB/s
3       Method: DUMB    Elapsed: 0.83276        MiB: 32.00000   Copy: 38.427 MiB/s
4       Method: DUMB    Elapsed: 0.81806        MiB: 32.00000   Copy: 39.117 MiB/s
5       Method: DUMB    Elapsed: 0.82962        MiB: 32.00000   Copy: 38.572 MiB/s
6       Method: DUMB    Elapsed: 0.43703        MiB: 32.00000   Copy: 73.222 MiB/s
7       Method: DUMB    Elapsed: 0.20770        MiB: 32.00000   Copy: 154.071 MiB/s
8       Method: DUMB    Elapsed: 0.18971        MiB: 32.00000   Copy: 168.681 MiB/s
9       Method: DUMB    Elapsed: 0.53902        MiB: 32.00000   Copy: 59.366 MiB/s
AVG     Method: DUMB    Elapsed: 0.63555        MiB: 32.00000   Copy: 50.350 MiB/s
0       Method: MCBLOCK Elapsed: 0.06207        MiB: 32.00000   Copy: 515.564 MiB/s
1       Method: MCBLOCK Elapsed: 0.06249        MiB: 32.00000   Copy: 512.066 MiB/s
2       Method: MCBLOCK Elapsed: 0.06256        MiB: 32.00000   Copy: 511.542 MiB/s
3       Method: MCBLOCK Elapsed: 0.06228        MiB: 32.00000   Copy: 513.825 MiB/s
4       Method: MCBLOCK Elapsed: 0.06217        MiB: 32.00000   Copy: 514.718 MiB/s
5       Method: MCBLOCK Elapsed: 0.06335        MiB: 32.00000   Copy: 505.114 MiB/s
6       Method: MCBLOCK Elapsed: 0.04638        MiB: 32.00000   Copy: 689.953 MiB/s
7       Method: MCBLOCK Elapsed: 0.04597        MiB: 32.00000   Copy: 696.046 MiB/s
8       Method: MCBLOCK Elapsed: 0.06358        MiB: 32.00000   Copy: 503.295 MiB/s
9       Method: MCBLOCK Elapsed: 0.06270        MiB: 32.00000   Copy: 510.383 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.05935        MiB: 32.00000   Copy: 539.130 MiB/s

Do you have this in your patch set?

Oh, one more thing to do on this router to free up some CPU cycles to disable stats collection on the switch:

swconfig dev switch0 set ar8xxx_mib_poll_interval 0

i'm start to thinking that the real culprit here is the fab scaling...
Improvement with stock implementation is massive...

root@No-Lag-Router:~# echo performance > /sys/devices/system/cpu/cpufreq/policy0
/scaling_governor
root@No-Lag-Router:~# echo performance > /sys/devices/system/cpu/cpufreq/policy1
/scaling_governor
root@No-Lag-Router:~# ./mbw 32 | grep AVG
AVG     Method: MEMCPY  Elapsed: 0.04263        MiB: 32.00000   Copy: 750.717 MiB/s
AVG     Method: DUMB    Elapsed: 0.18602        MiB: 32.00000   Copy: 172.024 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04317        MiB: 32.00000   Copy: 741.187 MiB/s
root@No-Lag-Router:~# ./mbw 32 | grep AVG
AVG     Method: MEMCPY  Elapsed: 0.04333        MiB: 32.00000   Copy: 738.498 MiB/s
AVG     Method: DUMB    Elapsed: 0.18547        MiB: 32.00000   Copy: 172.536 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04298        MiB: 32.00000   Copy: 744.612 MiB/s
root@No-Lag-Router:~# ./mbw 32 | grep AVG
AVG     Method: MEMCPY  Elapsed: 0.04364        MiB: 32.00000   Copy: 733.356 MiB/s
AVG     Method: DUMB    Elapsed: 0.18602        MiB: 32.00000   Copy: 172.029 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04369        MiB: 32.00000   Copy: 732.503 MiB/s

Also

root@No-Lag-Router:~# echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scal
ing_max_freq
sleep 1
root@No-Lag-Router:~# echo 800000 > /sys/devices/system/cpu/cpufreq/policy1/scal
ing_max_freq
root@No-Lag-Router:~# sleep 1
root@No-Lag-Router:~# echo 1750000 > /sys/devices/system/cpu/cpufreq/policy0/sca
ling_max_freq
root@No-Lag-Router:~# echo 1750000 > /sys/devices/system/cpu/cpufreq/policy1/sca
ling_max_freq
root@No-Lag-Router:~# ./mbw 32 | grep AVG
AVG     Method: MEMCPY  Elapsed: 0.04316        MiB: 32.00000   Copy: 741.395 MiB/s
AVG     Method: DUMB    Elapsed: 0.18944        MiB: 32.00000   Copy: 168.923 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04540        MiB: 32.00000   Copy: 704.860 MiB/s
root@No-Lag-Router:~# ./mbw 32 | grep AVG
AVG     Method: MEMCPY  Elapsed: 0.04338        MiB: 32.00000   Copy: 737.672 MiB/s
AVG     Method: DUMB    Elapsed: 0.18819        MiB: 32.00000   Copy: 170.039 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04597        MiB: 32.00000   Copy: 696.086 MiB/s

We need to find a way to trigger the problem... I added one line to the stock patchest that set the l2 clk to idle and then to the real one. That's all...

Would you consider submitting this one to 19.07 as well?

Np but we still need to make sure it's actually fixed and for now i can't find a way to check this

What is it? I thought that you were going after memory throughput, which is improved. Even though I can achieve the same 700+ MB/s with the existing code by changing the CPU freq from 800 to 1,750MHz.

It = problem with performance degradation with cache freq transaction

Doing more test ...

Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 600000
Setting scaling_min_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG     Method: MEMCPY  Elapsed: 0.01975        MiB: 8.00000    Copy: 405.024 MiB/s
AVG     Method: DUMB    Elapsed: 0.14143        MiB: 8.00000    Copy: 56.566 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02036        MiB: 8.00000    Copy: 392.939 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 800000
Setting scaling_min_freq to 800000
cpu0 cur_freq: 800000
cpu1 cur_freq: 800000
AVG     Method: MEMCPY  Elapsed: 0.01800        MiB: 8.00000    Copy: 444.447 MiB/s
AVG     Method: DUMB    Elapsed: 0.09569        MiB: 8.00000    Copy: 83.601 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01846        MiB: 8.00000    Copy: 433.287 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1000000
Setting scaling_min_freq to 1000000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01283        MiB: 8.00000    Copy: 623.320 MiB/s
AVG     Method: DUMB    Elapsed: 0.07759        MiB: 8.00000    Copy: 103.112 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01286        MiB: 8.00000    Copy: 622.079 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1400000
Setting scaling_min_freq to 1400000
cpu0 cur_freq: 1400000
cpu1 cur_freq: 1400000
AVG     Method: MEMCPY  Elapsed: 0.01186        MiB: 8.00000    Copy: 674.639 MiB/s
AVG     Method: DUMB    Elapsed: 0.05576        MiB: 8.00000    Copy: 143.476 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01181        MiB: 8.00000    Copy: 677.220 MiB/s
Setting scaling_max_freq to 1000000
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_max_freq to 1725000
Setting scaling_min_freq to 1725000
cpu0 cur_freq: 1725000
cpu1 cur_freq: 1725000
AVG     Method: MEMCPY  Elapsed: 0.01174        MiB: 8.00000    Copy: 681.628 MiB/s
AVG     Method: DUMB    Elapsed: 0.04653        MiB: 8.00000    Copy: 171.928 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01193        MiB: 8.00000    Copy: 670.573 MiB/s

Looks good to me

the real outlier on 4.19 is the DUMB method, on master it runs at 170+MiB/s, on 4.19 it can go as low as 40MiB/s. i would not worry too much about MEMCPY and MCBLOCK as long as they get up to around 650+. from what i remember, it is pretty heavily influenced by the block-size, and by anything else going on in the router at the time. if you do a larger block copy then you get higher rates usually.

if you want to see it on master with the scaling fixed, try https://github.com/facboy/openwrt/tree/pr2280. it should transition up and down from idle to 1.7Ghz without breaking the L2.

i have a script on my other machine which tests the various transitions.

check my test. Do you see the problem in mine? Can you share the script so i can test on my router?

i need to check my results at home, which is where the script is too. from memory the 600-800Mhz results should be around 600MiB/s too.

are your latest tests on 4.19?

Yes with the stock patch set modified with your fix (set cache to idle first and then to the target Freq)

With your patches the scaling works but I get worse result

i forgot, the scripts in my git repo are set up to do this already: https://github.com/facboy/openwrt-r7800-freq-test

this is with 16MB mbw:

$ ./set_scaling_governor.sh performance
$ ./set_scaling_max_freq.sh -m 600 1725 1400 1000 800 600
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG	Method: MEMCPY	Elapsed: 0.02918	MiB: 16.00000	Copy: 548.411 MiB/s
AVG	Method: DUMB	Elapsed: 0.28552	MiB: 16.00000	Copy: 56.038 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02885	MiB: 16.00000	Copy: 554.533 MiB/s
Setting scaling_max_freq to 1725000
cpu0 cur_freq: 1725000
cpu1 cur_freq: 1725000
AVG	Method: MEMCPY	Elapsed: 0.02180	MiB: 16.00000	Copy: 734.103 MiB/s
AVG	Method: DUMB	Elapsed: 0.09291	MiB: 16.00000	Copy: 172.205 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02216	MiB: 16.00000	Copy: 721.924 MiB/s
Setting scaling_max_freq to 1400000
cpu0 cur_freq: 1400000
cpu1 cur_freq: 1400000
AVG	Method: MEMCPY	Elapsed: 0.02239	MiB: 16.00000	Copy: 714.528 MiB/s
AVG	Method: DUMB	Elapsed: 0.10948	MiB: 16.00000	Copy: 146.148 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02230	MiB: 16.00000	Copy: 717.415 MiB/s
Setting scaling_max_freq to 1000000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG	Method: MEMCPY	Elapsed: 0.02715	MiB: 16.00000	Copy: 589.240 MiB/s
AVG	Method: DUMB	Elapsed: 0.15378	MiB: 16.00000	Copy: 104.048 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02619	MiB: 16.00000	Copy: 610.806 MiB/s
Setting scaling_max_freq to 800000
cpu0 cur_freq: 800000
cpu1 cur_freq: 800000
AVG	Method: MEMCPY	Elapsed: 0.02682	MiB: 16.00000	Copy: 596.559 MiB/s
AVG	Method: DUMB	Elapsed: 0.18749	MiB: 16.00000	Copy: 85.339 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02701	MiB: 16.00000	Copy: 592.338 MiB/s
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG	Method: MEMCPY	Elapsed: 0.02893	MiB: 16.00000	Copy: 553.032 MiB/s
AVG	Method: DUMB	Elapsed: 0.29533	MiB: 16.00000	Copy: 54.176 MiB/s
AVG	Method: MCBLOCK	Elapsed: 0.02903	MiB: 16.00000	Copy: 551.103 MiB/s
root@No-Lag-Router:~# ./set_scaling_governor.sh performance
root@No-Lag-Router:~# ./set_scaling_max_freq.sh -m 600 1725 1400 1000 800 600
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 600
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 600
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01303        MiB: 8.00000    Copy: 613.737 MiB/s
AVG     Method: DUMB    Elapsed: 0.07822        MiB: 8.00000    Copy: 102.277 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01331        MiB: 8.00000    Copy: 600.998 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1725
Setting scaling_min_freq to 1725
cpu0 cur_freq: 384000
cpu1 cur_freq: 384000
AVG     Method: MEMCPY  Elapsed: 0.02133        MiB: 8.00000    Copy: 375.018 MiB/s
AVG     Method: DUMB    Elapsed: 0.18640        MiB: 8.00000    Copy: 42.919 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02138        MiB: 8.00000    Copy: 374.178 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1400
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 1400
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01299        MiB: 8.00000    Copy: 615.986 MiB/s
AVG     Method: DUMB    Elapsed: 0.07647        MiB: 8.00000    Copy: 104.610 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01341        MiB: 8.00000    Copy: 596.579 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1000
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 1000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01335        MiB: 8.00000    Copy: 599.242 MiB/s
AVG     Method: DUMB    Elapsed: 0.07765        MiB: 8.00000    Copy: 103.022 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01350        MiB: 8.00000    Copy: 592.597 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 800
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 800
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01321        MiB: 8.00000    Copy: 605.409 MiB/s
AVG     Method: DUMB    Elapsed: 0.07742        MiB: 8.00000    Copy: 103.333 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01301        MiB: 8.00000    Copy: 614.723 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 600
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 600
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01286        MiB: 8.00000    Copy: 622.098 MiB/s
AVG     Method: DUMB    Elapsed: 0.07673        MiB: 8.00000    Copy: 104.258 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01350        MiB: 8.00000    Copy: 592.408 MiB/s
root@No-Lag-Router:~# ./set_scaling_max_freq.sh -m 600 1725 1400 1000 800 600
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 600
Setting scaling_min_freq to 600
cpu0 cur_freq: 384000
cpu1 cur_freq: 384000
AVG     Method: MEMCPY  Elapsed: 0.02204        MiB: 8.00000    Copy: 362.998 MiB/s
AVG     Method: DUMB    Elapsed: 0.18810        MiB: 8.00000    Copy: 42.531 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02117        MiB: 8.00000    Copy: 377.913 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1725
Setting scaling_min_freq to 1725
cpu0 cur_freq: 384000
cpu1 cur_freq: 384000
AVG     Method: MEMCPY  Elapsed: 0.02152        MiB: 8.00000    Copy: 371.675 MiB/s
AVG     Method: DUMB    Elapsed: 0.17946        MiB: 8.00000    Copy: 44.578 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02170        MiB: 8.00000    Copy: 368.681 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1400
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 1400
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01304        MiB: 8.00000    Copy: 613.398 MiB/s
AVG     Method: DUMB    Elapsed: 0.07685        MiB: 8.00000    Copy: 104.096 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01367        MiB: 8.00000    Copy: 585.018 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 1000
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 1000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01312        MiB: 8.00000    Copy: 609.603 MiB/s
AVG     Method: DUMB    Elapsed: 0.07776        MiB: 8.00000    Copy: 102.876 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01298        MiB: 8.00000    Copy: 616.119 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 800
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 800
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01298        MiB: 8.00000    Copy: 616.105 MiB/s
AVG     Method: DUMB    Elapsed: 0.07812        MiB: 8.00000    Copy: 102.400 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01294        MiB: 8.00000    Copy: 618.429 MiB/s
Setting scaling_max_freq to 1000000
Setting scaling_max_freq to 600
sh: write error: Invalid argument
sh: write error: Invalid argument
Setting scaling_min_freq to 600
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.01290        MiB: 8.00000    Copy: 620.102 MiB/s
AVG     Method: DUMB    Elapsed: 0.07883        MiB: 8.00000    Copy: 101.487 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.01381        MiB: 8.00000    Copy: 579.278 MiB/s

there are some problem with your script but this is my output

i think the errors are because in 4.19 one of the policies is no longer there. but I don't understand other things in your output, where does this come from?

Setting scaling_min_freq to 600

i can't find that anywhere in my repo.

@facboy yes sorry i had a modified function file

here new output...

root@No-Lag-Router:~# ./set_scaling_max_freq.sh -m 600 1725 1400 1000 800 600
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG     Method: MEMCPY  Elapsed: 0.04053        MiB: 16.00000   Copy: 394.767 MiB/s
AVG     Method: DUMB    Elapsed: 0.28719        MiB: 16.00000   Copy: 55.711 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.03880        MiB: 16.00000   Copy: 412.363 MiB/s
Setting scaling_max_freq to 1725000
cpu0 cur_freq: 1725000
cpu1 cur_freq: 1725000
AVG     Method: MEMCPY  Elapsed: 0.02439        MiB: 16.00000   Copy: 655.974 MiB/s
AVG     Method: DUMB    Elapsed: 0.09345        MiB: 16.00000   Copy: 171.207 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02505        MiB: 16.00000   Copy: 638.779 MiB/s
Setting scaling_max_freq to 1400000
cpu0 cur_freq: 1400000
cpu1 cur_freq: 1400000
AVG     Method: MEMCPY  Elapsed: 0.02456        MiB: 16.00000   Copy: 651.540 MiB/s
AVG     Method: DUMB    Elapsed: 0.11203        MiB: 16.00000   Copy: 142.818 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02502        MiB: 16.00000   Copy: 639.555 MiB/s
Setting scaling_max_freq to 1000000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.02610        MiB: 16.00000   Copy: 613.060 MiB/s
AVG     Method: DUMB    Elapsed: 0.15470        MiB: 16.00000   Copy: 103.424 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02695        MiB: 16.00000   Copy: 593.613 MiB/s
Setting scaling_max_freq to 800000
cpu0 cur_freq: 800000
cpu1 cur_freq: 800000
AVG     Method: MEMCPY  Elapsed: 0.03690        MiB: 16.00000   Copy: 433.595 MiB/s
AVG     Method: DUMB    Elapsed: 0.19462        MiB: 16.00000   Copy: 82.210 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.03720        MiB: 16.00000   Copy: 430.067 MiB/s
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG     Method: MEMCPY  Elapsed: 0.04074        MiB: 16.00000   Copy: 392.748 MiB/s
AVG     Method: DUMB    Elapsed: 0.28675        MiB: 16.00000   Copy: 55.797 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.04139        MiB: 16.00000   Copy: 386.578 MiB/s
root@No-Lag-Router:~# ./set_scaling_max_freq.sh -m 600 1725 1400 1000 800 600
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG     Method: MEMCPY  Elapsed: 0.04049        MiB: 16.00000   Copy: 395.116 MiB/s
AVG     Method: DUMB    Elapsed: 0.28535        MiB: 16.00000   Copy: 56.072 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.03991        MiB: 16.00000   Copy: 400.879 MiB/s
Setting scaling_max_freq to 1725000
cpu0 cur_freq: 1725000
cpu1 cur_freq: 1725000
AVG     Method: MEMCPY  Elapsed: 0.02455        MiB: 16.00000   Copy: 651.673 MiB/s
AVG     Method: DUMB    Elapsed: 0.09382        MiB: 16.00000   Copy: 170.546 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02415        MiB: 16.00000   Copy: 662.583 MiB/s
Setting scaling_max_freq to 1400000
cpu0 cur_freq: 1400000
cpu1 cur_freq: 1400000
AVG     Method: MEMCPY  Elapsed: 0.02500        MiB: 16.00000   Copy: 640.044 MiB/s
AVG     Method: DUMB    Elapsed: 0.11213        MiB: 16.00000   Copy: 142.689 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02462        MiB: 16.00000   Copy: 649.791 MiB/s
Setting scaling_max_freq to 1000000
cpu0 cur_freq: 1000000
cpu1 cur_freq: 1000000
AVG     Method: MEMCPY  Elapsed: 0.02660        MiB: 16.00000   Copy: 601.508 MiB/s
AVG     Method: DUMB    Elapsed: 0.15455        MiB: 16.00000   Copy: 103.527 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.02589        MiB: 16.00000   Copy: 618.088 MiB/s
Setting scaling_max_freq to 800000
cpu0 cur_freq: 800000
cpu1 cur_freq: 800000
AVG     Method: MEMCPY  Elapsed: 0.03696        MiB: 16.00000   Copy: 432.893 MiB/s
AVG     Method: DUMB    Elapsed: 0.19731        MiB: 16.00000   Copy: 81.091 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.03754        MiB: 16.00000   Copy: 426.244 MiB/s
Setting scaling_max_freq to 600000
cpu0 cur_freq: 600000
cpu1 cur_freq: 600000
AVG     Method: MEMCPY  Elapsed: 0.03962        MiB: 16.00000   Copy: 403.880 MiB/s
AVG     Method: DUMB    Elapsed: 0.28325        MiB: 16.00000   Copy: 56.487 MiB/s
AVG     Method: MCBLOCK Elapsed: 0.03986        MiB: 16.00000   Copy: 401.386 MiB/s
root@No-Lag-Router:~#

What do you think about this results?

hum...well everything is lower. but maybe it depends on what else is running on the router. it doesn't look too bad, but need to run some tests without the performance governor too.

softethervpn constantly running could be the culprit.
If you want i can share the patch so you can test yourselft.

1 Like