zerotier / ZeroTierOne

A Smart Ethernet Switch for Earth
https://zerotier.com
Other
14.38k stars 1.68k forks source link

Latency Spikes on BSD Clients #1986

Closed laduke closed 1 year ago

laduke commented 1 year ago

If a node is joined to a network with many (~40) Manage Routes, there will be spikes in latency.

here we use gping -b 90 $physical_ip and gping -b 90 $zt_ip to get latency graphs over the real and virtual networks.

There are some 5ms blips when there are few routes. There are 60ms spikes when joined to a network with many routes.

few routes

few managed routes

many routes

many managed routes

In my tests, the routes don't have actual routers and subnets behind them, I just made a bunch of routes. But users are experiencing this on their real networks.

I suspect this is from the periodic calling of the _getRTEs() via ManageRoute::Sync().

This does Not happen on linux, just mac and freebsd, as far as I can tell.

laduke commented 1 year ago

zerotier-cli set $nwid allowManaged=1 and changing the network config (adjust the multicast limit for example) which triggers ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE

both trigger latency spikes and both of those call syncManagedStuff

laduke commented 1 year ago

fixed in dev