What's new

ASUS GT-AXE16000 CPU usage with VPN on lan machine

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Jerky_san

Regular Contributor
Ok so I've been trying to narrow down what is going on here with slow VPN usage on local lan machines.

2.5gb fiber connection with full 10gb network throughout

First step.. speed test on the router itself..
Results: CPU usage low.. think like 5-8% utilization(totally fine) - Full line speed

Second step.. speed test on an AP that is connected via 10gb -> 10gb switch -> 10gb port on router
Results: Exact same as first step

3rd step.. speed test on lan machine 10gb -> 10gb switch -> 10gb port on router
Results: Yet again exact same

4th step.. enable wireguard VPN to high performance server(10gb backbone on VPN server) -> 10gb -> 10gb switch -> 10gb port on router
Results: Extremely high CPU usage on single core originating from bcmsw_rx.. basically can only achieve about 350 megabits a second max.

Here is the weird part.. it doesn't happen all the time. It seems to be what server I connect to(all from the same service and weirdly same location but different IP is assigned). The cipher is the same which is ChaCha20. So I can't figure out why it's doing this as it doesn't appear to be cipher related. I'm using the same client/machine for each of these tests. It seemingly doesn't route through the NAT Accelerator sometimes. Is there a way to figure out potentially why this occurs? Or if this is even a router problem? Also when it DOESN'T do this.. basically close to full line speed.. like 2gb which frankly is enough. Similar CPU utilization as other tests.

1728835699029.png
 
basically can only achieve about 350 megabits a second max

Router CPU limitation. May go a bit higher, but whatever goes through WireGuard is incompatible with NAT acceleration. For the rest flow cache bypass was implemented in firmware some time ago. Your router may have fast ports, but it's similar to RPi hardware and relies heavily on NAT acceleration.
 
Router CPU limitation. May go a bit higher, but whatever goes through WireGuard is incompatible with NAT acceleration. For the rest flow cache bypass was implemented in firmware some time ago. Your router may have fast ports, but it's similar to RPi hardware and relies heavily on NAT acceleration.
But that is the thing.. it doesn't always do it. It seemingly is only certain servers the client is round robinin through. Like I found one during my testing nearly fully line speed. Next one Router CPU spikes hard but it's not cipher related and seemingly not port related. So wondering what is the difference and why the NAT acceleration isn't working on certain ones but is on others. Also, all wireguard and same settings. I don't change things between tests besides whatever server the client randomly connects to in that location. I've started recording all the ips and which work and don't work to try to narrow it down.

Edit 2:

You'd assume as well it's server related but how can the server affect my router's CPU.. Maybe it's altering the MTU or something and breaking the NAT acceleration that way? That should be client controlled though..?
 
Last edited:
Plot thickens.. I wired sharked the connection.. Even though I thought I'm not changing the port the port is indeed changing.. It would seem if it connects on port 1337 no problems but 1443 it spikes the CPU. Very weird..
 
Plot thickens.. I wired sharked the connection.. Even though I thought I'm not changing the port the port is indeed changing.. It would seem if it connects on port 1337 no problems but 1443 it spikes the CPU. Very weird..
The flowcache bypass uses 2 files to record local IP and port that should be bypassed. You can look at them by:
Code:
cat /proc/blog/skip_wireguard_port
cat /proc/blog/skip_wireguard_network

You can add/remove entries here to experiment:
Code:
echo "add 172.16.1.1/32" >> /proc/blog/skip_wireguard_network
echo "del 172.16.1.1/32" >> /proc/blog/skip_wireguard_network

Source: https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-830466
https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-815092

If you change Wireguard port without fw knowing you may skip the bypass. The reason for this bypass is incompability and could show as extremely poor speeds, syslog filling up with error message, router instability et.c.
 
Last edited:
The flowcache bypass uses 2 files to record local IP and port that should be bypassed. You can look at them by:
Code:
cat /proc/blog/skip_wireguard_port
cat /proc/blog/skip_wireguard_network

You can add/remove entries here to experiment:
Code:
echo "add 172.16.1.1/32" >> /proc/blog/skip_wireguard_network
echo "del 172.16.1.1/32" >> /proc/blog/skip_wireguard_network

Source: https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-830466
https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-815092

If you change Wireguard port without fw knowing you may skip the bypass. The reason for this bypass is incompability and could show as extremely poor speeds, syslog filling up with error message, router instability et.c.
Oh snap thank you! I'll try this.
 
The flowcache bypass uses 2 files to record local IP and port that should be bypassed. You can look at them by:
Code:
cat /proc/blog/skip_wireguard_port
cat /proc/blog/skip_wireguard_network

You can add/remove entries here to experiment:
Code:
echo "add 172.16.1.1/32" >> /proc/blog/skip_wireguard_network
echo "del 172.16.1.1/32" >> /proc/blog/skip_wireguard_network

Source: https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-830466
https://www.snbforums.com/threads/session-manager-4th-thread.81187/post-815092

If you change Wireguard port without fw knowing you may skip the bypass. The reason for this bypass is incompability and could show as extremely poor speeds, syslog filling up with error message, router instability et.c.
Huh interestingly port 1443 was already in this list.. hmm
 
Huh interestingly port 1443 was already in this list.. hmm
If it's in the list it means this port will be bypassed and process by sw, which is why you see core1 spiking (sw nat only uses core 1, Wireguard encryption uses all cores).

What if you remove it?
 
If it's in the list it means this port will be bypassed and process by sw, which is why you see core1 spiking (sw nat only uses core 1, Wireguard encryption uses all cores).

What if you remove it?
I'll try in a minute but port 1337 is also in the list and it's seemingly going through NAT acceleration just fine so that is why it is confusing me.
 
I'll try in a minute but port 1337 is also in the list and it's seemingly going through NAT acceleration just fine so that is why it is confusing me.
I don't pretend to understand everything about FlowCache or the bypass. I don't know.

But 400-600Mb/s is the limit for data transfer with sw nat. Even if nat is not used I would expect reaching maybe 1000Mb/s due to encryption processing. If you get well above 2Gb/s I have to wonder if your test is over Wireguard at all?
 
I don't pretend to understand everything about FlowCache or the bypass. I don't know.

But 400-600Mb/s is the limit for data transfer with sw nat. Even if nat is not used I would expect reaching maybe 1000Mb/s due to encryption processing. If you get well above 2Gb/s I have to wonder if your test is over Wireguard at all?
The router isn't doing the work of the transfer wireguard encryption on the client side.. only the client machine on the lan which is a 16 core 5950x with a 10gb ethernet card. It doesn't always hit 2gb but it definitely is running it through wireguard as long as it doesn't hit this oddity which seems to not happen when it's running over port 1337. The router itself can easily pull it via it's speed test function so I assume as long as the acceleration chip is involved it can go much higher.
 
The router isn't doing the work of the transfer wireguard encryption on the client side.. only the client machine on the lan which is a 16 core 5950x with a 10gb ethernet card.
Wait, your router is not the wireguard client? It's just passing the data?

Then what are these ports doing in the blog bypass? Do you have other wireguard vpn on router using these ports?
 
Wait, your router is not the wireguard client? It's just passing the data?

Then what are these ports doing in the blog bypass? Do you have other wireguard vpn on router using these ports?
The VPN service I use offers wireguard on ports 1337 and 1443. If you use their client it alters the port depending on which server it's connecting to at that location. I can use a "configuration" generator to generate configs for a location and then which port. After I notice in wireshark it altering back and for I used to generator to make configs for both 1337 and 1443 and it seems if it goes out 1443 it spikes the router's CPU to pass the traffic out the wan(not using NAT acceleration). If it goes out 1337 it seems to use the nat accelerator. I have no idea why it does this but I'm just changing my dockers to use that port and bam.. full speed vpns and such.
 
I had a wg config that was working but for some reason after I rebooted the server that was using it. It went back to using a whole core on my router. It's so weird.
 
I had a wg config that was working but for some reason after I rebooted the server that was using it. It went back to using a whole core on my router. It's so weird.
If I understand you right, you are connecting to the same server:port on the router (as these ports are in the bypass list) for some reason. Then trying to connect to same server:port from a lan client.
I would think that your issue arise from the bypass on the router but also affects your lan client due to the same port usage. But it's a guess. But if I'm right, there nothing anyone can do about it.

If you temporarily turn off wireguard on the router does that change anything?
Do you have to run Wireguard on the router?
Do you have to use the same ports?
 
If I understand you right, you are connecting to the same server:port on the router (as these ports are in the bypass list) for some reason. Then trying to connect to same server:port from a lan client.
I would think that your issue arise from the bypass on the router but also affects your lan client due to the same port usage. But it's a guess. But if I'm right, there nothing anyone can do about it.

If you temporarily turn off wireguard on the router does that change anything?
Do you have to run Wireguard on the router?
Do you have to use the same ports?
Turning off the torguard VPN server on the router itself does not change it. It appears using the two different ports doesn't change it either.

I guess also I didn't explain it well in the OP but

LAN CLIENT -> Wireguard server on the internet is basically what I'm attempting to do. Sometimes the router seems like it uses the NAT acceleration and other times it seems like it doesn't. I'm unsure what causes it to not and what causes to to do that. I might just try fully resetting my router and setting it up from scratch though that would be a super pain in the butt.

Sometimes though it works if I cycle through configurations on the lan client and I can get full wirespeed with no CPU usage showing on the router. Sometimes though it(seems like most of the time these days) it's 99%-100% utilization on the router.
 
Turning off the torguard VPN server on the router itself does not change it. It appears using the two different ports doesn't change it either.
Alright, but you stated earlier that your 2 port were present in the blog bypass files. They must have been put there by something you configured on your router.


LAN CLIENT -> Wireguard server on the internet is basically what I'm attempting to do. Sometimes the router seems like it uses the NAT acceleration and other times it seems like it doesn't. I'm unsure what causes it to not and what causes to to do that. I might just try fully resetting my router and setting it up from scratch though that would be a super pain in the butt.
I get the setup from your last posts.

There are some things on your router that is incompatible with nat acceleration. Wireguard is one thing but with the blog bypass files it *should* only affect clients using the router tunnel, unless destination based rules are setup in vpndirector, then it may apply for your whole network.
QoS is another router feature incompatible with nat acceleration and may completally turn it off.
There may be more but I don't have a complete list.

Firstly, check the blog files on the router so that your PC ip is not included. Also check the port you are using is not in the list. If any of these are, there is probably your issue and you should find out why these are in the lists.

If they are not in the list, you can check global status by
Code:
fc status
And compare output when high resp low speed
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top