heiher / hev-socks5-tunnel

A high-performance tun2socks for Linux/Android/FreeBSD/macOS/iOS/WSL2 (IPv4/IPv6/TCP/UDP)
MIT License
667 stars 134 forks source link

tun接口速度问题 #66

Closed rllbee closed 8 months ago

rllbee commented 8 months ago

两端网络环境都是上下行对等千兆,服务器运行hev-socks5-server,路由器为mipsel架构padavan固件 在路由器上运行hev-socks5-tunnel,speedtest.com测速最高只有100Mbps左右 服务器配置和测速节点不变,路由器用ipt2socks+iptables转发,可以轻松突破100Mbps 请问原因为何,如何解决

heiher commented 8 months ago

跑满100Mbps时,hev-socks5-tunnel进程的CPU使用率多少?

rllbee commented 8 months ago

对了,忘说了,跑满的时候进程CPU占用只有20-25%左右,idle为75% 考虑到mt7621是个四核CPU,会不会是线程问题,如何让hev-socks5-tunnel利用全部四个核心?

heiher commented 8 months ago

20-25%是单个CPU线程,还是总体的。看上去很可能是总体的,那么实际上单个CPU线程已经跑满了。hev-socks5-tunnel支持多队列模式,但是这一特性对内核版本有一些要求,不妨试试看。在配置文件中打开 multi-queue: true,然后同时跑4个相同配置的进程。多队列对于均衡多个连接是有益的,如果只有一个连接则没有效果。

rllbee commented 8 months ago

同时跑相同配置进程跑不起来,提示[E] socks5 tunnel open然后退出,是否内核不支持 内核版本是3.4.113,可能有点旧了

heiher commented 8 months ago

内核至少3.8才支持。追求性能且应用场景匹配的话,推荐hev-socks5-tproxy。

rllbee commented 8 months ago

好的,感谢帮助