# Flexible Thread Scheduling

There is a plug-in for JMeter that we can use to increase or decrease the number of threads at a scheduled time in JMeter tests.

The Ultimate Thread Group provides flexible thread scheduling to your test scenario. It allows you to create a scheduled thread with advanced configuration.

Available scenarios with the Ultimate Thread Group are as following:

* Multiple scheduled records can be defined
* Start Threads Count, Initial Delay, Startup Time and Hold Load Time can be defined separately for each record
* Scheduled load preview can be displayed on the chart

### **Step 1: Add Thread Group**

Test plan -> Add -> Threads (Users) -> jp\@gc – Ultimate Thread Group

![](https://loadium.com/wp-content/uploads/2020/04/Picture1.png)

#### 🙌🏻  **Example:**

* The test will start with 70 threads
* At the 20th second of the test, 200 threads will be reached by adding 130 threads with a 4 second ramp up.
* After working with 200 threads for 25 seconds, 130 threads will be closed.
* In the 60th second of the test, 150 threads will be reached by adding 80 threads with a 4 second ramp up.
* After working with 150 threads for 25 seconds, 80 threads will be closed.
* Continue with 70 threads until 2 minutes are completed.

![](https://loadium.com/wp-content/uploads/2020/04/Picture2.png)

To make it more understandable, we have marked the area that each record covers on the chart.

**Note**: *Threads are automatically closed when the given hold load time is complete. If there are threads that are not closed, there are thread blocking operations.*

### **Step 2: Basic Settings**

Required configurations on the “New Tests” screen for the JMeter test scenario using ultimate thread group:

* **Thread Count** value should be calculated and entered at the maximum thread number that will run simultaneously. For example: In the example above, max 200 threads will work in one engine at the same time.
* **Duration** value should be set according to the timeline in the ultimate thread group preview graphic. It’s not a problem that the time determined is more than the ultimate thread running time. Testing will end automatically when threads are finished.
* **Iteration** and **Ramp up Time** values are managed by the Ultimate thread group plug-in.
* The **Engine Count** value should be set accordingly as many as the number of engines requested.

#### ![](https://loadium.com/wp-content/uploads/2020/04/Picture3.png)

Thread group values in the Ultimate thread group are not updated with the interface. You must do the necessary thread group config in jmx. You can save and run the test.

Report resulting from the above test:

![](https://loadium.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-24-at-18.22.47.png)

Enjoy load testing!

{% content-ref url="/pages/-MUSAunBwe2J09CIl1hu" %}
[JMeter Test](/create-test/jmeter-test.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUSDT9m95VYzdFJ536o" %}
[Sandbox](/test-settings/what-is-sandbox.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUSDlUqfBVdT1lh-1Bf" %}
[Dedicated IP old ui](/test-settings/what-is-dedicated-ip-old.md)
{% endcontent-ref %}

If you don't see the answer to your question here, please [reach out to us](https://loadium.com/contact-us/) to let us know! We're always improving our documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.loadium.com/test-settings/flexible-thread-scheduling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
