What about JMeter memory overflow? How to adjust memory occupied by JMeter to solve memory overflow

Time:2021-5-7

What causes JMeter memory overflow? How to solve it? Many friends have encountered this situation: when using JMeter test, sometimes there will be memory overflow. So, what about JMeter memory overflow? How to adjust the memory occupied by JMeter? Next, I will tell you how to adjust the memory occupied by JMeter to solve the problem of memory overflow, hoping to help you.

Software name:
Official free version of Apache JMeter v3.1
Software size:
46.4MB
Update time:
2019-06-17Download now

JMeter memory overflow factor:

Some factors leading to memory overflow of jmter: monitoring (monitoring server and controller), recording sampler information (only recording error log), and reducing local memory consumption, as shown in the figure below:

Adjust the memory occupied by JMeter to solve the problem of memory overflow

1. Start JMeter. As you can see from the output of starting JMeter, modify heap  “” in the   jmeter batch file

-Xmx512m  -Xms512m

-XMS is the initial memory and – Xmx is the maximum occupied memory

2. Enter the startup directory of JMeter. My directory is in

C: In this paper, we present a method to solve this problem.

Edit to open the JMeter. Bat directory.

3. Find set   Heap.

Reset memory usage.

Before setting, it depends on the configuration of the machine. Right click my computer to view the properties.

4. My machine memory is 12g, and then I set the memory usage of JMeter here.

set  HEAP=-Xms1024m -Xmx4096m

5. Start JMeter again to execute the test.

In the process of testing, you can check the memory usage of Java.

View task manager.

6、

Adjusting JMeter’s memory footprint is one thing, and of course adjusting your scripts is another. If JMeter occupies too much memory, it will also lead to the inaccuracy of test results.

Adjusting JMeter’s memory footprint is one thing, and of course adjusting your scripts is another. If JMeter occupies too much memory, it will also lead to the inaccuracy of test results.

7. One is that it’s better not to use GUI mode in concurrent testing. Use the command line to test.

Moreover, some unnecessary log information can not be recorded for the time being.

For example: result tree.

Of course, you can check the log of failure.

8. Also in the aggregation report, click   Configure to set the information you want to keep according to your needs.

The end of the tutorial, the above is JMeter memory overflow how to do? Adjust JMeter occupied memory to solve the problem of memory overflow, if you have the same problem, then try according to the above steps!

Related tutorial recommendations:

Installation of JMeter in Windows