If there are 100 and more peers in Wireguard Server tunnel, the pertaining Web UI gets very slow even on best available hardware (newest EPYC server). Especially “Ad peer” and “Unsaved changes - Apply changes” or reading the Wireguard page itself.
On my machine, which is quite fast, the API call (/usr/libexec/rpcd/ns.wireguard call list-servers) takes about 30 seconds with 103 peers.
Do you really have so many peers?
If so, we can try to find and optimization.
500 ![]()
and yes 30 and more seconds is annoying…
but this is just a small detail
I did a quick test for an optimization and it seems to work quite well, but I did not tested it thoroughly for regressions: fix(ns-api): wireguard optimize list by gsanchietti · Pull Request #1494 · NethServer/nethsecurity · GitHub
You can test it using this commands:
cp /usr/libexec/rpcd/ns.wireguard /usr/libexec/rpcd/ns.wireguard.ori
curl https://raw.githubusercontent.com/NethServer/nethsecurity/refs/heads/optimize_wireguard/packages/ns-api/files/ns.wireguard > /usr/libexec/rpcd/ns.wireguard
chmod a+x /usr/libexec/rpcd/ns.wireguard
Great, with 61 peers it was 5.822s and now it’s 0.094s, faster about factor 60!
Never figured that a table like this would’ve used like that.
Was planned to be used a tunnel-only, since I’m tackling wireguard problems next, might add some pagination and search too while I am at it.