Giter Club home page Giter Club logo

Comments (2)

cnbatch avatar cnbatch commented on May 18, 2024

First of all, it needs to be explained that kcptube is not specifically designed for high-traffic scenarios, but primarily for reducing latency.

However, the speed you measured is really too low, which suggests that either your ISP is strictly throttling UDP traffic or the kcptube bandwidth settings are incorrect.

I'm not sure how far the discussion and research on KCP has gone in the English world, so I'll quote and use the Chinese explanation in the following part.

KCP本身有一个快速重传机制,用于对抗丢包、降低延迟。中文世界一直流传着这么一个说法:比TCP浪费10%-20%的带宽。kcptube在使用该机制时会相对激进,尤其是fast模式,造成的流量浪费一点都不少,最高可达50%。
为了尽可能减少流量浪费,kcptube提供了带宽设置选项。如果该选项的值高于线路实际带宽,那就会造成kcptube以为当前线路丢包率太高,从而发送更多的冗余数据包,最终恶性循环导致有效流量过低。
所以,请把inbound_bandwidth以及outbound_bandwidth的值设置成低于或等于当前线路的实际带宽数值。

另一方面,由于kcptube激进地尝试降低延迟,会导致高流量时CPU使用率偏高,并且最大的流量值会受到CPU性能的限制。

如果调整过两个bandwidth设置后,流量速率还是不高的话,建议使用另一个工具:udphop,并开启FEC选项。
对于wireguard组网而言,udphop是更好的选择。

The Chinese Text to English:

KCP itself has a fast retransmission mechanism to combat packet loss and reduce latency. There is a saying in the Chinese world that it wastes 10%-20% more bandwidth than TCP. kcptube is relatively aggressive when using this mechanism, especially in ‘fast’ mode, causing a lot of bandwidth waste, up to a maximum of 50%.

In order to minimize bandwidth waste, kcptube provides bandwidth setting options. If the value of these options are higher than the actual bandwidth of the broadband line, they will cause kcptube to believe that the loss rate of current line is too high, and thus send more redundant data packets, which will eventually lead to a vicious cycle of low effective throughput.

Therefore, please set the values of inbound_bandwidth and outbound_bandwidth to be lower than or equal to the actual bandwidth of the current line.

On the other hand, due to kcptube's aggressive attempts to reduce latency, it will lead to high CPU usage under high traffic conditions, and the maximum throughput will be limited by CPU performance.

If the traffic is still not high after adjusting the two bandwidth settings, it is recommended to use another tool: udphop, and enable the FEC option.

udphop is a better choice for wireguard networking.

from kcptube.

cnbatch avatar cnbatch commented on May 18, 2024

I've also explained in 低延迟与大流量
English Version is not ready yet. You might need to use AI translation or some other translator.

from kcptube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.