I had read that you need to change the heap size in the jmeter.bat file (I'm using windows) to increase the memory to be able to test around 500 threads or more. This is the default:
if not defined HEAP (
rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m
)
I changed the set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m it to:
set HEAP=-Xms2g -Xmx8g -XX:MaxMetaspaceSize=512m
But when I open Jmeter in GUI mode there is a message in the command line window
Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaSpaceSize=256m" in the jmeter batch file
So does that mean the change in the batch file didn't work? Or it does work when running in non-gui mode? Did I miss something to change or what? Thanks in advance.
java.lang.OutOfMemoryError: Java heap space error or detect unusually high GC activity The message basically a form of advice, you will see it even if you have several terabytes of heap space as it is simply hard-coded and will always be shown during GUI startup. If you want to see all Java arguments including heap space settings you can use JSR223 Sampler and the following Groovy code:
java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().each {
log.info("Effective JVM argument: " + "$it")
}
This way you can test whether you changes are applied or not:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With