I am doing load testing on my application using jmeter and I have a situation where the cpu usage by the applications jvm goes to 99% and it stays there. Application still work, I am able to login and do some activity. But, it’s understandably slower.
我正在使用jmeter对我的应用程序进行负载测试,我有一种情况,应用程序jvm的cpu使用率达到99%并且它保持在那里。应用程序仍然有效,我可以登录并做一些活动。但是,它可以理解地慢了。
Details of environment:
环境细节:
Server: AMD Optrom, 2.20 Ghz, 8 Core, 64bit, 24 GB RAM. Windows Server 2008 R2 Standard
服务器:AMD Optrom,2.20 Ghz,8 Core,64bit,24 GB RAM。 Windows Server 2008 R2标准版
Application server: jboss-4.0.4.GA
应用服务器:jboss-4.0.4.GA
JAVA: jdk1.6.0_25, Java HotSpot(TM) 64-Bit Server VM
JAVA:jdk1.6.0_25,Java HotSpot(TM)64位服务器VM
JVM settings: -Xms1G -Xmx10G -XX:MaxNewSize=3G -XX:MaxPermSize=12G -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseCompressedOops -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000
JVM设置:-Xms1G -Xmx10G -XX:MaxNewSize = 3G -XX:MaxPermSize = 12G -XX:+ UseConcMarkSweepGC -XX:+ UseParNewGC -XX:+ UseCompressedOops -Dsun.rmi.dgc.client.gcInterval = 1800000 -Dsun.rmi .dgc.server.gcInterval = 1800000
Database: MySql 5.6 (in a different machine)
数据库:MySql 5.6(在不同的机器上)
Jmeter: 2.13
My scenario is that, I make 20 users of my application to log into it and perform normal activity that should not be bringing huge load. Some, minutes into the process, JVM of Jboss goes up and it never comes back. CPU usage will remain like that till JVM is killed.
我的情况是,我让我的应用程序的20个用户登录并执行不应该带来巨大负载的正常活动。一些,进入过程的几分钟,Jboss的JVM上升,它永远不会回来。在JVM被杀死之前,CPU使用率将保持不变。
To help better understand, here are few screen shots.
为了更好地理解,这里有几个屏幕截图。
I found few post which had cup @ 100%, but nothing there was same as my situation and could not find a solution. Any suggestion on what’s to be done will be great.
我发现很少有帖子有100%的杯子,但没有什么和我的情况一样,找不到解决方案。任何关于要做什么的建议都会很棒。
Regards,
Sreekanth.
1 个解决方案
#1
To understand the root cause of the high CPU utilization, we need to check the CPU data and thread dumps at same time.
要了解高CPU利用率的根本原因,我们需要同时检查CPU数据和线程转储。
Capture 5-6 thread dumps at the time of the issue. Similarly capture CPU consumption thread-by-thread basis.
在问题发生时捕获5-6个线程转储。类似地逐个线程地捕获CPU消耗。
Generally the root cause of the CPU issue would be problems with threads like BLOCKED threads, long running threads, dead-lock, long running loops etc. That can be resolved by going through the stacks of the threads.
通常,CPU问题的根本原因是线程问题,如BLOCKED线程,长时间运行的线程,死锁,长时间运行的循环等。可以通过遍历线程堆栈来解决。
#1
To understand the root cause of the high CPU utilization, we need to check the CPU data and thread dumps at same time.
要了解高CPU利用率的根本原因,我们需要同时检查CPU数据和线程转储。
Capture 5-6 thread dumps at the time of the issue. Similarly capture CPU consumption thread-by-thread basis.
在问题发生时捕获5-6个线程转储。类似地逐个线程地捕获CPU消耗。
Generally the root cause of the CPU issue would be problems with threads like BLOCKED threads, long running threads, dead-lock, long running loops etc. That can be resolved by going through the stacks of the threads.
通常,CPU问题的根本原因是线程问题,如BLOCKED线程,长时间运行的线程,死锁,长时间运行的循环等。可以通过遍历线程堆栈来解决。