kcptun icon indicating copy to clipboard operation
kcptun copied to clipboard

Computationally expensive

Open amintnt opened this issue 4 years ago • 4 comments

Hello. kcptun is highly expensive in terms of cpu usage. How can I optimize it? I just need to forward a large number of tcp packets to another server through a udp tunnel and I don't care about encryption (so already set encryption to none). Any suggestions?

amintnt avatar Sep 27 '20 23:09 amintnt

you can also disable FEC by setting -ps 0

xtaci avatar Sep 29 '20 11:09 xtaci

I did a quick test, it practically makes no difference, the test results are basically the same (with marginal differences), roughly 40Mb/s at 100% CPU(crappy vps), with -ps 0 or default.

Can confirm in log the parameter is set correctly:

Sep 18 21:51:56 Zeta client[5418]: 2022/09/18 13:51:56 datashard: 10 parityshard: 0

Jimmy-Z avatar Sep 18 '22 14:09 Jimmy-Z

use hardware accelerated encryption algorithm, eg: aes

xtaci avatar Sep 18 '22 16:09 xtaci

I’m using none in both tests.

Jimmy-Z avatar Sep 19 '22 02:09 Jimmy-Z