0
votes

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?

2
1. Provide code. 2. Which "cryptographic algorithms" are you using?zaph
I use Hybrid cryptosystem. Sorry, I can't provide code. I think it's a problem with jmeter.Fundorin
Which cryptographic primitive is causing the performance issue?If you don't provide information an answer is not possible.zaph
@zaph My code, but i can't share libs. codeshare.io/21YKEnFundorin

2 Answers

-1
votes

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

0
votes

Did you check cache on jsr223 element ?

If not that probably explains your issue. JSR223 +groovy with cache checked outperforms Beanshell by an important factor.

It yes, the issue is probably in your code but you can check by making a 3 Thread Dumps at 5 seconds interval and see what JMeter is doing ?

Also ensure you're following best-practices when testing: