Only 3mbps speed from web server behind R7800 over WAN

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
LaimisV
DD-WRT User


Joined: 01 Mar 2016
Posts: 63

PostPosted: Mon Jun 14, 2021 0:48    Post subject: Only 3mbps speed from web server behind R7800 over WAN Reply with quote
Hi,

I'm using this firmware
DD-WRT v3.0-r41813 std (c) 2019 NewMedia-NET GmbH
Release: 12/29/19
Board: Netgear R7800

I forwarded TCP/80 port to web server.

My computer is 1500 km away from DD-WRT router.

Download speeds from web server to my computer (file is hosted in RAM)

TEST 1: Server 2 -> Router = 800mbps

TEST 2: Server 2 -> WAN -> Computer = 30mbps

TEST 3: Server 1 -> Router = 800mbps

TEST 4: Server 1 -> WAN -> Computer using 15 connections = 15mbps

TEST 5: Server 1 -> WAN -> Computer = 3mbps (the issue!)

Any ideas how would you go to improve DNAT/WAN speed?
CPU and RAM is almost idling.
I've reviewed sysctl -a kernel parameters and tried to get newest version of iptables using opkg without any luck.
So what else could be wrong?

I've did deeper analysis and posted question on serverfault too - https://serverfault.com/questions/1066607/tuning-linux-router-and-server-for-better-performance-solving-single-tcp-conne

Any expertise would be great to dive deep and catch a root cause.

Many thanks
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Mon Jun 14, 2021 8:20    Post subject: Reply with quote
Quote:
I've reviewed sysctl -a kernel parameters and tried to get newest version of iptables using opkg without any luck.


update the router to a current dd-wrt version?

Quote:
Server 1 - it has 4.6 load average. Server 1 also handles around 500-1000 connections for other things outside of tests


test server 1 without additional load?

Quote:
Router - westwood


i use cubic everywhere

otherwise the whole sysctl values are no longer correct anyway, they have changed a few months ago
LaimisV
DD-WRT User


Joined: 01 Mar 2016
Posts: 63

PostPosted: Mon Jun 14, 2021 11:30    Post subject: Reply with quote
ho1Aetoo wrote:
Quote:
I've reviewed sysctl -a kernel parameters and tried to get newest version of iptables using opkg without any luck.


update the router to a current dd-wrt version?

Quote:
Server 1 - it has 4.6 load average. Server 1 also handles around 500-1000 connections for other things outside of tests


test server 1 without additional load?

Quote:
Router - westwood


i use cubic everywhere

otherwise the whole sysctl values are no longer correct anyway, they have changed a few months ago


Many thanks for your input as 10y+ of admin/devops experience doesn't lead me to the root cause.
I have three DD-WRT units in different locations connected via VPN (running Kubernetes successfully, just performance is not good - VPN is out of scope of this issue - UDP performs fine).
The DD-WRT version I'm using is completely stable, it's excellent.
While it's easier to tune existing firmware on remote units, may I ask you which firmware do you recommend to upgrade to?

I've tried to reduce load on server 1 by 70% and download speed didn't improve at all.
Definitely will try cubic as this seems default nowadays.


Last edited by LaimisV on Mon Jun 14, 2021 12:43; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12888
Location: Netherlands

PostPosted: Mon Jun 14, 2021 11:55    Post subject: Reply with quote
Although not directly related to your topic, if you are running OpenVPN on the router you might consider upgrading to a recent build and use Chacha-Poly for encryption.
You might even consider WireGuard which is a lot faster.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
LaimisV
DD-WRT User


Joined: 01 Mar 2016
Posts: 63

PostPosted: Mon Jun 14, 2021 12:05    Post subject: Reply with quote
egc wrote:
Although not directly related to your topic, if you are running OpenVPN on the router you might consider upgrading to a recent build and use Chacha-Poly for encryption.
You might even consider WireGuard which is a lot faster.


I have WireGuard in my to do list to replace OpenVPN. To not change everything in one go, will OpenVPN 2.4 (older firmware) work with latest DD-WRT firmware for R7800? The exact firmware which you can recommend for stability/performance. I guess OpenVPN is upgraded to 2.5.

If that is possible to connect 2.4 and 2.5, I can keep 2 of 3 routers running while upgrading 1. In Kubernetes/clusters terms it's keeping quorum.

Of course, I can switch off everything, but usually it takes longer to get everything in balance and working perfectly (issues could appear in a day, week or so).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12888
Location: Netherlands

PostPosted: Mon Jun 14, 2021 12:18    Post subject: Reply with quote
OpenVPN 2.5.2 which we are now running should be backwards compatible with 2.4.

Chacha-poly is only available in 2.5, you should be able to use GCM ciphers for both 2.4 and 2.5 which are more efficient than CBC.

In my signature at the bottom links to documentation for OpenVPN and WireGuard (In the advanced setup guide is an example of a site-to-site setup between 3 sites)

My R7800 (which is just lightly taxed) does about 85 Mb/s OpenVPN and 270 Mb/s for WireGuard, usually WG has about 3 times the performance of OpenVPN YMMV.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
LaimisV
DD-WRT User


Joined: 01 Mar 2016
Posts: 63

PostPosted: Mon Jun 14, 2021 12:30    Post subject: Reply with quote
egc wrote:
OpenVPN 2.5.2 which we are now running should be backwards compatible with 2.4.

Chacha-poly is only available in 2.5, you should be able to use GCM ciphers for both 2.4 and 2.5 which are more efficient than CBC.

In my signature at the bottom links to documentation for OpenVPN and WireGuard (In the advanced setup guide is an example of a site-to-site setup between 3 sites)

My R7800 (which is just lightly taxed) does about 85 Mb/s OpenVPN and 270 Mb/s for WireGuard, usually WG has about 3 times the performance of OpenVPN YMMV.


Excellent info, thanks for documentations too!

Still off topic, but does Wireguard use 1 core? In my case there are two processes per router:

OpenVPN server A -> OpenVPN client B
OpenVPN server B -> OpenVPN client C
OpenVPN server C -> OpenVPN client A

So maybe I can assign first core to Wireguard link 1 and second core to link 2.

To get back to TCP performance question, does latest R7800 have cubic by default (...and probably more parameters re-optimised for better performance)?
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Mon Jun 14, 2021 12:48    Post subject: Reply with quote
LaimisV wrote:

To get back to TCP performance question, does latest R7800 have cubic by default (...and probably more parameters re-optimised for better performance)?


the TCP congestion control , can actually be set in the WebIF for a very long time ( tab "administration > management")

the sysctl parameter were adjusted (can be adjusted in current images comfortably via "adminstration > sysctl")

at the moment I'm still running build v3.0-r46395 (without any problems) because I currently have little time to test alphas and betas...

so I don't know what to recommend you there, basically every image probably has some bugs (they do not have to bother you personally)

just read the release threads, test one of the current (latest) images...
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12888
Location: Netherlands

PostPosted: Mon Jun 14, 2021 13:32    Post subject: Reply with quote
WireGuard is multithreaded (in contrast to OpenVPN) so by default it uses both cores

Normally you can set core affinity but I have never done that for WireGuard

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6437
Location: UK, London, just across the river..

PostPosted: Mon Jun 14, 2021 13:40    Post subject: Reply with quote
ho1Aetoo wrote:
i use cubic everywhere

otherwise the whole sysctl values are no longer correct anyway, they have changed a few months ago


please elaborate ...!?

I use Vegas...this is so far the best compatible with my ISP, as those depend on what ISP is running...if im not wrong...

So why cubic and where that is messing with sysctl values...??

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Mon Jun 14, 2021 16:21    Post subject: Reply with quote
Alozaros wrote:
ho1Aetoo wrote:
i use cubic everywhere

otherwise the whole sysctl values are no longer correct anyway, they have changed a few months ago


please elaborate ...!?

I use Vegas...this is so far the best compatible with my ISP, as those depend on what ISP is running...if im not wrong...

So why cubic and where that is messing with sysctl values...??



i use cubic because i have made good experiences/ tests with it and it is the standard for most clients
especially older clients have only cubic or reno

the TCP congestion control on your router only affects TCP traffic that terminates at your router
it doesn't change the forwarded traffic at all and only affects connections that are directed to your router itself Cool

with the sysctl values everything is ok, but the thread creator refers to 2 years old values that are no longer up to date. (in the link above to serverfault)
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6290
Location: Texas

PostPosted: Mon Jun 14, 2021 16:31    Post subject: Reply with quote
Using 'TCP Congestion Control' bbr on the EA8500 for year or so without problems
AND
r46885 been doing really good for me using ath10k 'VANILLA' firmware
Twisted Evil
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6437
Location: UK, London, just across the river..

PostPosted: Mon Jun 14, 2021 17:42    Post subject: Reply with quote
hmmm just tested Cubic, no go in my case...
In my case TCP Congestion Control affects the DL speed...very visible on DL or torrents

so, call it what you want, but DL comes from ISP side not from the space or tesla coil... Laughing Cool Rolling Eyes and terminates at the router...correct

https://en.wikipedia.org/wiki/TCP_congestion_control

TCP BBR is not present on all routers...at least not on R7000 that i use atm

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Mon Jun 14, 2021 17:52    Post subject: Reply with quote
https://forum.openwrt.org/t/backported-linux-tcp-bbr-patches-for-higher-wifi-throughput-and-lower-queuing-delays/48907/30
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Mon Jun 14, 2021 18:35    Post subject: Reply with quote
BBR was only added for kernel 4.9 and newer and not backported (it requires a 4.9 or newer kernel by default):

https://svn.dd-wrt.com/changeset/39832

https://svn.dd-wrt.com/changeset/39833

https://svn.dd-wrt.com/changeset/39834

https://svn.dd-wrt.com/browser/src/linux/universal/linux-4.4_bcm4908/.config_northstar

https://en.wikipedia.org/wiki/TCP_congestion_control#TCP_BBR

https://tools.ietf.org/id/draft-cardwell-iccrg-bbr-congestion-control-00.html

https://www.cyberciti.biz/cloud-computing/increase-your-linux-server-internet-speed-with-tcp-bbr-congestion-control/

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net


Last edited by kernel-panic69 on Mon Jun 14, 2021 19:15; edited 1 time in total
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum