Conversation
Now, kcp is used for XDNS, so like mtu, the restriction on tti should also be removed. This is because when we use recursive-resolver, the tti may increase. i test for some random recursive resolver and it takes 400-600 ms to receive answer from my server, so tti should be set to 200-300.
This reverts commit a8c8a3a.
Now, kcp is used for XDNS, so like mtu, the restriction on tti should also be removed. This is because when we use recursive-resolver, the tti may increase. i test for some random recursive resolver and it takes 400-600 ms to receive answer from my server, so tti should be set to 200-300.
|
@RPRX |
|
为什么你会觉得最佳tti是rtt的一半? |
|
for recursive-resolver, certainly, the time it takes for the query to reach server is longer than the time it takes for the response to reach client. I don't read the the algorithm exactly, but logically tti should be as accurate as possible, to make the speed closer to what the user has set. Anyway, 100 is too low and needs to be increased. |
|
但是最后这个值还要被直接乘20... |
|
这里最后算出来的值是对于每次 flush tti 越低 flush 越频繁 所以它计算出的值才和tti负相关 |
Xray-core/transport/internet/kcp/sending.go Line 324 in 9514e98
哎现在的人 |
|
|
For the server side, you can set a larger value, with a maximum of around 972, but generally it's recommended to keep it below 900.
Yes, it's a known issue and should have been fixed in #5657. |
|
Also the name "mtu" is misleading, "mtu" is used for ip-header+udp/tcp-header+payload size, and in tun, the name "mtu" is chosen correctly, but here it is used for maximum udp-payload size. @Fangliding please update the doc and mention this, but i think it is better to rename it to "applicationMTU" or "maxPayload" |
|
mtu的确是误导命名 一般它特指链路层最大载荷 |

Now, kcp is used for XDNS, so like mtu, the restriction on tti should also be removed.
This is because when we use recursive-resolver, the tti may increase.
i test for some random recursive resolver and it takes 400-600 ms to receive answer from my server, so tti should be set to 200-300.