问题
first of all i already had a look at several questions which are quite similar. But i wasn't able to find a solution.
My script performs a load test it calls several different URLs(GET http) to download the content behind. After 120 requests the memory usage increases up to 2GB and after 500 to 5-6GB
I changed already the xmx size in hope that this will solve the problem but it doesn't.
Is there any way to configure jmeter to not save the files coming from a response? Or lets say to discard immediately the downloaded files? Is it maybe an JRE setting?
Or is there no way to solve this memory increasing problem?
Br, Kabba
回答1:
Try disabling the View Results Tree
in the script as it records all results for you to inspect.
The jMeter documentation specifically mentions this:
18.3.6 View Results Tree
View Results Tree MUST NOT BE USED during load test as it consumes a lot of resources (memory and CPU). Use it only for either functional testing or during Test Plan debugging and Validation.
回答2:
I don't think that it is something you can do via JMeter settings. As per JMeter Performance and Tuning Tips guide (make sure that you follow all the recommendations):
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.
So you can try different Garbage Collection options on JMeter's side. See How to Tune Java Garbage Collection guide for ramp-up on the domain or consult a Java developer if one is around.
来源:https://stackoverflow.com/questions/26464526/how-to-configure-jmeter-to-discard-downloaded-files