title: JMeter issues when running large number of threads
body: <p>I'm testing using Apache's Jmeter, I'm simply accessing one page of my companies website and turning up the number of users until it reaches a threshold, the problem is that when I get to around 3000 threads JMeter doesn't run all of them.  Looking at the Aggregate Graph 
  it only runs about 2,536 (this number varies but is always around here) of them.  </p>
  
  <p>The partial run comes with the following exception in the logs:</p>
  
  <pre><code>01:16 ERROR - jmeter.JMeter: Uncaught exception: 
  java.lang.OutOfMemoryError: unable to create new native thread
      at java.lang.Thread.start0(Native Method)
      at java.lang.Thread.start(Unknown Source)
      at org.apache.jmeter.threads.ThreadGroup.start(ThreadGroup.java:293)
      at org.apache.jmeter.engine.StandardJMeterEngine.startThreadGroup(StandardJMeterEngine.java:476)
      at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:395)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>This behavior is consistent. In addition one of the times JMeter crashed in the middle outputting a file that said:</p>
  
  <pre><code># There is insufficient memory for the Java Runtime Environment to continue.
  # Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate
  # Possible reasons:
  #   The system is out of physical RAM or swap space
  #   In 32 bit mode, the process size limit was hit
  # Possible solutions:
  #   Reduce memory load on the system
  #   Increase physical memory or swap space
  #   Check if swap backing store is full
  #   Use 64 bit Java on a 64 bit OS
  #   Decrease Java heap size (-Xmx/-Xms)
  #   Decrease number of Java threads
  #   Decrease Java thread stack sizes (-Xss)
  #   Set larger code cache with -XX:ReservedCodeCacheSize=
  # This output file may be truncated or incomplete.
  #
  #  Out of Memory Error (allocation.cpp:211), pid=10748, tid=11652
  #
  # JRE version: 6.0_31-b05
  # Java VM: Java HotSpot(TM) Client VM (20.6-b01 mixed mode, sharing windows-x86 )
  </code></pre>
  
  <p>Any ideas?<br>
  I tried changing the heap size in jmeter.bat, but that didn't seem to help at all.</p>