How to increase Heap Size in Jmeter Tutorial - Software Testing

Empowering Technology

Post Top Ad

Responsive Ads Here

May 22, 2019

How to increase Heap Size in Jmeter Tutorial

Quite often we are unable to perform Load/ Stress/ Performance tests on local machines due to lack of memory size.

A simple hack can help us resolve this. How to increase Heap Size in Jmeter?

1. Increase the heap size:

a) Navigate to JMeter installation directory. <Installation Directory>/bin
b) Locate and Open Jmeter.bat in Text Editor

c) Search for "if not defined HEAP ("
d) Replace existing function with below code:
if not defined HEAP (
    rem See the unix startup file for the rationale of the following parameters,
    rem including some tuning recommendations
   set HEAP=-Xms8192m -Xmx8192m
   set NEW=-XX:NewSize=8192m -XX:MaxNewSize=8192m

//Here the 8192m represents 8 GB of RAM to be allocated for test run

2. Now execute the .jmx file using Command Line

<InstallationDirectory>/bin> jmeter -n -t <loadTest.jmx>

No comments:

Post a Comment

Thanks a lot for your valuable Comment!

Post Bottom Ad

Responsive Ads Here