-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] CPU usage is high at irregular intervals (heap and profile information has been collected) #1273
Comments
windows 也遇到了 |
/adapter/outboundgroup/groupbase.go 里的GetProxies函数调用过多的模式匹配 |
如果你 profile 是正确的,几乎所有 CPU 都消耗在了 H2,是否使用了相关协议的节点 |
我这边也是用hysteria2节点时遇到问题,配置文件很简单,关于节点的部分配置如下: proxies:
- name: 测试节点
password: 88888888-8888-8888-8888-888888888888
port: 8888
server: example.com
skip-cert-verify: false
tfo: true
type: hysteria2
udp: true |
并且CPU占用是一阵一阵上升,通过任务管理器得性能监视可以看到波浪状,并不是一直爆满。更新到v1.18.4后暂时没有再出现问题。 |
试着写了下,仅供参考 |
修了下bug |
那暂时关闭此问题 |
想了想,去掉了 pp.follower = nil |
这样应该 不用加lock这样也能保证不会返回nil |
或者使用channel,能够避免管理锁的负担。然后provider,groupbase就不需要加锁了,而且更方便实现。我再改改。 |
主要是PATCH6/6 |
Verify steps
Operating System
Linux
System Version
immortalWrt 23.05-SNAPSHOT r27694-e540dc745a / LuCI openwrt-23.05 branch git-24.092.44091-d24c2e3
Mihomo Version
Mihomo Meta alpha-fe88f0e linux amd64 with go1.22.2 Wed May 15 07:40:07 UTC 2024
Use tags: with_gvisor
profile.zip
heap.zip
config.yaml.zip
Configuration File
Please see [config.yaml.zip](https://github.com/MetaCubeX/mihomo/files/15360383/config.yaml.zip)
Description
The issue I'm facing is that mihomo consistently consumes 50% of the processing power of my dual-core, dual-thread (2C/2T) CPU, resulting in an average load of 1.00 across all cores.
Upon restarting mihomo (not killing it, just by API), the CPU usage normalizes to a consistent average load of 0.01 on each core.
Reproduction Steps
Unfortunately, this high CPU utilization problem recurs irregularly over time. Due to its sporadic nature, I regret that I cannot provide specific steps to reproduce it; however, I have activated debug mode and gathered heap and profile data during instances of elevated CPU usage.
Logs
No response
The text was updated successfully, but these errors were encountered: