I'm running api load tests with a script that's a combination of REST and websocket APIs. The resource utilisation of the VM where I'm using jmeter to execute load tests is much higher than before incorporating the websocket APIs. I wanted to understand if that's normal if I'm doing something wrong. The transaction rate of the test is 2000 transactions per minute by 2000 users. Other than the API samplers I have a few JSR223 samplers. I was wondering whether they could be the reason. But they process pretty simple functions, (creating or renaming a variable each iteration). Has anyone been in a similar situation and is there any way to optimise the script resource utilisation.
1 Answer
Using JSR223 Test Elements is fine as long as you:
- Use Groovy language
- Cache compiled scripts
So it might be the case the plugin is consuming resources, you can use a profiler tool to see what exactly consumes resources
It might also be a good idea to follow JMeter Best Practices and recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article
