This is a basic jmeter project.
Populate main.properties
, then run jmeter in headless mode:
jmeter -nt main.jmx -q main.properties -fl out/report.csv
Optionally, generate a report dashboard after the load test completes:
jmeter -nt main.jmx -q main.properties -fl out/report.csv -eo reports/$(date +%s)
For more resource intensive testing, consider tweaking the JVM arguments used by jmeter. For example, prepend the following string to the commands above (after determining an appropriate memory allocation):
JVM_ARGS="-Xms4096m -Xmx4096m -server"
e.g.
JVM_ARGS="-Xms4096m -Xmx4096m -server" jmeter -nt main.jmx -q main.properties -fl out/report.csv -eo reports/$(date +%s)
Likewise, if you are developing your project using a server with limited resources, consider lowering those values, e.g:
JVM_ARGS="-Xms512m -Xmx512m -server"
Populate main.properties
, then run jmeter in GUI mode:
jmeter -t main.jmx -q main.properties
If you want to create a dashboard from an existing report:
jmeter -g ./out/report.csv -o reports/$(date +%s)
Note: the default granularity is 60s which effects some graphs; this can be changed by editing user.properties
(or including it in your imported properties file):
jmeter.reportgenerator.overall_granularity=1000
When running larger tests, update the limits file (/etc/security/limits.conf
) to include the following and then restart the server:
* soft nofile 16384
* hard nofile 16384
Consider reducing the jmeter logs by editing bin/log4j2.xml
.
Change the default log level to warn
by changing this:
<Root level="info">
to this:
<Root level="warn">
Then set specific loggers to info
, for example:
<Logger name="org.apache.jmeter.JMeter" level="info" />
<Logger name="org.apache.jmeter.threads.ThreadGroup" level="info" />
<Logger name="org.apache.jmeter.reporters.Summariser" level="info" />