本文介绍了当我在分布式模式下使用JMeter执行时,CPU利用率达到100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JMeter(分布式模式)进行负载测试.它是一个JAVA应用程序和SQL数据库.应用程序服务器和数据库服务器是两个不同的映像.

I am using JMeter(in distributed mode) for load testing. Its a JAVA application and SQL database. Application server and database server are two different images.

如果我放置50个用户的负载,则60分钟后应用程序服务器将达到100%.如果我放置100个用户的负载,则60分钟后应用程序服务器将达到100%.如果我放置500个用户的负载,则60分钟后应用程序服务器将达到100%.如果我放置1500个用户的负载,则60分钟后应用程序服务器将达到100%.如果我将2500个用户的负载放入,则60分钟后应用程序服务器将达到100%.

If i put 50 user's load, after 60 minutes application server reaches 100%.If i put 100 user's load, after 60 minutes application server reaches 100%.If i put 500 user's load, after 60 minutes application server reaches 100%.If i put 1500 user's load, after 60 minutes application server reaches 100%.If i put 2500 user's load, after 60 minutes application server reaches 100%.

与用户数无关,CPU在60分钟后达到100%.

Irrespective of number of user, CPU reaches 100% after 60 minutes.

请让我知道其背后的原因是什么.

Please do let me know what can be the reason behind it.

推荐答案

似乎是Application Server JVM中的内存问题.尝试监视JVM的内存使用情况(要求应用程序服务器管理员将-verbose:gc添加到应用程序启动参数中).

Seems like a memory problem in the Application Server JVM.Try monitoring the memory usage of the JVM (ask the application server administrator to add -verbose:gc to the application startup parameters).

运行负载时,请查看应用程序服务器上生成的文件,并寻找过多的GC时间(这是导致CPU使用率高的原因).如果发生这种情况-您可能建议增加应用服务器上的JVM内存.

While you run the load look at the generated file on the application server and look for excessive GC time (which is the cause for the high CPU usage).If this happens - you may suggest to increase JVM memory on app server.

如果没有记录过多的GC(实际情况并非如此),则应与应用程序服务器管理员一起解决该问题.

If no excessive GC is logged - it is not the case and you should work with the application server adminitrator to resolve.

这篇关于当我在分布式模式下使用JMeter执行时,CPU利用率达到100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 06:36