I hit an interesting problem today where my test slowed to a crawl after about just 6000 iterations (out of a total of about 500000 required) irrespective of the number of threads, delay timer or size of Java heap space. The system was operating well within its CPU and memory limits.
My test is trivial: replaying XML API requests from a CSV file after advancing the dates in the otherwise perishable samples. I use bean shell to modify the dates. I allowed the script to continue labouring and finally the JVM died: "GC overhead limit exceeded". The solution was simply to check the "Reset bsh.Interpreter before each call" box on my bean shell sampler and all was well. The conclusion I have drawn from this is that garbage collection becomes a very difficult task for the JVM if the bean shell interpreter is not reset, and ultimately, that is what caused the test to stall and the JVM to die. In my experience, heap space exhaustion is the most common cause of failures in JMeter, so having optimal garbage collection is very important. Therefore, I would suggest that the default "false" setting for resetting the bean shell interpreter in all the bean shell components is actually not the sensible choice. Has this default been challenged or discussed previously? Thanks, Roderick
