How to pass heap parameters for non-gui distributed load test in Jmeter?

3464 views jmeter
-2

Running a distributed non-gui load test causing heap dump. Need to pass command line parameters to set heap preferences while running jmeter.

answered question

1 Answer

5

When you execute distributed, slaves should already ready to accept requests, so you need to define it earlier.

Running JMeter recommends setting values in setenv.bat/sh

setting the variable JVM_ARGS will override most pre-defined settings, for example

JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.jmx [etc.]

will override the HEAP settings in the script.

To set those variables permanently, you can place them in a file called setenv.sh in the bin directory. This file will be sourced when running JMeter by calling the jmeter script. An example for bin/setenv.sh could look like:

# Use a bigger heap, but a smaller metaspace, than the default
export HEAP="-Xms1G -Xmx1G -XMaxMetaspaceSize=192m"

posted this

Have an answer?

JD

Please login first before posting an answer.