在命令行上增加jMeter的内存 [英] Increase memory for jMeter on command line

查看:1232
本文介绍了在命令行上增加jMeter的内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Mac上的命令行运行jMeter。今天它抛出了内存不足,堆空间错误....

I am running jMeter from the command line on a Mac. Today it threw an Out of memory, heap space error....

newbie$ sh jmeter.sh
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
at java.awt.image.Raster.createPackedRaster(Raster.java:455)

我知道我需要增加内存分配给它,但不知道如何。我查看了这篇文章无法增加JMeter的堆大小在Mac OSX上并发现它提到的bin文件夹中的jMeter脚本文件并进行了以下更新..

I know I need to increase the memory allocated to it, but not sure how. I looked at this post Unable to increase heap size for JMeter on Mac OSX and found that jMeter script file in the bin folder it mentions and made the below updates..

HEAP="-Xms1024m -Xmx2048m"
NEW="-XX:NewSize=512m -XX:MaxNewSize=1024m"

但我仍然遇到内存不足错误。我只是需要更多还是我在错误的地方改变?可能是我需要重启我的整个机器吗?

But I am still getting the out of memory error. Do I just need to give it more or am I changing in the wrong place? Could it be I need to restart my whole machine?

推荐答案

据我所知:


  • 您对 jmeter 脚本进行了更改

  • 您正在启动 jmeter.sh script

  • 您想知道为什么不应用更改吗?

  • You made changes to jmeter script
  • You're launching jmeter.sh script
  • You want to know why the changes are not applied?

如果您更改 jmeter 脚本,为什么不将它作为 ./ jmeter

If you changed jmeter script why don't you just launch it as ./jmeter ?

如果您因任何原因需要通过 jmeter.sh 启动JMeter,请按以下步骤运行:

If you need to start JMeter via jmeter.sh for any reason, run it as follows:

JVM_ARGS="-Xms1024m -Xmx2048m -XX:NewSize=512m -XX:MaxNewSize=1024m"  && export JVM_ARGS && ./jmeter.sh

参见运行JMeter 特别是用户手册章节和终极JMeter资源列表一般用于相关文档。

See Running JMeter User Manual chapter in particular and The Ultimate JMeter Resource List in general for the relevant documentation.

这篇关于在命令行上增加jMeter的内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆