Comments (2)
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.
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)
- what is the meaning of the dport_refresh parameter? HOT 1
- About the MTU,using with wireguard HOT 2
- 客户端报告错误“open: Too many open files” HOT 4
- [feature request]能否考虑在同一个客户端配置文件增加多个端口转发 HOT 4
- 20231010版的传输问题 HOT 2
- Plz add official docker image to Docker Hub.
- [feature request]能否也考虑支持远程端口转发(或者叫反向端口转发) HOT 2
- 建议为用户说明一下/etc/sysctl.conf文件参数的设置 HOT 1
- 大容量文件下载随机中断的问题 HOT 18
- 关于FEC配置的一些疑问 HOT 4
- 20231202版本出现segfault HOT 1
- docker镜像load之后镜像的名称为<none> HOT 2
- KCPTube对UDP流量的转发是可靠传输还是非可靠传输? HOT 6
- wireguard via kcptube - did it work? HOT 1
- how to install wireguard in kcptube? HOT 3
- add to emulate a TCP connection(linux)? HOT 4
- kcp over udp2raw does not work well HOT 10
- fec无法使用 HOT 1
- kcptube segfault error HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kcptube.