问题描述
我正在尝试将我的jmeter(第4版)堆大小从set HEAP = -Xms1g -Xmx1g -XX:MaxMetaspaceSize = 256m更改为更多,因为我的系统具有64位,16GB RAM但无法更改.
I am trying to change the size of my jmeter(version 4) heap size from set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m to more as i have system with 64bit, 16GB RAM but unable to change it.
我已经尝试了很多,但对我没有用.
i have tried a lot but nothing works for me.
在座的任何人都可以帮我解决这个问题.
can any one here help me out with this issues.
先谢谢了!
推荐答案
JMeter版本4随附了1 GB的HEAP,默认情况下分配,您可以像这样修改它:
JMeter version 4 comes with 1 GB of HEAP allocated by default, you can amend it like:
set HEAP=-Xms1G -Xmx10G && jmeter.bat
您还可以在 jmeter.bat 文件中找到以下行:
You can also locate the following line in jmeter.bat file:
set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m
并根据您的要求修改此 -Xmx1g
.不要分配太多堆,因为这可能会使情况变得更糟;不要设置太低,因为垃圾收集.您可以使用 JVisualVM检查堆状态和其他VM指标工具
and amend this -Xmx1g
according to your requirements. Don't allocate too much heap as it might get things worse, don't set too low as your test will be slowed down by the garbage collection. You can check heap state and other VM metrics using i.e. JVisualVM tool
更多信息:
这篇关于更改Jmeter堆大小的最佳方法是什么,它给出:OutOfMemoryError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!