3

I've been able to create dashboards for small amounts of log data (3mb) with JMeter. However, when trying to create dashboards with large amounts of data (35mb), jmeter will throw a java.lang.OutOfMemoryError: Java Heap Space.

So far I've tried to create an environment variable called JVM_ARGS=-Xms1024m -Xmx10240m but I still do not have enough space.

Is there anything else I can try to create these dashboards? Or is there a way to reduce the number of entries that get written to the log file?

Thank you!

jso35
  • 47
  • 4

2 Answers2

1

There are 2 possibilities :

  • Option 1 : your JVM options are not taken into account. Show the first lines or all content of jmeter.log
  • Option 2 : you have added some dynamic parameter to your http requests that has created a lot of different (name) SampleResult

Edit 8 october 2018:

  • Root cause was point Option 2
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • I don't have my work computer on me at the moment but you are right, there is some dynamic parameter in my http request. I'll try to remove those from being added to my log. If that doesn't work, I'll post the contents of my jmeter log. Thank you! – jso35 Oct 08 '18 at 01:06
  • I tried to remove the dynamic parameter and I can now successfully create dashboards for a larger set of data. However, I still want to include the dynamic data in my dashboards. Is there a way to have the request that creates a dynamic url all fall under the same SampleResult? – jso35 Oct 08 '18 at 14:06
  • I would suggest that you accept this answer , and ask another question with this clear context. I'll try to answer. Thanks – UBIK LOAD PACK Oct 08 '18 at 14:34
  • https://stackoverflow.com/questions/52704881/consolidate-jmeter-sampleresult-entries – jso35 Oct 08 '18 at 14:51
0
  1. Make sure you've really created the environment variable and it has the anticipated value, double check this by running the following command in the terminal window where you will be launching JMeter from:

    • echo %JVM_ARGS% for Windows
    • echo $JVM_ARGS for Linux/Unix/MacOS

      You should see your increased JVM heap settings

      JMeter Increase Heap

  2. Make sure to use either jmeter.bat for Windows or jmeter.sh for other operating systems wrapper script

  3. Make sure to use 64-bit version of JRE as 32-bit will not be able to allocate more than 3G heap

  4. Make sure you can execute java command with your 10G heap

    java -Xms1024m -Xmx10240m -version
    

    you should see your Java version

    Java version

  5. Try running ApacheJMeter.jar executable directly:

    java -Xms1024m -Xmx10240m -jar ApacheJMeter.jar -g result.jtl -o destination_folder
    
  6. If nothing helps be aware that you can generate tables/charts using JMeterPluginsCMD Command Line Tool (it is not a part of standard JMeter installation, can be installed using JMeter Plugins Manager)

    JMeter Plugins Command Line Graph Plotting Tool

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you for your in depth answer. Unfortunately, it still throws a OutOfMemoryError. I believe it's because every http request I'm making, it makes a unique entry because a portion of the URL is dynamic. Is there a way to have them consolidate under the same entry? For example: example.com/ example.com/ This creates 2 distinct entries in my dashboards but I want them to be under the same entry. – jso35 Oct 08 '18 at 14:31
  • 1. Put your request(s) under the [Transaction Controller](https://www.blazemeter.com/blog/using-jmeters-transaction-controller) 2. Tick `Generate Parent Sample` box 3. Add `jmeter.save.saveservice.subresults=false` line to *user.properties* file – Dmitri T Oct 09 '18 at 07:16