Hardware Acceleration - R7000

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Thu Mar 05, 2015 16:43    Post subject: Hardware Acceleration - R7000 Reply with quote
Hey Kong, BS,

Do you guys think hardware acceleration will be \ fixed \ implemented any time soon?

My ISP is upgrading their tiers (a lot lately) and - so far, what i have works fine, but, i am afraid on the next upgrade i might not be able to pull full speeds?

I attached CPU usage (only once core is doing work, probably hardware acceleration is the reason?) on 320+ mbit from my ISP.

Thanks



2015-03-05_11-40-11.png
 Description:
 Filesize:  80.87 KB
 Viewed:  22279 Time(s)

2015-03-05_11-40-11.png



_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
Sponsor
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Thu Mar 05, 2015 19:02    Post subject: Reply with quote
s-f-r-j,

There is no ddtb/ctf (hardware acceleration) currently in ddwrt. If your doing ipv4 (nat) then its all cpu bound along with most other services like vpn.
ddwrt is running Linux I believe and there is not a lot of multi-core optimization out of the box.
There are commands you can add to your start up script but you will have to research those.

I use some custom startup scripts another forum member shared about a year ago.

One of them assigns each cpu to service a specific radio.

If you want to try it, add this to your start up script. It is all 1 line.

echo 2 > /proc/irq/163/smp_affinity && echo 1 > /proc/irq/169/smp_affinity

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152


Last edited by slidermike on Thu Mar 05, 2015 20:29; edited 1 time in total
boochi99
DD-WRT User


Joined: 31 Jan 2012
Posts: 88
Location: North Carolina

PostPosted: Thu Mar 05, 2015 20:25    Post subject: Reply with quote
I don't think your scripts have anything to do with the ops question about hardware acceleration. He is talking about wan side speed.
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Thu Mar 05, 2015 20:28    Post subject: Reply with quote
You are correct boochi.
The scripts were offered as a free method of offloading some resources to a 2nd cpu if he wanted to.
Further down in my post you will see that those statements actually are relevant to his question about WAN acceleration.
Unless I misunderstood what I was reading.

I probably should have arranged the response part to the top of my post and the offer of a startup script as the 2nd portion.
boochi99 wrote:
I don't think your scripts have anything to do with the ops question about hardware acceleration. He is talking about wan side speed.

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Thu Mar 05, 2015 21:18    Post subject: Reply with quote
Thank you, i will give it a try.

Is there a way to make sure this was applied properly after reboot?

Thanks

_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Thu Mar 05, 2015 21:21    Post subject: Reply with quote
Run this command to see some of whats on each cpu.
cat /proc/interrupts

I am no pro at it. I used someone elses posted script.
I suggest maybe doing a google search.
You will probably get an explanation to what your seeing.

There is another command "top".
It refreshes every couple seconds & shows you a list of resources & what is consuming each cpu. To cancel it, press the "q" key.

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152


Last edited by slidermike on Fri Mar 06, 2015 20:15; edited 1 time in total
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Thu Mar 05, 2015 21:25    Post subject: Reply with quote
Code:

root@CACTUS:~# cat /proc/interrupts
           CPU0       CPU1       
 27:         12          0       GIC  mpcore_gtimer
 29:      19281      19280       GIC  twd
111:          0        390       GIC  ehci_hcd:usb1, ohci_hcd:usb2
112:          0          1       GIC 
117:      27423          0       GIC  serial
163:          0      21654       GIC  eth1
169:       6104         42       GIC  eth2
179:      51058          0       GIC  eth0
IPI0:         0          0       CPU wakeup interrupts
IPI1:         0          1       Timer broadcast interrupts
IPI2:      5391       5476       Rescheduling interrupts
IPI3:         0          0       Function call interrupts
IPI4:        49         21       Single function call interrupts
IPI5:         0          0       CPU stop interrupts
Err:          0
root@CACTUS:~#


Does it looks as it should after applying the command?

Thanks for help slidermike, i appreciate it a lot.

_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Thu Mar 05, 2015 21:31    Post subject: Reply with quote
s-f-r-j,
here is what I did when I ran the command the first time last year. So I could see what (if anything) it was doing.

I ran the command from the command line (after reboot to make sure it was started).

Then I hit a large file transfer over 2.4. Streaming a movie or just a move from pc to pc.

Looking specifically at
163: eth1
169: eth2
179: eth0

Then I switched to the 5 and repeated the same or another large file move/stream & ran the command from the command line again.

You should see while moving constant data over 2.4, 1 of the 3 lines count up (keep issuing the command, its not real time).
Repeat for 5ghz.

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Thu Mar 05, 2015 21:38    Post subject: Reply with quote
This resource is pretty good at explaining the echo (cpu) & affinity commands.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-cpu-irq.html


irq 163 - eth1 - 2.4ghz
irq 169 - eth2 - 5ghz


With that info you could really tell which cpu is allowed to handle which irq function.

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Fri Mar 06, 2015 0:08    Post subject: Reply with quote
Thanks a lot slidermike.

I've decided to set both 2 and 5 ghz radio to cpu 2.

lets see how this will perform Smile

_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Fri Mar 06, 2015 0:15    Post subject: Reply with quote
Some tests:

I am transfering ISO file from my PC to Laptop (Wi-Fi 2Ghz) while doing downloads from Internet to my PC, around 150-200mbit (down)



I added a speed test from my phone 5GHz:



Code:
root@CACTUS:~# cat /proc/interrupts
           CPU0       CPU1       
 27:         12          0       GIC  mpcore_gtimer
 29:     444403     444394       GIC  twd
111:          0        408       GIC  ehci_hcd:usb1, ohci_hcd:usb2
112:          0          1       GIC 
117:      39256          0       GIC  serial
163:          0     562357       GIC  eth1
169:          0     254629       GIC  eth2
179:    8930045          0       GIC  eth0
IPI0:         0          0       CPU wakeup interrupts
IPI1:         0          1       Timer broadcast interrupts
IPI2:     33749      35814       Rescheduling interrupts
IPI3:         0          0       Function call interrupts
IPI4:        39         32       Single function call interrupts
IPI5:         0          0       CPU stop interrupts
Err:          0


I would say this helps a lot - at least both cores are being utilized - rather then one pushing most of stuff?

Thanks!

_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
tigs
DD-WRT User


Joined: 25 Sep 2011
Posts: 84

PostPosted: Sat Mar 07, 2015 5:14    Post subject: Reply with quote
s-f-r-j wrote:
Some tests:


I would say this helps a lot - at least both cores are being utilized - rather then one pushing most of stuff?

Thanks!


Hi s-f-r-j,

what is your script like?

thanks
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Sat Mar 07, 2015 6:35    Post subject: Reply with quote
tigs, what do you mean?
_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
s-f-r-j
DD-WRT User


Joined: 27 Sep 2011
Posts: 236

PostPosted: Sat Mar 07, 2015 6:35    Post subject: Reply with quote
You mean, what is the command i use for this, as start-up script?

thanks

_________________
Kong DD-WRT firmware (download)
http://ddwrt.serdarevic.net
tigs
DD-WRT User


Joined: 25 Sep 2011
Posts: 84

PostPosted: Sat Mar 07, 2015 15:02    Post subject: Reply with quote
s-f-r-j wrote:
You mean, what is the command i use for this, as start-up script?

thanks


yes

Code:
echo 2 > /proc/irq/163/smp_affinity && echo 2 > /proc/irq/169/smp_affinity


I see your CPU0 is 0. mine still has some low reading at CPU0, not zero. is that normal?
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum