Increase Jmter heap memory in Centos.
If the heap memory is not enough, Jmter test could be failed and throw below error.
Java.lang.OutOfMemoryError: Java heap space Dumping heap to.
To solve this go to the apache-jmeter-5.3\bin folder and open the file called jmeter.(It has no extensions.)
Search for below line called system’s memory availability: and change it accordinglly.
# This is the base heap size — you may increase or decrease it to fit your
# system’s memory availability:
: “${HEAP:=”-Xms9g -Xmx9g -XX:MaxMetaspaceSize=9g”}”
Remember that you can allow only the memory that device has.
So to check the memory I use meminfo file and open it bytyping
cat /proc/meminfo
Output will be like below.
MemTotal: 16075756 kB
MemFree: 9816208 kB
MemAvailable: 9789224 kB
So it’s possible for me to allocate 9GB,so I allocated that.
Also it’s better to restart the device , if the test takes a lot of time to run.
sudo reboot