Roshan r
Roshan r

Reputation: 522

Why different results in JMeter when threads are reduced?

I have a test plan where I have to pick 100 users from a CSV file. If I give threads count as 500 and loop count as 1, then I can see 490 are failed and only 10 are passed. But at the same time, if I give threads as 5 and loop count as 100, all the tests are passed. Aren't these same where the total number of requests are 500?

Is this because 500 threads and 5 threads?

Upvotes: 0

Views: 487

Answers (2)

Dmitri T
Dmitri T

Reputation: 168002

You get different results because you apply different load pattern. JMeter acts as follows:

  • Each Thread Group kicks off threads (virtual users) within the ramp-up period
  • Each Thread starts executing Samplers upside down (or according to the Logic Controllers)
  • When the thread doesn't have any more samplers to execute or loops to interate it is being shut down

So reasons could be in:

  1. Your application isn't capable of handling 500 users. Checks its logs for error details. If there are no specific errors it might be lack of hardware resources, re-run your test with JMeter PerfMon Plugin Telemetry to check the impact of the increasing load onto hardware resources consumption
  2. Your application underlying components is not suitable for high loads. Some application and database servers come with connection limitations, low memory allocation, etc. in other words configuration suitable for development and debugging. Production deployment assumes totally different configuration therefore it needs to be inspected and amended
  3. Your JMeter instance cannot create the required load. Like in point 2 JMeter default configuration is good for tests development, however when it comes to running load tests you need to mind some important points:

    • Increase JVM Heap size for JMeter
    • Run your test in non-GUI mode
    • Disable all the listeners during test run

      See Reducing resource requirements chapter of JMeter's User Manual for more information

Upvotes: 0

Satish Shihani
Satish Shihani

Reputation: 471

If you start 500 threads, By default, the file is only opened once, and each thread will use a different line from the file. However the order in which lines are passed to threads depends on the order in which you execute, which may vary between iterations.

Change Your Jmeter CSV-DataSet-Config property "Recycle on EOF - True" ; Your Issue will solve

Hope This Helps!

Upvotes: 1

Related Questions