mirror of
https://github.com/skywind3000/kcp.git
synced 2024-12-25 22:50:09 +08:00
Page:
EN_KCP Benchmark
Pages
Cooperate With Tcp Server
EN_Cooperate With Tcp Server
EN_Flow Control for Users
EN_Home
EN_KCP Basic Usage
EN_KCP Benchmark
EN_KCP Best Practice
EN_KCP Feature
EN_Network Encryption
Flow Control for Users
HISTORY
Home
KCP Basic Usage
KCP Benchmark
KCP Best Practice EN
KCP Best Practice
KCP Feature
Network Encryption
Network Layer
Success Stories
3
EN_KCP Benchmark
winlin edited this page 2017-02-17 10:36:14 +08:00
Table of Contents
Benchmark
TCP is good enough when network is not heavy. But the experience is worse when packet is dropped for heavy network, for instance 10% packets dropped.
I've done some benchmark. There is a detail benchmark asio_kcp for heavy network, which indicates the latency of KCP is 1/3 of libenet
:
worst network lag happen:
asio: 10:51.21
291 295 269 268 231 195 249 230 225 204
enet: 10:51.21
1563 1520 1470 1482 1438 1454 1412 1637 1588 1540
The detail data is here benchmark. Thanks the owner of asio_kcp
zhangyuan
to compare UDT, libenet and KCP:
- ASIO-KCP has good performace in wifi and phone network(3G, 4G).
- The kcp is the first choice for realtime pvp game.
- The lag is less than 1 second when network lag happen. 3 times better than enet when lag happen.
- The enet is a good choice if your game allow 2 second lag.
- UDT is a bad idea. It always sink into badly situation of more than serval seconds lag. And the recovery is not expected.
And more:
- enet has the problem of lack of doc. And it has lots of functions that you may intrest.
- kcp's doc is chinese.
- Good thing is the function detail which is writen in code is english. And you can use asio_kcp which is a good wrap.
- The kcp is a simple thing. You will write more code if you want more feature.
- UDT has a perfect doc. UDT may has more bug than others as I feeling.
I just compare the KCP with TCP/UDT, for I think libenet
does not introduce modern transport techniques. The benchmark from owner of asio-kcp
shows the difference of KCP/enet/UDT.