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

百兆数据传输效率 #135

Open
hjhsamuel opened this issue Dec 26, 2022 · 2 comments
Open

百兆数据传输效率 #135

hjhsamuel opened this issue Dec 26, 2022 · 2 comments

Comments

@hjhsamuel
Copy link

参考Example中的protobuf实例进行了初步测试,改动了proto文件:
message SendMessageReq { bytes Body = 1; }
message SendMessageRsp { bool Ok = 1; }
每次传递的Body数据量在百兆左右,发现每个连接在初次进行数据传输时,都存在近一分钟左右的耗时,目前怀疑是Buffer扩容的耗时导致,请教一下,针对偶尔存在百兆数据传输的业务情形下,该如何使用或者有哪些思路优化gev的数据传输效率呢?

@Allenxuxu
Copy link
Owner

参考Example中的protobuf实例进行了初步测试,改动了proto文件: message SendMessageReq { bytes Body = 1; } message SendMessageRsp { bool Ok = 1; } 每次传递的Body数据量在百兆左右,发现每个连接在初次进行数据传输时,都存在近一分钟左右的耗时,目前怀疑是Buffer扩容的耗时导致,请教一下,针对偶尔存在百兆数据传输的业务情形下,该如何使用或者有哪些思路优化gev的数据传输效率呢?

可以提供一些 pprof 信息吗?

@lxzan
Copy link

lxzan commented May 29, 2023

可以参考WebSocket协议, 分片传输大包

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