DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Load Testing Essentials for High-Traffic Applications
  • How To Organize End-To-End Quality Assurance and Testing for E-Commerce Apps
  • Five Steps To Building a Tier 1 Service That Is Resilient to Outages
  • Spring Boot Pet Clinic App: A Performance Study

Trending

  • Building Resilient Identity Systems: Lessons from Securing Billions of Authentication Requests
  • Building Reliable LLM-Powered Microservices With Kubernetes on AWS
  • Blue Skies Ahead: An AI Case Study on LLM Use for a Graph Theory Related Application
  • How Kubernetes Cluster Sizing Affects Performance and Cost Efficiency in Cloud Deployments
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Advanced Load Testing Scenarios with JMeter (Part 4): Stepping Thread Group and Concurrency Thread Group

Advanced Load Testing Scenarios with JMeter (Part 4): Stepping Thread Group and Concurrency Thread Group

In this final blog post in this JMeter series, learn how Stepping Thread Groups and Concurrency Thread Groups can determine how many users your system can handle.

By 
Noga Cohen user avatar
Noga Cohen
·
Aug. 29, 16 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
20.8K Views

Join the DZone community and get the full member experience.

Join For Free

Welcome to the final blog post in our “Advanced Load Testing” series. This time, we will go over how to configure the Stepping Thread Group and the Concurrency Thread Group.

The Stepping Thread Group and the Concurrency Thread Group are convenient and stable ways to find out how much user capacity your system can handle. By adding users in steps, we know the exact number of virtual users tested when a bottleneck is discovered. If we test in a linear fashion, it is difficult to determine the precise number of users that causes issues in the system.

The Stepping Thread Group lets us create ramp-up and ramp-down scenarios in steps.

While the standard Thread Group lets us control the:

  • Number of threads

  • Linear ramp-up period

  • Duration

The Stepping Thread Group lets us:

  • Determine the same parameters as the standard Thread Group.

  • Increase thread load by portions.

  • Configure hold target load time.

  • Decrease load by portions.

First, install Customer Thread Groups from the JMeter Plugins Manager.

Then, add the Stepping Thread Group from the Test Plan.

jmeter add stepping thread group

Let’s look at the following scenario:

  • 1,000 threads as target load

  • 0 seconds waiting after the test starts

  • 0 threads run at the immediate beginning of the test

  • 100 threads are added every 30 seconds with a ramp-up (or step transition time) of 10 seconds

  • The target load is held for 300 seconds (5 minutes)

  • Finally, 10 threads are stopped every 3 seconds.

This means that:

  • The test begins immediately when JMeter starts, since there is 0 seconds waiting.

  • Every 30 seconds 100 users will be added, until we reach 1,000 users. The first step is 1-100, the second 101-200, etc., because we defined 0 threads to run at the beginning. If we defined 50 threads to run the first step would be 51 - 150, the second 151 - 250, etc. and the test would be completed faster.

  • It will take each of the steps (with 100 users each) 10 seconds to complete. After that JMeter waits 30 seconds before starting the next step.

  • After reaching 1,000 threads all of them will continue running and hitting the server together for 5 minutes.

  • At the end, 10 threads will stop every 3 seconds.

The Stepping Thread Group shows us the test in a real-time preview graph.

jmeter stepping thread group preview graph

By changing the values, you can ramp-up the load to monitor your server metrics.

Now you're ready to launch the test. Consider adding the Active Threads Over Time graph for tracking your load schedule’s performance and making sure it’s running as expected.

Using the Stepping Thread Group on BlazeMeter requires slight configuration. For more information see here.

You can also use the Concurrency Thread Group, which is more modern alternative to the Stepping Thread group as it is a better simulation of user behaviour, it lets you control the length of your test in an easier way and it creates replacement threads in case a thread finishes in the middle of the process. The Concurrency Thread Group also doesn’t create all threads upfront, thus saving on memory.

The parameters that you can define are:

  • Target Concurrency (Number of Threads).

  • Ramp Up Time — for the whole test.

  • Ramp-Up Steps Count.

  • Hold Target Rate Time.

  • Time Unit - minutes or seconds.

  • Thread Iterations Limit (Number of Loops).

  • Log Threads Status into File — saving thread start and thread stop events as a log file.

The Concurrency Thread Group doesn’t provide the ability to define initial delay, step transition and ramp-down — which the Stepping Thread Group does.

Add the Concurrency Thread Group from the test plan.

jmeter, add concurrency thread group

Let’s look at the following scenario:

  • 100 threads.

  • 30 minutes Ramp Up Time.

  • 10 Ramp-Up Steps.

  • 30 minutes holding the target rate.

This means that:

  • Every three minutes, 10 users will be added until we reach 100 users. (30 minutes divided by 10 steps equals three minutes per step. 100 users divided by 10 steps equals 10 users per step. Totaling 10 users every three minutes).

  • After reaching 100 threads all of them will continue running and hitting the server together for 30 minutes.

The Concurrency Thread Group also shows us the test in a real-time preview graph.

jmeter concurrency thread group preview paragraph


Now, record the script and run the test.

Congratulations! You are now ready to use both the Stepping Thread Group and the Concurrency Thread Group.

Load testing Testing

Published at DZone with permission of Noga Cohen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Load Testing Essentials for High-Traffic Applications
  • How To Organize End-To-End Quality Assurance and Testing for E-Commerce Apps
  • Five Steps To Building a Tier 1 Service That Is Resilient to Outages
  • Spring Boot Pet Clinic App: A Performance Study

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!