what is the best way to change Heap size of Jmeter which gives :OutOfMemoryError

感情迁移 提交于 2019-12-11 07:29:35

问题


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.

Thanks in Advance!!


回答1:


JMeter version 4 comes with 1 GB of HEAP allocated by default, you can amend it like:

set HEAP=-Xms1G -Xmx10G && jmeter.bat

You can also locate the following line in jmeter.bat file:

set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m

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

More information:

  • JMeter Best Practices
  • 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure


来源:https://stackoverflow.com/questions/51512390/what-is-the-best-way-to-change-heap-size-of-jmeter-which-gives-outofmemoryerror

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!