Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of "Thread Group" in JMeter?

I don't clearly understand what is the meaning of a "Thread group" in JMeter. Does that means all the tests (Java requests etc) belong to a certain thread group run in a one thread or each test in that thread group runs in a separate thread? I couldn't get a clear understanding about this from JMeter documentations or googling.

like image 967
Manjula Avatar asked Sep 24 '12 02:09

Manjula


People also ask

What is a thread group?

A thread group represents a set of threads. In addition, a thread group can also include other thread groups. The thread groups form a tree in which every thread group except the initial thread group has a parent.

What is thread group in performance testing?

3.1 Thread Group As the name implies, the thread group element controls the number of threads JMeter will use to execute your test. The controls for a thread group allow you to: Set the number of threads. Set the ramp-up period. Set the number of times to execute the test.

How many types of thread groups are there in JMeter?

The results from a concurrent number of users perspective, with the settings presented above for the 2 types of thread groups are presented below: For the Arrivals Thread Group: For the Free Form Arrivals Thread Group: We can see that they're basically the same.


2 Answers

For explanation see:

  • http://jmeter.apache.org/usermanual/test_plan.html

A thread group is a set of threads executing the same scenario. Set the number of iterations in the configuration. Thread behaviour is defined according to ramp up and destroyed once the number of iterations per thread has elapsed.

Note that from version 2.8, you will be able to delay thread creation until the time the thread must start working, this will be adapted to tests that use very short lived threads and many threads.

Thread groups can be seen as a set of Virtual Users but not necessarily. It can be something else depending on how you develop your test.

like image 178
UBIK LOAD PACK Avatar answered Oct 19 '22 11:10

UBIK LOAD PACK


As I understood (What I wanted to know), All the operations in a JMeter thread group run sequentially once per each thread and iteration. So it means each of operations in a thread group does not run in its own separate set of threads, but it shared each thread with the other operations in its thread group.

For example,

  • Thread Group 1
    • Operation 1
    • Operation 2
    • Operation 3

If we have scheduled this thread group Thread Group 1 to run in 3 threads, what happens is,

  • Operation 1, Operation 2, and Operation 3 will execute in thread 1.
  • Operation 1, Operation 2, and Operation 3 will execute in thread 2.
  • Operation 1, Operation 2, and Operation 3 will execute in thread 3. etc

Previously I was not sure whether each of these operations run on its own separate thread.

like image 41
Manjula Avatar answered Oct 19 '22 11:10

Manjula