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

connector性能瓶颈 #778

Open
adjsnlxx opened this issue Aug 26, 2023 · 8 comments
Open

connector性能瓶颈 #778

adjsnlxx opened this issue Aug 26, 2023 · 8 comments

Comments

@adjsnlxx
Copy link

对于实时对战游戏,状态同步,每秒20个数据包,单个connector 只能支持100在线,cpu占用 50% 不知大佬们有什么优化方案?
还是说使用其他语言实现connnector,但怎么融入到pinus框架呢

@wangjunxiao0207
Copy link

有没有分析具体哪个逻辑是瓶颈,你这CPU 50%,还有很大的提升空间

@adjsnlxx
Copy link
Author

image
目前主要发现是在send

@adjsnlxx
Copy link
Author

connector 只有接收客户端的消息,转发到game服。还有接收game服,转发给客户端

@whtiehack
Copy link
Member

whtiehack commented Sep 1, 2023

有没有试过关掉protobuf ? 感觉可以先关掉protobuf 试试. 之前我们测试大量cpu是被protobuf占用掉的
理论上来讲. connector只做消息转发的话消耗是很少的

@adjsnlxx
Copy link
Author

adjsnlxx commented Sep 1, 2023

有没有试过关掉protobuf ? 感觉可以先关掉protobuf 试试. 之前我们测试大量cpu是被protobuf占用掉的 理论上来讲. connector只做消息转发的话消耗是很少的

看占比,protobuff并不高,在encode/decode上

@whtiehack
Copy link
Member

你这个是什么工具跑的? 我记得当前我用的 chrome的 inspect.

@adjsnlxx
Copy link
Author

adjsnlxx commented Sep 2, 2023

你这个是什么工具跑的? 我记得当前我用的 chrome的 inspect.

easy-monitor

@whtiehack
Copy link
Member

你检查一下是不是你的带宽跑满了.

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

3 participants