关于频繁小字节包传送流量的问题

ensoniq 2003-08-04 02:31:54
因为要开发实时应用(强调响应时间),需要用到短时间内大量发送尺寸较小(64字节以下)的UDP包,每秒100个以上。在LAN上面应用时,一点问题也没有,粗粗测试以下似乎10M网都可以传到600包/秒,但在ADSL上面应用时,发现每秒传送60包以上都非常困难。
我对网络底层的了解非常有限,刚才在网上找了一下也没有找到很相关的介绍。盼望高手指点:这样的问题是怎样会造成的?是不是因为底层某一级传输时候的对齐算法?有没有简单的解决办法?在这种频繁发送UDP包的情况下,对网络总体资源的占用有多大?
...全文
46 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
ensoniq 2003-12-05
  • 打赏
  • 举报
回复
回应要考虑的,但是是另外一回事了,这要看更上层的实现了,如果要频繁响应自然也会占掉一些带宽。用捎带回应之类的方法应该可以减少包数,也不会有太大的开销。
flyhorseli 2003-11-25
  • 打赏
  • 举报
回复
问一下:
是不断发送报告状态的包吗?虽然您用的是UDP,在循环发送UDP的的时候用不用得到另一端的回应?
Fly1980 2003-11-24
  • 打赏
  • 举报
回复
gz
awjx 2003-11-24
  • 打赏
  • 举报
回复
UDP只适合局域网,否则要处理很多细节
《用TCP/IP进行网际互联》(一)
其中的UDP章节有详解!
lucky2all 2003-11-24
  • 打赏
  • 举报
回复
硬件链路还是有影响的,比如ddn,xdsl等,尽管都是ip网络
ensoniq 2003-11-23
  • 打赏
  • 举报
回复
怕不是nagle的问题,因为用的是UDP。
现在问题已经差不多解决,通过sniffer分析了所有的包,这样就接近于理论值。
ADSL的问题仍然无法理解。
cpluser 2003-08-11
  • 打赏
  • 举报
回复
gz
caimouse 2003-08-08
  • 打赏
  • 举报
回复
你算一下双方的通迅带宽了.
http://www.codediy.com/index.htm
yyc_csdn 2003-08-08
  • 打赏
  • 举报
回复
TCP_NODELAY
The TCP_NODELAY option is specific to TCP/IP service providers. The Nagle algorithm is disabled if the TCP_NODELAY option is enabled (and vice versa). The process involves buffering send data when there is unacknowledged data already in flight or buffering send data until a full-size packet can be sent. It is highly recommended that TCP/IP service providers enable the Nagle Algorithm by default, and for the vast majority of application protocols the Nagle Algorithm can deliver significant performance enhancements. However, for some applications this algorithm can impede performance, and TCP_NODELAY can be used to turn it off. These are applications where many small messages are sent, and the time delays between the messages are maintained. Application writers should not set TCP_NODELAY unless the impact of doing so is well-understood and desired because setting TCP_NODELAY can have a significant negative impact on network and application performance.
yyc_csdn 2003-08-08
  • 打赏
  • 举报
回复
用setSockOpt将TCP_NODELAY开关打开

TCP_NODELAY BOOL Disables the Nagle algorithm for send coalescing.
Fly1980 2003-08-08
  • 打赏
  • 举报
回复
gz
Xcoder 2003-08-04
  • 打赏
  • 举报
回复
gz
szjay 2003-08-04
  • 打赏
  • 举报
回复
ting

4,354

社区成员

发帖
与我相关
我的任务
社区描述
通信技术相关讨论
社区管理员
  • 网络通信
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧