Wireguard + Ethernet -> Higher CPU Load

Hi all,
I am using wireguard for a while now along with a wifi connection. I noticed, after switching to an ethernet connection, that the cpu load is constantly at 20% and the fan noise on my laptop is increasing remarkably. If i disable wireguard, the cpu load goes back to normal. Pf does not play a role, because the second thing i did was to disable it without any effects. Also, tcpdump the wireguard interface doesn't reveal any unusual outgoing/incoming traffic.

My top output when using ethernet connection + wireguard:
Code:
last pid: 97547;  load averages:    1,83,    2,03,    1,96; battery: 97%                                                                                              up 0+03:30:32  18:25:22
989 threads:   9 running, 952 sleeping, 28 waiting
CPU 0:  9,1% user,  0,0% nice, 21,4% system,  0,6% interrupt, 68,9% idle
CPU 1: 11,0% user,  0,0% nice, 23,0% system,  0,9% interrupt, 65,1% idle
CPU 2: 15,4% user,  0,0% nice, 20,4% system,  0,3% interrupt, 63,8% idle
CPU 3: 12,9% user,  0,0% nice, 18,2% system,  2,5% interrupt, 66,4% idle
CPU 4: 10,7% user,  0,0% nice, 20,1% system,  1,6% interrupt, 67,6% idle
CPU 5: 10,4% user,  0,0% nice, 23,3% system,  0,6% interrupt, 65,7% idle
Mem: 758M Active, 1414M Inact, 17M Laundry, 2372M Wired, 76K Buf, 2782M Free
ARC: 1340M Total, 712M MFU, 582M MRU, 666K Anon, 7243K Header, 27M Other
     1187M Compressed, 2397M Uncompressed, 2,02:1 Ratio

  PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
   11 root        199 ki31     0B    96K CPU4     4 145:28  67,21% [idle{idle: cpu4}]
   11 root        199 ki31     0B    96K RUN      5 145:10  66,54% [idle{idle: cpu5}]
   11 root        199 ki31     0B    96K CPU3     3 147:10  66,36% [idle{idle: cpu3}]
   11 root        199 ki31     0B    96K CPU0     0 144:43  66,16% [idle{idle: cpu0}]
   11 root        199 ki31     0B    96K RUN      1 144:11  65,86% [idle{idle: cpu1}]
   11 root        199 ki31     0B    96K RUN      2 143:52  64,61% [idle{idle: cpu2}]
43518 root         95    0    16M  4792K CPU4     4   2:57  19,32% /usr/local/bin/bash /usr/local/bin/wg-quick up vpn-de-223
 6318 user          1    0   106M    50M select   5   0:17   5,45% /usr/local/bin/xfce4-terminal{xfce4-terminal}
 8864 _dhcp         1    0    14M  3084K select   1   5:04   2,60% dhclient: ue0 (dhclient)

ifconfig output of the ethernet interface:
Code:
ue0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
    options=68009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    ether xx:xx:xx:xx:xx:xx
    inet 192.xx.xx.xx netmask 0xffffff00 broadcast 192.xx.xx.xx
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Does anyone know what could cause the increased cpu load? Where could i debug further?
 
Also, wg-quick is running this command route -n monitor | grep -E --line-buffered 'iface'. Only on ethernet, it looks like this:

Code:
21:00:21.084 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.097 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.101 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.103 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.105 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.109 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.111 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.113 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.117 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.120 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.126 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.131 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.133 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.136 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.141 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.146 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.151 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.156 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.160 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.162 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.164 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.197 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.199 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.201 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.203 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.221 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.224 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.227 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.230 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.233 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.236 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.240 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.242 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.244 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.246 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.326 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.331 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.333 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.335 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.371 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.373 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.375 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500
21:00:21.378 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.381 PID 69562 add/repl iface iface#5 ue0 admin UP oper UP mtu 1500
21:00:21.383 PID 69562 add/repl iface iface#5 ue0 admin UP oper DOWN mtu 1500

I guess, these messages do have something to do with the cpu load.

If I stop wireguard, these messages stop showing.
 
ue is usually an usb adapter - so pretty much everything needs to go through the CPU, hence the high load and latency. As usual: for proper, reliable networking, always use a real NIC.
 
Yes i am using an USB ethernet adapter (ue) on my laptop. The laptop is connected via usb-c to a docking station with a physical ethernet interface.

I also have a NAS with a similar setup (ethernet + wireguard). However the ethernet interface there is a real one (dwc) with no flattering.
 
Back
Top