What is Throughput in Performance Testing?

Performance Testing Published on:
What is throughput in performance testing

Throughput is one of the most misunderstood performance testing concepts new testers sometimes struggle with. So what is throughput?

Here are the three best definitions of throughput: 

  • Basically, “Throughput” is the number of transactions produced over time during a test.
  • It’s also expressed as the amount of required capacity that a website or application can handle.
  • Also, before starting a performance test run, it is common to have a throughput goal that the application needs to be able to handle a specific number of requests per hr.

Read on to learn more about:

  • A brief overview of throughput
  • How to measure throughput in your performance tests
  • Examples of throughput in practice

Let’s Talk!

INDEX
Let's Imagine Throughput in the Real World
Real Performance Testing Throughput Results
A Look at Typical Throughput Results
Test #1
Test #2
Test #3
What is Throughput Recap

Let's Imagine Throughput in the Real World

Gas station work

For example: Imagine a gas station attendant filling up a car's gas tank using a gas pump.

Let’s also say that it always takes the gas attendant just one minute to fill up any car, no matter how big it is or how low the car's gas tank is.

Let’s call this gas station “Joe’s Gas” and envision that it only has three gas pumps. Naturally, if we have three gas pumps and three cars, it follows that Joe's attendants can only fill up three cars per minute.

So, if we were to fill out a performance report for Joe's gas station, it would show that Joe’s throughput is three cars per minute.

What is Throughput no wait

This is Joe’s dilemma: no matter how many cars need gas, the maximum number that can be handled during a specific time frame will always be the same –three.

This is our maximum throughput; it is a fixed upper-bound constraint.

throughput

As more vehicles enter the gas pump line, they are required to wait, thus creating a queue.

It is the same concept that applies if we are testing a web application. If a web app receives 50 requests per second but can only handle 30 transactions per second, the other 20 requests end up waiting in a queue.

In short, actual throughput in performance testing is often expressed as transactions per second or TPS.

Automation Testing Free Courses

Real Performance Testing Throughput Results

I use HP's LoadRunner (which comes with a throughput monitor) for performance testing. But other tools like jMeter have similar meters.

In a typical test scenario, these would definitely happen:

  • As users begin ramping up and making requests, the throughput created will increase as well.
  • Once all users are logged in and processing in a steady state, the throughput will even out since the user load test stays relatively constant.
  • If we wanted to find an environment’s throughput upper bound, we would continue increasing the number of users.
  • Eventually, after a certain amount of users are added, the throughput will start to even out and may even drop.
  • However, if the throughput enters this state, it is usually due to some kind of bottleneck in the application.

Get TestGuild Partnership Plans

A Look at Typical Throughput Results

Below are the LoadRunner throughput chart results for a 25-user test that I recently ran.

Test #1

Notice that once all 25 concurrent users are logged in and doing work, the throughput stays fairly consistent. This is expected.

Good Throughput Chart

Test #2

Now notice what throughput looks like on a test that did not perform as well as in the last example.

All users login and start working; once all users are logged in and making requests, you would expect the throughput to flatline.

But in fact, we see it plummet. This is not good.

Bad Throughput Chart

As I mentioned earlier, throughput behavior like the above example usually involves a bottleneck.

Work With Me

Test #3

By overlaying the throughput chart with an HP Diagnostics ‘J2EE – Transaction Time Spent in Element’ chart, we can see that bottleneck appears to be in the database layer:

Bad Throughput Chart with HP Diagnostics

In this particular test, requests were being processed by the web server. But in the back end, work was being queued up due to a database issue.

As additional requests were being sent, the back-end queue kept growing, and users’ response times increased.

To learn more about HP Diagnostics, check out how I configured LoadRunner to be able to get these metrics in my video: HP Diagnostics – How to Install and Configure a Java Probe with LoadRunner.

Free TestGuild Courses

What is Throughput Recap

Statistics Computer

To recap: Throughput is a key concept for good performance testers to understand and is one of the top metrics used to measure how well an application is performing.

I've also written some other posts on other concepts that a performance test engineer should know about:

Extra Performance Testing Awesomeness for your Ear Buds

For more detailed info on performance testing, make sure to grab a copy of the Performance Analysis for Java(TM) Websites. Also, make sure to check out some interviews with some of the biggest names in performance testing to discover even more performance testing awesomeness on our TestGuild Performance & SRE Podcast.

Contact Me

 

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
What is throughput in performance testing

15 Top Load Testing Tools for 2022 (Open Source Guide)

Posted on 08/16/2022

In the world of software development, testing is vital. No matter how well ...

The Ultimate Guide to Performance Testing

Posted on 06/07/2022

Performance matters, especially if you want to produce quality software. For this reason, ...

Testing Nirvana Basics – Four Steps to Performance Nirvana

Posted on 08/26/2021

Breathe In, Breathe Out – 4 Step Process We all know that performance ...