Kcptun: 参数设定参考

Created on 17 May 2016  ·  3Comments  ·  Source: xtaci/kcptun

difference between fast2 fast normal and default

Most helpful comment

sndwnd/rcvwnd 设定参考

  1. sndwnd * mtu 不能超过上行带宽, rcvwnd * mtu 不能超过下行带宽
  2. 对延迟不敏感的情况,比如只用于数据传输,可以用MODE_FAST,20ms的内部时钟,默认值
  3. 对延迟敏感的情况,可以用FAST2模式,但必须严格注意第一条规则

All 3 comments

        switch mode {
        case MODE_FAST2:
                sess.kcp.NoDelay(1, 10, 2, 1)
        case MODE_FAST:
                sess.kcp.NoDelay(1, 20, 2, 1)
        case MODE_NORMAL:
                sess.kcp.NoDelay(0, 20, 0, 1)
        default:
                sess.kcp.NoDelay(0, 20, 0, 0)
        }

it's defined above in sess.go of kcp-go

sndwnd/rcvwnd 设定参考

  1. sndwnd * mtu 不能超过上行带宽, rcvwnd * mtu 不能超过下行带宽
  2. 对延迟不敏感的情况,比如只用于数据传输,可以用MODE_FAST,20ms的内部时钟,默认值
  3. 对延迟敏感的情况,可以用FAST2模式,但必须严格注意第一条规则

虽然我是 100M 的,但是实验表明 512 更适合我. 明天我换一台服务器试试.

Was this page helpful?
0 / 5 - 0 ratings