-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
负载问题,难道只有我有高负载吗? #283
Comments
应该是有人再tail或者cat大日志 |
不不,这是我新开的机子,没人上的来,只做console连接操作而已,也没有做核心限制 |
我这边也是负载高,所以我一般 定时晚上重启一下 jumpserver |
麻烦把机器(kvm内)的软件环境贴上来, 以下命令请麻烦在负载高的时候运行 |
换了个单核的Xen机器来试验了 [root@localhost ~]# cat /proc/cpuinfo [root@localhost ~]# uname -a [root@localhost ~]# pip list [root@localhost ~]# python --version |
[root@localhost ~]# free avg-cpu: %user %nice %system %iowait %steal %idle Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn avg-cpu: %user %nice %system %iowait %steal %idle Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn avg-cpu: %user %nice %system %iowait %steal %idle Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn [root@localhost ~]# ps auxw|grep python |
使用这个分支测试一下 |
还是一样的高负载 |
负载高可能是有大的日志操作,否则不会高的,如cat 1G.log tail access.log,否则不会高的 |
我可以打包票并没有做任何操作,现在只是单单连上console就很高的负载了,根本没有做任何操作的 |
安装一个 teamview,我给你看看,q小窗我 老广 |
@efmoe 你的负载没在python上,最后的 cpu top: 同样帖结果 |
@liuzheng712 我让老广远程来看看吧,可能正好统计到了低的时候 |
@liuzheng712 web terminal的问题,开启几个web terminal load会上来,具体问题再看看 |
我也碰到这样的问题!貌似是线程出问题了,我strace追踪进程的时候,发现很多futex(0x1970b70, FUTEX_WAIT_PRIVATE, 0, NULL) = 0这样的输出,应该是线程的问题
|
负载高的原因以及找到,runserver.py文件第419行: 发自 网易邮箱大师 @liuzheng712 web terminal的问题,开启几个web terminal load会上来,具体问题再看看 — |
我遇到的问题是:大量输出后,当前连接会卡住几十秒。例如长时间top然后退出,或长时间tail日志然后ctrl+c等。卡的时候jumpserver服务器cpu会占满一个核心。 |
@ibuler 这个问题你看看 是不是我上面说的这个问题。我这边这样改了之后是ok的,你这边的select好像没有必要监视标准输入描述符 |
@luashiping 监听stdin是为了获取用户的输入 |
@ibuler 额!web terminal输入吗?监视输入是通过self.channel的!如果再加上监视sys.stdin,我这边只要打开一个web terminal窗口,服务端cpu就打满!我调试的时候去掉这个就好了。 |
ok, 我测试一下 |
Fixed 8f66678 |
@ibuler 我测试了的确没什么CPU占用了,但是去掉sys.stdin对系统对jumpserver的功能有啥影响不? |
在 run_server.py没有影响 |
空跑的时候负载很低,一但web终端连上了,负载就上去了
1个终端,负载1.0左右
2个终端,负载1.7左右
3个终端,负载2.1左右
处理器是E3-1220 3.1G主频,因为是在kvm虚拟机里跑的,只分配了2个核心,3个终端就能把处理器沾满了,所以这种情况算正常吗?
The text was updated successfully, but these errors were encountered: