SelfhostedPro / Yacht

A web interface for managing docker containers with an emphasis on templating to provide 1 click deployments. Think of it like a decentralized app store for servers that anyone can make packages for.
MIT License
3.34k stars 159 forks source link

[Bug Report] CPU Resources not showing under dashboard #501

Closed TeenagedLime3 closed 1 month ago

TeenagedLime3 commented 2 years ago

Describe the bug When I open the dashboard tab the different containers do not show the CPU usage, only the RAM usage

To Reproduce Steps to reproduce the behavior:

  1. Go to the dashboard tab on the left side
  2. The containers are not showing CPU usage, even when the container is used

Expected behavior CPU usage changes depending on how much CPU resources the container is using

Screenshots image ^ Dashboard not showing cpu usage image ^ Docker CMD showing CPU usage of youtubedl-material during idle image ^ Docker CMD showing CPU usage of youtubedl-material during usage (to show it isnt just because the usage during idle is too low for yacht to detect)

Desktop (please complete the following information):

Additional context None

Logs https://pastebin.com/n17WxB2U <- yacht logs

wickedyoda commented 2 years ago

Please join at on Discord https://discord.io/selfhostedpros so we can communicate with you directly and understand more about the issue.

marcjmiller commented 2 years ago

I've looked into this a bit and have a few ideas on a fix. I'll work on making some time to look into this a bit deeper.

TeenagedLime3 commented 2 years ago

I've looked into this a bit and have a few ideas on a fix. I'll work on making some time to look into this a bit deeper.

Thanks!

wickedyoda commented 2 years ago

Welcome to our discord, 🤣

Lyliya commented 2 years ago

Same issue for me, have you found any solution ?

wickedyoda commented 2 years ago

Same issue for me, have you found any solution ?

Are you on an ARM-based CPU or running within WSL2?

Lyliya commented 2 years ago

I am running Debian 11 on a AMD Ryzen 7 1700X

wickedyoda commented 2 years ago

Part of the issue we determined is that ARM-based CPUs need an extra option set; you can find the instructions on the main GitHub page readme.MD.

Also, we found that the max CPU percentage for Yacht is 100%, because of some CPUs having multiple cores and showing as separate processers; docker is reporting 200 or 300% usage. Like is the sum of the processors. Via Google (https://rb.gy/o01uxr), there are many articles talking about the problem. We are looking at it and seeing if there is something we can do. It is a rare but known issue of Docker.

LuposX commented 1 year ago

Any updates on this? I have the same problem.

wickedyoda commented 1 year ago

The dashboard and the stats are being reworked for the next version. At https://github.com/SelfhostedPro/yacht-api, there will be changes coming down the line. Until then have you tried pulling with the :devel tag?

pbogre commented 1 year ago

i’m getting this same issue running yacht in a debian 12 proxmox vm

SelfhostedPro commented 1 year ago

i’m getting this same issue running yacht in a debian 12 proxmox vm

Are you able to use docker stats from the cli?

pbogre commented 1 year ago

Sure, I ran it while transcoding using jellyfin to test with high CPU usage, here’s the output of docker stats:

CONTAINER ID   NAME                  CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O         PIDS
c3efd07f0455   gossa                 0.00%     12.62MiB / 15.62GiB   0.08%     2.12MB / 0B       7.18MB / 98.3kB   8
9956a3c6bcda   flatnotes             0.11%     58.26MiB / 15.62GiB   0.36%     2.31MB / 7.39MB   51.7MB / 0B       2
a82e45fd437c   nginx-proxy-manager   0.37%     161.4MiB / 15.62GiB   1.01%     6.9MB / 1.27MB    116MB / 1.03GB    30
2bde1f02d14c   yacht                 0.12%     114.7MiB / 15.62GiB   0.72%     606kB / 12.6MB    50.5MB / 2.81MB   11
09c1f16ab243   syncthing             0.03%     65.19MiB / 15.62GiB   0.41%     28MB / 54.6MB     29.2MB / 8.34MB   29
ff20bb171e33   slskd                 1.67%     156.1MiB / 15.62GiB   0.98%     54.6MB / 10.4MB   113MB / 3.31MB    22
0f859c033f52   sonarr                0.01%     252.6MiB / 15.62GiB   1.58%     75.5MB / 2.65MB   94.4MB / 120MB    20
4feb10372d77   transmission          0.06%     11.95MiB / 15.62GiB   0.07%     14.8GB / 15.9GB   1.39MB / 3.01MB   13
b14aecf55990   radarr                0.13%     198.5MiB / 15.62GiB   1.24%     20.6MB / 16MB     149MB / 92.6MB    27
82ed0dba7e01   prowlarr              0.04%     177MiB / 15.62GiB     1.11%     26.2MB / 87.6MB   106MB / 103MB     24
8e8a88e63e35   jellyfin              470.31%   1.308GiB / 15.62GiB   8.38%     2.07MB / 69.3MB   25.9MB / 54.1MB   77

As you can see the cpu usage on jellyfin is very high (more than 100% because it is the sum of percentage of each core), however the yacht gui was reporting 0%. Perhaps something goes wrong with values higher than 100%? Even though the yacht gui has never reported above 2% cpu usage which is odd.

Edit: I also noticed weird behavior with the memory stats on yacht, since docker stats might say that the jellyfin process is using 900MB of memory, but yacht will say it's using 1.5GB. I haven't tested this much but i also noticed very inflated values of memory usage for some processes AFTER they were actually using that memory, so for example while downloading using transmissions i was getting around 8-10GB of memory usage reported on yacht, and even after it was done downloading the memory usage reported would be very high until i restarted it in the gui.

wickedyoda commented 1 year ago

We have a fix for arm processers on the main readme, have you tried applying it? Its normally only for arm hardware which are not showing their stats.