shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

High CPU usage of server side on Windows 10

f4nff opened this issue · comments

commented

服务端:
go-shadowsocks2 -s "ss://AEAD_AES_128_GCM:high@:2555"
客户端:
outline,

操作系统windows 10
cpu:i5-4790

操作,连接一个内网,然后手机连接内网的ss,
然后点开头条刷那种几分钟的小视频,cpu
都可以暴增到20%以上,

然,使用shadowrocks-rust的ss服务端,同样的测试条件,
cpu不会超过3%

差别太大了,
这个项目这么久了,这样的问题都没人注意到吗?

commented

To properly compare performance of two different implementations, you'd need to setup a controlled environment to isolate all other factors. The data point you provided is useless for analysis with tons of missing info:

  1. What is the hardware configuration of the server?
  2. What's the effective bandwidth when CPU usage peaks?
  3. How many connections the server is processing concurrently?

Keep in mind that Rust and C are languages without runtime and garbage collection, while Go has such overhead. Additionally, both Rust and C implementations are event-driven while Go implementations heavily rely on Goroutines which are not designed to keep resource usage to the bare minimal. So there's always resource utilization gap between different implementations.

commented

Microsoft Windows 10 专业版
i5-4590 cpu 桌面
带宽:10-40Mbps
连接数很少,就是刷头条短视频,
我觉得这是go-shadowsocks2的缺陷,而非golang的原因,我尝试过使用caddy转发websocket,wss,同样的带宽占用cpu非常低,
caddy也是golang的项目,
跟语言没关系,跟项目开发实现的逻辑有关系,

commented

You're running the server side on Windows? I've never tested on Windows so you're on your own to figure out what's wrong.

commented

希望有大神来解决这个问题,

服务端: go-shadowsocks2 -s "ss://AEAD_AES_128_GCM:high@:2555" 客户端: outline,

操作系统windows 10 cpu:i5-4790

操作,连接一个内网,然后手机连接内网的ss, 然后点开头条刷那种几分钟的小视频,cpu 都可以暴增到20%以上,

然,使用shadowrocks-rust的ss服务端,同样的测试条件, cpu不会超过3%

差别太大了, 这个项目这么久了,这样的问题都没人注意到吗?

我在WINDOWS 10 中根本跑不起来,提示

shadowsocks2-win64.exe -s 'ss://AEAD_CHACHA20_POLY1305:2111@192.168.30.10:18488' -verbose
2022/04/27 09:41:07 tcp.go:99: failed to listen on 'ss://AEAD_CHACHA20_POLY1305:2111@192.168.30.10:18488': listen tcp: address 'ss://AEAD_CHACHA20_POLY1305:2111@192.168.30.10:18488': too many colons in address