Friday, 14 March 2014
Friday, 7 March 2014
JMeter Performance Basic concepts
- The more it computes to create or process your samples, the less time it spends sampling, so when doing custom coding, ensure it is efficient
- Listeners receive Sample Results and do some processing with it, this takes resources (memory, CPU) so during Load Testing, a very simple rule is to Remove all Listeners, You have a Question as How can I use my results then ? the answer is, you will do it after the run. So NEVER EVER have one of these listeners in your Test Plan during a Load Test :
- View Results in Table => Out Of Memory guarantee
- View Results in Tree => Out Of Memory guarantee
- Graph Results => Performance issues
- Assertion Results => Out Of Memory guarantee
- Comparison Assertion Visualizer
- Distribution Graph (alpha) => Performance issues
- Graph Results => Performance issues
Use NON-GUI for Load Test:
JMeter has 2 modes:
- GUI mode is for creating the test plan, checking it, debugging it BUT NOT FOR MASSIVE LOAD TEST . AWT Event Thread will disrupt your Load Test.
- NON-GUI mode is for massive load testing, it is as simple as:<JMETER_HOME>/bin/jmeter -t <Path to Test Plan> -n -l <path to results>/results.csv
Configure JMeter Java options to meet your requirements
Default JMeter java configuration comes with 512 Mo and very little GC tuning.
First ensure you set -Xmx option value to a reasonable value regarding your test requirements.
Then change MaxNewSize option in jmeter file to respect the original ratio between MaxNewSize and -Xmx.
Finally try tuning GC options only if you master this domain.
Use CSV as output for Save Service
So, in user.properties, add:XML is verbose, it takes resources to be written (CPU and memory) and for analysis, CSV is great so forget about XML. Furthermore, for massive load tests there are many result data you don’t need.
jmeter.save.saveservice.output_format=csv jmeter.save.saveservice.data_type=false jmeter.save.saveservice.label=true jmeter.save.saveservice.response_code=true jmeter.save.saveservice.response_data.on_error=false jmeter.save.saveservice.response_message=false jmeter.save.saveservice.successful=true jmeter.save.saveservice.thread_name=true jmeter.save.saveservice.time=true jmeter.save.saveservice.subresults=false jmeter.save.saveservice.assertions=false jmeter.save.saveservice.latency=true jmeter.save.saveservice.bytes=true jmeter.save.saveservice.hostname=true jmeter.save.saveservice.thread_counts=true jmeter.save.saveservice.sample_count=true jmeter.save.saveservice.response_message=false jmeter.save.saveservice.assertion_results_failure_message=false jmeter.save.saveservice.timestamp_format=HH:mm:ss jmeter.save.saveservice.default_delimiter=; jmeter.save.saveservice.print_field_names=true
Subscribe to:
Posts (Atom)