mwarning / zerotier-openwrt

A OpenWrt package for ZeroTier One - Pull requests are welcome!
692 stars 145 forks source link

Very high CPU usage (OpenWrt 18.06.1 on WNDR4300) #39

Closed alexforencich closed 6 years ago

alexforencich commented 6 years ago

Under 18.06.1, zerotier (1.2.8) seems to be using an unusually large amount of CPU time. Without zerotier running, the load is less than 1. Upon starting zerotier, the load jumps to around 4. Any connection involving zerotier does not perform well - lagging SSH, LuCI pages load very slowly and unreliably, etc.

This issue does not seem to be present on 18.06.0, or is at least less severe. Under 18.06.0 with zerotier running, the load is around 1. SSH and LuCI are both relatively responsive.

mwarning commented 6 years ago

Was OpenWrt 18.6.0 also running zerotier 1.2.8?

alexforencich commented 6 years ago

I rolled back to 18.06.0, and it looks like it's running 1.2.8-2. I presume opkg installed 1.2.8-2 under 18.06.1 as well.

alexforencich commented 6 years ago

Looks like with zerotier 1.2.8-2 on openwrt 18.06.0 seems to use a lot of CPU as well, top reports it as using 15-50% continuously even with less than 1 KB/s of traffic through the ZT interface

alexforencich commented 6 years ago

I did another experiment: I left zerotier running, but left all associated networks. It still sits on top of the top process list, consuming usually around 20%, but periodically dropping to 0 or spiking to 50%. Shouldn't zerotier be mostly idle when not associated with any networks?

mwarning commented 6 years ago

Actually, I do not know how much processing time ZT uses. But it is meant for smartphones as least powerful systems. So a Wi-Fi router is somewhat out of the league in terms of processing power.

alexforencich commented 6 years ago

Hmm, I just tried upgrading to OpenWrt 18.6.1 and installing zerotier again and the usage seems more reasonable. Seems to be idling around 6%, even when connected to one network. And load is around 0.3-0.5. However, I did notice that opening up the default LuCI status page in the browser results in a load of like 4. So maybe last time I had that open in a tab and didn't realize it.

mwarning commented 6 years ago

Anyway, good to know. :-)