I need to run a thread test with over 10000 threads but at about 2000, I get the error:
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread.
My machine has 8GB ram. I tried
set JVM_ARGS="-Xms1024m -Xmx6144m" jmeter.sh
I didnt change anything in the jmeter.sh file though. Do I need to change anything? What else could I do to run such a large test? How do I run a jmx file without the jmeter gui also? (using mac osx)
-Xssas low as you can without your programs failing, make sureulimitor similar isn't affecting your processes, and cross your fingers. - dave_thompson_085-Xssis a Java/JVM startup option; you set it the same way as -Xmx etc. I'm not familiar with jmeter, but @Dmitri's answer looks sensible to me. The hard part is determining the correct value to use, because it depends on the code your threads run; I can't help much there. Operating system limits likeulimitvary depending on your OS which you didn't identify and I don't know all of them anyway; if in doubt on particular system I usually compare complicated things like Java to a trivial C program that just allocates huge chunks of memory and see what successes or errors I get. ... - dave_thompson_085