High CPU utilisation with gluetun/wireguard and qbittorrent

Hi frens,

I just moved my torrent setup into docker containers and I am facing real high cpu utilisation while downloading. Way higher then when I used wireguard and rtorrent natively on my host.

my settings look like this:

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    cap_add:
      - NET_ADMIN
    networks:
      mvl-200:
        ipv4_address: 10.60.1.5
    ports:
      - 41870:41870
      - 41870:41870/udp
      - 80:80
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - WIREGUARD_PRESHARED_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - WIREGUARD_ADDRESSES=xxxxxxxxxxxxxxxxxxxxxx
      - SERVER_COUNTRIES=Netherlands
      - FIREWALL_VPN_INPUT_PORTS=xxxxxxxxxxx
    volumes:
      - /media/glueton:/gluetun

 qbittorrent:
      image: linuxserver/qbittorrent
      container_name: qbittorrent
      network_mode: service:gluetun
      environment:
        - PUID=1000
        - PGID=1000
        - TZ=Europe/Berlin
        - WEBUI_PORT=80
        - UMASK_SET=022
      volumes:
        - /media/qbittorent/config:/config
        - /media/moenas/media/Downloads:/downloads
      depends_on:
        - gluetun
      restart: always

networks:
  mvl-200:
    name: mvl-200

Any Ideas? It cannot be that qbittorent is that inefficient… Does wireguard need some specific settings which I might have overlooked?

qdm12/gluetun

Supports Wireguard both kernelspace and userspace

I would attempt to verify if the image is using kernel mode wireguard or userspace wireguard - the latter could easily explain heavy cpu usage.

Also check top while the machine is busy, this should show you the busy process. Hit “c” to show full commands.

I found an error with the linuxserver/qbittorent image and changed to another image, which solved the problem

Cheers

What was the error in the image? I am encountering the same issue?