CPU使用率高,怎么解决,看着不舒服。 #138

Closed
tyhjwyc opened this Issue May 10, 2016 · 12 comments

Projects

None yet

3 participants

@tyhjwyc
tyhjwyc commented May 10, 2016 edited

123

服务端access日志都是
2016/05/10 10:48:58 ip端口 accepted tcp:127.0.0.1:2223
服务端error日志都是
2016/05/10 10:48:58 [Debug]VMessIn: Received request for tcp:127.0.0.1:2223
2016/05/10 10:48:58 [Info]Freedom: Opening connection to tcp:127.0.0.1:2223
没有报错,运行很正常,但就是cpu使用率高。
客户端error日志
2016/05/10 11:55:19 [Info]VMessOut: Tunneling request to 127.0.0.1 via tcp:ip地址
2016/05/10 11:55:25 [Info]VMessOut: Tunneling request to 127.0.0.1 via tcp:ip地址

@tyhjwyc
tyhjwyc commented May 10, 2016

{
"port": 2222,
"log" : {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "debug"
},
"inbound": {
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "XXXXXXXXXXXXXXXXXXXX",
"level": 1,
"alterId": 1024
}
]
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
}
}
我的配置表

@tyhjwyc
tyhjwyc commented May 10, 2016

{
"port": 1080,

"log" : {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "debug"
},
"inbound":
{
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}

},

"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "ip地址",
"port": 2222 ,
"users": [
{
"id": "XXXXXXXXX",
"alterId": 1024
}
]
}
]
}
},
"inboundDetour": [
{
"protocol": "dokodemo-door",
"port": 6315,
"settings": {
"address": "127.0.0.1",
"port": 2223,
"network": "tcp",
"timeout": 0
}
}
]
}
另外一个配置表

@wtlusvm
Contributor
wtlusvm commented May 10, 2016

你的CPU比较老吧,AES算法挺消耗CPU的,没有协处理器的话很费劲的,Raspberry Pi Model B亲测,CPU使用率轻松上80%

@tyhjwyc
tyhjwyc commented May 10, 2016 edited

*-cpu
description: CPU
product: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
vendor: Intel Corp.
physical id: 401
bus info: cpu@0
slot: CPU 1
size: 2GHz
capacity: 2GHz
width: 64 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb x86-64 constant_tsc arch_perfmon nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 invpcid
cpu是这个。
那个算法貌似可以自己设定?我可以设个其他的吗
@wtlusvm

@wtlusvm
Contributor
wtlusvm commented May 10, 2016 edited

@tyhjwyc E5V3不会这么费劲的,08年以后的CPU基本都有AES-NI指令集更不必说服务器的CPU了。
算法不能自定的:

数据部分使用 AES-128-CFB 加密,Key 和 IV 在指令部分中指定

可能是其他方面出了问题。

@tyhjwyc
tyhjwyc commented May 10, 2016

image
v2的这个时间,一次跳几十s,正常吗
@wtlusvm

@wtlusvm
Contributor
wtlusvm commented May 10, 2016 edited

@tyhjwyc 是说最后面那两位吗?那两位跳几十很正常的。
TOP截图(64M OpenVZ):image

这是我的CPU:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
stepping : 2
microcode : 26
cpu MHz : 2660.020
cache size : 12288 KB
physical id : 1
siblings : 12
core id : 0
cpu cores : 6
apicid : 32
initial apicid : 32
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid

不过这个版本CPU占用率奇高啊,1.12.6都没这么高的

@wtlusvm
Contributor
wtlusvm commented May 10, 2016

修改脚本强行回滚到v1.12.6后CPU使用率回归正常。

@tyhjwyc
tyhjwyc commented May 10, 2016 edited

@wtlusvm 那我也试试1.12.6版本,回滚了确实ok了。那就先回滚用着了。。

@v2ray v2ray added the bug label May 10, 2016
@v2ray v2ray added this to the Version 2.0 milestone May 10, 2016
@v2ray
Owner
v2ray commented May 10, 2016

请升级到 1.12.8,上述问题是 1.12.7 的一个 bug。

@tyhjwyc
tyhjwyc commented May 10, 2016

收到收到

@v2ray
Owner
v2ray commented May 14, 2016

Assuming fixed.

@v2ray v2ray closed this May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment