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

优化内存占用 #10

Closed
aptx17 opened this issue Nov 26, 2020 · 9 comments
Closed

优化内存占用 #10

aptx17 opened this issue Nov 26, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@aptx17
Copy link

aptx17 commented Nov 26, 2020

哥,后面会有xctl吗?发现内置json一启动就占用将近80M内存,openwrt有点吃不消。
20201126230406892
1.0

20201126225820157
4.32.1

@RPRX
Copy link
Member

RPRX commented Nov 26, 2020

理论上不会这样,v2ray-core v4.32.1 也是不依赖 ctl,Xray-core v1.0.0 进一步吃了 ctl,多试几次看看。

@aptx17
Copy link
Author

aptx17 commented Nov 26, 2020

理论上不会这样,v2ray-core v4.32.1 也是不依赖 ctl,Xray-core v1.0.0 进一步吃了 ctl,多试几次看看。

哦~忘了说了,我的4.32.1是自编译有ctl的,如果用官方的也是会将近80M 。
VPS服务器x86平台,XEN \ KVM,debian9、10刚试了是正常的15-20M启动内存范围。
不知道是不是我路由器armv8 cpu架构的问题(内核5.4)。

@RPRX
Copy link
Member

RPRX commented Nov 27, 2020

等等看有无更多反馈,你可以先尝试编译精简版的 Xray

但若只在一个机器上有差异,就比较奇怪了

@shenlijun
Copy link

家里搞一个all in one,上面做网关,你就不会在意这些细节了

@RPRX
Copy link
Member

RPRX commented Dec 5, 2020

#38

看来这的确是个值得关注的问题

@RPRX
Copy link
Member

RPRX commented Dec 5, 2020

https://github.com/2dust/v2rayNG/issues

NG 一些 issue 可能是这个原因,似乎只有 arm64 存在这种问题

之后会研究对应的解决方案

@aptx17
Copy link
Author

aptx17 commented Dec 5, 2020

#38

看来这的确是个值得关注的问题

嗯嗯,他说的那个是上图虚拟内存VIRT吧?就是v2ray向系统申请的虚拟内存(如果小机自身内存过小,虚拟内存没设置,就会启动不起来),虽然不会全用到,不过4800M将近4G的申请,感觉是不是有点大?我记得没爆出aead重放问题之前的v2ray版本,申请的虚拟内存好像是780M左右(不过这又是另个问题了)。 我现在的是RES实时内存,一启动就80M。可能确实是arm64的问题。下图帮你测了4.31.3,有ctl是正常的。另台arm64机器过几天到了在试试看吧。
20201206015124

@RPRX RPRX added the enhancement New feature or request label Dec 6, 2020
@RPRX RPRX changed the title 能提供ctl吗? 优化内存占用 Dec 6, 2020
@RPRX
Copy link
Member

RPRX commented Dec 15, 2020

#68 (comment)

@RPRX RPRX closed this as completed Dec 15, 2020
@RPRX
Copy link
Member

RPRX commented Dec 19, 2020

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

No branches or pull requests

3 participants