Engarde - Lag spikes and low TX

Hello,

I am experiencing lag spikes in online games only when using engarde. The nature of lag spikes is such that sometimes my ping shoots up and keeps on increasing until it either returns to normal within few seconds or I get disconnected.

I have tried using each of my internet separately to isolate any issues, however the lag issue remains. This issue is persistent as long as I am using engarde with either single or dual internets. It never happens with normal WireGuard in SmoothWAN. So this is clearly something related to engarde (client or server side settings).

Further, I noticed that the ā€œTXā€ data usage is very low as shown in SmoothWAN, for example:
RX: 31.59 GB (27575987 Pkts.)
TX: 3.59 GB (23370358 Pkts.)

In my limited knowledge, I had thought maybe itā€™s something to do with MTU or ā€˜keep persistent = 25ā€™ settings but changing it didnā€™t seem to have an effect - Iā€™m not sure.

Could any of this information give a clue about whatā€™s happening?

This may need to be set (writeTimeout and client): engarde/engarde.yml.sample at cf9b487167c826cbdcfa2fa6ae39d04fac5e9ba0 Ā· porech/engarde Ā· GitHub

You can fork SmoothWAN-docs repo, make the change then update the cloud-init script to point to your fork.

1 Like

I really appreciate it! Iā€™ve set writeTimeout to 1000 and clientTimeout to 30 that eliminated the lag spike so far. But I still experience gaming lag with Engarde, even when the ping isnā€™t fluctuating, as opposed to a stable single WireGuard connection. Do you think the gap between RX and TX causes lag?

RX: 34.65 GB (32934957 Pkts.)
TX: 11.03 GB (25936582 Pkts.)

Also, I note that it mostly causes ping/lag issue when itā€™s downloading. Both internets have sufficient bandwidths and donā€™t display this behaviour when using single WireGuard connection.

Have you tried using SQM to limit each WAN? (not SQM on wireguard)
Do note that if the fastest connection has high latency, the slower wonā€™t reduce it.
For gaming I recommend setting all WANs speed in SQM to 10% less than the slowest WAN.
Use fq_codel if used on off-the-shelf router due to CPU time.

Iā€™ve tried SQM to limit each WAN as well as fq_codel. But this had no noticeable effects. I also tried SQM on LAN which did seem to improve ping / spikes somewhat, but the problem is definitely there. I think the problem is packet loss. Iā€™m using Raspberry Pi 4.

What are your connection speeds?
You may need a PC for 100Mbit with Engarde.

One is 15 Mpbs and the other is 50 Mbps. I have tried limiting speeds or SQM to equal or lower of the two but didnā€™t make any difference.

I think itā€™s important to mention the engarde server is located a bit far (ping: 140ms). Its normal and consistent for this distance. Its only the occasional random lag spikes, or caused by certain actions in game, that result in disconnect or cause rubberbanding in game (only when using engarde). Ping also increases when downloading.

It may be worth check other server, as well as reducing the MTU to 1280 in case itā€™s a firewall issue.
This assumes that the spikes are caused by any large network activity.

Hi Talal, Iā€™ve experimented a lot in terms of MTU and SQM but that didnā€™t work. Interestingly Iā€™ve noticed that when I run wireguard on my PC connected to the router that has engarde, basically VPN on VPN, then I donā€™t see these issues anymore. Does this give any clue as to whatā€™s happening?