1

I am using JMeter to test downloading of a large file (500 MB) from a server. I want to find out how much parallel downloads the server can support.

I created a test plan with 1000 threads and HTTP Request sampler. I ran the test. But all my requests failed with error like below:

2019-05-06 18:07:33,884 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-11
2019-05-06 18:07:33,884 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.OutOfMemoryError: Java heap space

I googled and found out that increasing the max heap size will fix the issue. So what I concluded is JMeter is downloading the file into RAM. So if there are two parallel downloads of 400 MB going on then 800 MB of RAM will be used. But obviously this is not practical since I have to test for 500 parallel downloads.

I am thinking if I can configure the HTTPRequest sampler to store the downloaded content into disk instead of storing it in RAM or just ignore it (download and discard immediately). This would allow me to test for 500 parallel downloads, which is what I want to achieve.

If anyone knows how to do this please help me with this or let me know if there is an alternate approach.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
vishal
  • 1,081
  • 2
  • 10
  • 27

2 Answers2

1

Try to create a distributed system of Jmeter(master- slave setup) . Note that the JAVA heap space of JMETER on each slave should be more than 6 GB(or more) for example. If you have enough slaves to run, the load sending will be distributed eventually among the slaves and this might solve your issue.

If the issue still persists, Consider movinf the same JMETER distributed configuration to AWS- But this is a huge step.

Just give a try with the first point mentioned.

Additional Note: Please also try by disabling heap dump creation. To remove this Comment DUMP="-XX:+HeapDumpOnOutOfMemoryError" line from JMeter.bat file.

Arjun Dev
  • 406
  • 5
  • 16
  • Thank you @Arjun. But what I see is even in distributed setup to simulate 500 parallel connections downloading 400MB file will require at least 500*400 MB i.e 200GB of RAM which is unrealistic. But if jmeter saved the download into disk instead of RAM then I can simulate lot of devices with lower RAM. My intention is to see how the server handles large number of parallel downloads. Even if saving to disk will slow the downloads on the client side it is still acceptable. But from what I see there is no such option in the available HTTP sampler to make it save to disk instead of to RAM. – vishal May 07 '19 at 11:17
0

After googling a bit more I realized JMeter does not have any such option but there are other tools which do the same job more efficiently. Here are some of those I tried.

  1. wrk
  2. apache ab

and many more listed here.

vishal
  • 1,081
  • 2
  • 10
  • 27