high cpu load when network is absent

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
emacs
OpenVpn Newbie
Posts: 1
Joined: Sat Oct 29, 2022 9:08 pm

high cpu load when network is absent

Post by emacs » Thu Aug 17, 2023 12:57 pm

Hello,
I have a remote physical system that is connected to my openvpn-based "intranet". I'm using quotes here because it is a home-setup and not production-grade.

I don't have particular daily issues and overall i'm very satisfied with my experience so far.

There is a corner case which is a bit concerning though: if network goes down on the remote router, the remote client (running the vpn client) shows high cpu usage and thus high cpu temperature. This is a bit worrying to me as this is a physical host which is not in a refrigerated datacenter (a remote relative's house).

The underlying operating system is Rocky Linux 9.2, openvpn version is 2.5.9-1.el9 (from epel) and my configuration is pretty simple:

Code: Select all

client
remote 'vpn.mydomain.tld'
cipher AES-128-GCM
compress lzo
dev tun
dev-type tun
proto udp
port 1194
nobind
auth-nocache
script-security 2
persist-key
persist-tun
user nm-openvpn
group nm-openvpn

<ca> ...  </ca>
<cert> ... </cert>
<key> ... </key>

I've been looking around and what I think i could use is one of the follwing:
  • ping-restart
  • inactive
  • ping-exit
  • keepalive
I might pair this with a cronjob that restarts the tests the vpn connectivity and restarts the openvpn daemon if the connection is not up.

Can somebody provide me with some guidance and advice?


Thanks,
--
emacs

Post Reply