Search code examples
javaperformancejmeterperformance-testingjsr223

Jmeter. JSR223,Groovy. Can't generate load more than 5 hits/sec


I'm using jsr223 sampler in JMeter 3.1 to generate keys for HTTP request data. The problem is that my script uses cryptographic algorithms, therefore, when the number of threads increases, the script duration time increases as well (it increases proportionally to the number of users). So I can't generate more than 5 hits/sec. At the same time CPU utilization stays low (8 cores and 32GB RAM). Do you have any ideas how to increase hits/sec?


Solution

  • I observed the same issue. In my experiments, I've seen JSR223 + Groovy performing way slower than most of the other implementation options. It had high impact on garbage collection and CPU overhead due to the GC activity. When I switched JSR223 from Groovy to java, it still had lot of locking and the threads were constantly getting locked on beanshell bsh.name.

    Finally, I replaced all the JSR223 test elements with raw beanshell elements such as beanshell pre-processor/ postprocessor / assertions and samplers. That scaled easily to several thousands of requests per secs and the time taken was < 1 mSec.

    Though I have seen lot of articles recommending JSR223 + Groovy, it didn't work in my case. Please switch to beanshell elements with java code inside them. It will work.

    Please refer my article

    JMeter Tuning - JSR223 + Groovy Vs JSR223 + Java BeanShell Vs Raw BeanShell