但是 UDP 套接字接收器缓冲区大小会影响延迟吗?
我将多播 UDP 套接字接收器缓冲区大小设置为一个大值以避免数据包丢失。我尝试使用较小的缓冲区大小,但没有看到任何延迟差异。我想知道它如何影响延迟?当应用程序的速度足以处理传入数据包时,较大的套接字缓冲区大小是否真的会影响延迟,为什么?
I am setting the multicast UDP socket receiver buffer size to a big value to avoid packet drop. I tried to use a small buffer size, I did not see any latency diff. I am wondering how does it impact latency? When the app is fast enough to handle incoming packets, does bigger socket buffer size really impact latency and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
UDP 延迟更多地取决于您传递流量的网络,而不是本地配置。小缓冲区大小意味着您会更频繁地丢弃高吞吐量流的数据包,但这在技术上不是延迟问题。延迟将受到本地计算机从缓冲区中拉出数据包的速度的影响,这可以忽略不计。
UDP latency is going to depend more on the network that you're passing the traffic through than the local configuration. Small buffer size will mean you drop packets more often for high throughput streams but that isn't technically a latency issue. Latency will be affected by your local machine by how fast you can pull packets out of the buffer which will be negligible.
它根本不会影响延迟。它只是使用额外的内存,这就是它可调的原因。
It doesn't impact latency at all. It just uses extra memory, that's why it's tuneable.