JMeter – quick start from setting up to increasing size.
- khyati sehgal
- Aug 7, 2014
- 2 min read
To set up Jmeter at your local you need to follow some instructions I have mentioned below. And this will depend on the type of OS you are using.
As we all know Jmeter is an open-source tool and the Jmeter community is pretty active in taking questions over the issues, discussions of the tool. Let’s get started then!
How to get Jmeter?
Download Jmeter from http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi to your local.
Once this is done extract JMeter to a local directory say apache-JMeter-2.11.
How to set up JMeter?
You need not set any additional environment variables to make JMeter run all you need to do is unzip JMeter and that’s it.
JMeter has this much understanding that it can locate classes from jars in the here-under archives:
{JMETER_HOME}/lib
It is used for utility jars, so JMeter picks all the utilities from the lib folder automatically.
{JMETER_HOME}/lib/ext
This is used for JMeter components and plugins, as in if customizable plugins or components which the user has made.
What does the ext folder have?
In other words, if user has formed a new JMeter component, then the user should make a jar from them. And then copy that jar into {JMETER_HOME}/lib/ext. Now rest work JMeter will do on its own, such that it will automatically find JMeter components in any jars that can be found here.
What does the lib folder have?
Utility and dependency jars (libraries etc) can be placed in the lib directory. JMeter only accepts and understands the language of jars other archives like zipping, etc are not acceptable within JMeter scope.
In short, you need to copy all the libraries to lib.
How to start JMeter?
If you are on Windows :
Via command line go to {JMETER_HOME}\bin and run jmeter.batch file
If you are on Linux:
Execute jmeter.sh
And this will start JMeter GUI for you.
What does the docs folder have?
This folder has all HTML pages of the documentation. I would suggest reading them before start working with JMeter.
How to increase memory in JMeter?
Often if you increase the load or number of threads you can see “java.lang.OutOfMemoryError: PermGen space”, in JMeter.
This means that you have to increase the HEAP and the PERM size in the jmeter.bat(Windows). For this try this :
HEAP=-Xms1024m -Xmx1024m
PERM=-XX:PermSize=256m -XX:MaxPermSize=256m
and for the linux environment directly run
JVM_ARGS=”-Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m” jmeter.sh
Comments