title: How much memory (heap size) is required to be set in JMeter
body: <p><em>Let's take a very simple jmeter script</em> which downloads a file of 128MB in an HTTP request (GET). Purpose is to stress out the server under test so there is no necessity for file to be stored locally or in memory of the jvm for future use. The file should be completely downloaded as it maintains a connection with the sever.</p>
  
  <p><strong>Scenario:</strong>
  10 threads or more running concurrently with a pacing of say 5 seconds. Assume unlimited network bandwidth.</p>
  
  <p>File location: <a href="https://storage.googleapis.com/videos12/dummy.txt" rel="nofollow noreferrer">https://storage.googleapis.com/videos12/dummy.txt</a></p>
  
  <p>Question is - how much memory would you set for the heap size of the jmeter's jvm so that you do not get java OOM error? What would be the approach to do a basic calculation?</p>
  
  <p><code>set HEAP=-Xms512m -Xmx512m</code> --> this can be set in jmeter.bat file.</p>
  
  <p><a href="https://i.stack.imgur.com/oxYYQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oxYYQ.png" alt="a sample test plan in jmeter"></a></p>