Search code examples
jmeterperformance-testingload-testingtaurus

Is my server too weak to run a simple JMeter test plan with 150 concurrent users?


I'm trying to create a Load Test with JMeter. I have a pretty simple test plan that:

  • Contains all the standard HTTP Cookie Manager, Cache Manager etc.
  • Contains a CSV Data Set Config with one million valid user names.
  • It accesses the login page and commits a user name to get authorized.
  • It then accesses a page that does some database requests and
    displays the result.

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:

  • I don't run my tests in the GUI.
  • I have no listeners in the test plan.
  • I have increased the Java heap size to 28 GB.
  • I fetch embedded resources, but only from within the domain.
  • The environment that hosts the web page should easily be able to handle more than 150 users.

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:

  • Virtual machine running Oracle Linux Server 7.5
  • 4 cores of an Intel Xeon E5-2650 v3 @ 2.3 GHz
  • 32 GB RAM

Are there anything obvious that I'm missing or is my server simply too weak?`

Thanks in advance! Best regards


Solution

    1. 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.

    2. 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

      enter image description here

    3. 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

    4. 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.

    5. 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.