Skip to content
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

cpu占用异常 #295

Open
zbc258 opened this issue Jun 5, 2024 · 4 comments
Open

cpu占用异常 #295

zbc258 opened this issue Jun 5, 2024 · 4 comments

Comments

@zbc258
Copy link

zbc258 commented Jun 5, 2024

0.8.2版本,服务模式运行一小时以上,cpu占用开始飙升,重启服务后恢复正常,再等一小时左右问题再次出现:
image

@mokeyish
Copy link
Owner

mokeyish commented Jun 5, 2024

是不是开了,域名预读取?

@zbc258
Copy link
Author

zbc258 commented Jun 6, 2024

是不是开了,域名预读取?

还真是,这东西这么吃cpu的吗?以前版本我也开着,这次更新完没改配置就直接安装了。
关了占用就正常了。

@mokeyish
Copy link
Owner

mokeyish commented Jun 7, 2024

你可以自行编译,调高这个值。

const MIN_INTERVAL: Duration = Duration::from_secs(1);

@mokeyish
Copy link
Owner

mokeyish commented Jun 8, 2024

https://github.com/mokeyish/smartdns-rs/actions/runs/9427011136

你下载这个版本试试,我怀疑是你用的部分域名查询加测速慢,之前版本没有标记,重复发起相同域名的查询。所以往检查域名过期加了标记,如果正在查询就不再发起新的查询了。

另外还是如此,就配置环境变量PREFETCH_MIN_INTERVAL 单位是秒。增加最下检查的时间间隔。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants