how to configure Jmeter to discard downloaded files?

吃可爱长大的小学妹 提交于 2020-05-16 20:37:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!