Docker tab CPU % reads low on hybrid Intel CPUs (Hyper-Threaded P-cores plus E-cores)

未关闭
#2,802 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@chodeus 已经在做这个了。

开始于 2026年10月28日。

  • #2803 来自 @chodeus —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
docker, php
领域
devtools

调研方向

The issue points to DockerContainers.page:218; start by reading how that line derives the CPU divisor and compare it with the reported thread_siblings_list groups and docker info NCPU value. Reproduce the Docker tab reading on a hybrid Intel CPU if available. Done when a container using one logical CPU is shown with the expected CPU percentage; pull request #2803 is already open against this issue.

由索引模型根据 Issue 内容生成。

描述

The Docker tab's CPU column divides each container's docker stats CPU % by count($cpus)*count(preg_split('/[,-]/',$cpus[0])) (DockerContainers.page:218): the number of cores times the threads of the first core. On Intel 12th–14th gen CPUs with E-cores, the first core is a Hyper-Threaded P-core (0-1) while each E-core has one thread, so the divisor is larger than the number of logical CPUs.

On an i5-14600K (6 Hyper-Threaded P-cores + 8 E-cores, 20 logical CPUs), Unraid 7.3.4:

  • thread_siblings_list has 14 groups, the first 0-1, so the page divides by 28
  • docker stats counts one logical CPU as 100% (the daemon scales by the online CPUs in /proc/stat); docker info reports NCPU 20
  • a container busy on exactly one thread (--cpus=1, about 100% in docker stats) shows 3.6% on the Docker tab; one thread of 20 is 5%, and /proc/stat shows the whole machine 4.7 points busier while it runs

Every container reads 29% low on this CPU, and 33% low on an i9-13900K (divides by 48 instead of 32). CPUs whose cores all have the same thread count (no E-cores, no Hyper-Threading, AMD, Xeon, Core Ultra) are not affected. Present on master and 7.3.

主要语言
PHP
星标
266
派生
116
平均合并
1 天 5 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

unraid/webgui 的其他 Issue

查看 unraid/webgui 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。