I'm trying to create a Load Test with JMeter. I have a pretty simple test plan that:
I can run it successfully with 80 concurrent users and a ramp up time of 30 seconds. If I go above that things starts to gum up. Most of the time the test just gets stuck and I eventually have to cancel it with Ctrl+C. If I look in the logs afterwards I get no errors what so ever, it just looks like I aborted the test mid run. I have also tried running my test plan in Taurus but that also freezes and if I look in the logs afterwards there are no errors.
I have done most of what's listed in this guide 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure but just to clarify some things anyways:
The server I use is a pretty weak virtual machine. When I run the test and look in "top" the load average is 20-30 which obviously is too high considering the server has 4 cores. But when I look online it seems that people easily run tests with 3-500 concurrent users on regular laptops so that's why I still suspect that there is some other error.
Server Specs:
Are there anything obvious that I'm missing or is my server simply too weak?`
Thanks in advance! Best regards
Your heap setting might be too high for your setup, you should be able to mimic 150 concurrent users using a couple of gigabytes of Heap without any issues. So it might be the case your operating system does immense swapping which causes high disk IO.
Another reason is that JMeter waits for response prior to sending the next request and if you don't have reasonable timeouts and the server fails to respond - your test will never end. So consider introducing connect and response timeout, the best way is using HTTP Request Defaults, this way you can set the timeouts at one place and they will be propagated to all HTTP Request samplers
Consider setting up monitoring of your server as it might simply be lacking CPU or RAM therefore will not respond. You can use JMeter PerfMon Plugin or SSHMon Samples Collector for this
Check your application under test infrastructure and middleware components (application/web server, database, load-balancers, reverse proxies, etc.). These guys need to be tuned for high loads as their default configuration is good for development/debugging but not for load testing/production.
Consider re-running your test with a profiler tool or an APM Tool attached to your application - this way you will be able to tell what is the bottleneck, i.e. which component slows the whole system down.