免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 21924 | 回复: 1
打印 上一主题 下一主题

[网络管理] 调整txqueuelen 有什么作用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-13 09:52 |只看该作者 |倒序浏览
系统默认的100
ifconfig ethN txqueuelen 1000
会对系统有什么影响?

论坛徽章:
0
2 [报告]
发表于 2012-03-28 22:15 |只看该作者
首先确定一点,这个参数对于ppp拨号上网或其他低带宽的网络作用较大,对于局域网作用不大,局域网中你可以将其设置成0,这样就会减少延时,对像telnet这样对交互式响应要求较高的应用是很有作用的。下面主要是分析ppp拨号中该参数对网络性能的影响:

txqueuelen如果过大,会影响交互式应用(延时会加长),比如telnet,在网络环境不佳时,延时会很大。
对于像3G这样的网络,如果应用层有大量的数据上传,txqueuelen过大,网络协议栈对数据的限制就会变小,这样可能会对驱动层造成一定的压力,严重的话,可能会导致驱动卡死。

txqueuelen如果过小,对交互式应用的响应效果会比较好,因为这个值较小时,对于大量数据的丢包率较高,这样会触发TCP加强对数据的重传(这里的理解可能不对),提高实时响应。但丢包率太大会影响我们数据传输的效率。

所以建议根据不用的应用需求与网络环境设置合理的txqueuelen。

如果使用ppp上网,上传的数据量不高并且需要较高的实时响应,建议将此参数调低一点。当然以现在的3G网络带宽,我们不需要设的太低,ppp中默认的3,我觉得也是电话线时代的经验值了,3G完全可以设置到50以上。

如果每秒上传的数据较多,建议将该参数设置大一点,比如100左右,但不能太高,毕竟我们的3g带宽有限,性能本来就不行,设置太高了不仅无效,反而会对对驱动造成压力。

下面是一封来自linux内核邮件,解释了txqueuelen与ppp性能的关系,可供参考:

Poor PPP performance and txqueuelen
From: Arthur Kelly (arthur@sevenkings.net)
Date: Thu Jan 06 2000 - 18:21:38 EST

?Next message: Mr. James W. Laferriere: "Re: Block device for EMU8K RAM"
?Previous message: James: "USB Mouse wheel"
?Next in thread: Gregory Maxwell: "Re: Poor PPP performance and txqueuelen"
?Reply: Gregory Maxwell: "Re: Poor PPP performance and txqueuelen"
?Messages sorted by:[ date ] [ thread ] [ subject ] [ author ]

--------------------------------------------------------------------------------



>From the archives:


>> If not, wouldn't it be better to keep txquueuelen high and
>> just grin and bear the latency for interactive use?
>
> No you want it smaller, this makes packet loss feedback happen much
> more quickly, and thus TCP's heuristics respond to the situation faster.
>
> David S. Miller


That does not work well here. And it seems to contradict the ethernet
default of 100 for txqueuelen.


I have a 2.2.14aa1 box routing between ethernet and dialup PPP
interfaces. With the default PPP txqueuelen of 10, or if I set the
PPP txqueuelen to a smaller value such as 3, I get dropped packets and
poor FTP performance thru the Linux router.


But if I set Linux PPP txqueuelen to 30 or more, there are no dropped
packets and FTP performance thru the Linux router is perfect.


In ppp.c, the default value for receive queue length is 32. In my
local ppp.c, I've also changed the default transmit queue length to
32, and it works much better now.




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/




--------------------------------------------------------------------------------
?Next message: Mr. James W. Laferriere: "Re: Block device for EMU8K RAM"
?Previous message: James: "USB Mouse wheel"
?Next in thread: Gregory Maxwell: "Re: Poor PPP performance and txqueuelen"
?Reply: Gregory Maxwell: "Re: Poor PPP performance and txqueuelen"
?Messages sorted by:[ date ] [ thread ] [ subject ] [ author ]

--------------------------------------------------------------------------------

This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:07 EST


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP