Performance Testing Basics – What is Throughput?

by Joe Colantonio

Post image for Performance Testing Basics – What is Throughput?

What is Throughput:

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

For example:

Let's Imagine

Let’s imagine that a gas station attendant fills 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.

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. When presenting performance test results, throughput performance is often expressed as transactions per second, or TPS.

Real performance test throughput results:

I use HP's LoadRunner (which comes with a throughput monitor) for performance testing. In a typical test scenario, 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 load each user makes 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. If the throughput enters this state, however, it is usually due to some kind of bottleneck in the application.

A look at a typical throughput results

Below are the LoadRunner throughput chart results for a 25-user test that I recently ran. Notice that once all 25 users are logged in and doing work, the throughput stays fairly consistent. This is expected.

Good Throughput Chart

Now notice what throughput looks like on a test that did not perform as well as the last example. All of the users log in and start working; once all users are logged in making request 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 example above usually has to do with a bottleneck. By overlaying the throughput chart with a 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.

Recap

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.

Extra
For more detail info on performance testing make sure to grab a copy of Performance Analysis for Java(TM) Websites.

Related posts:

  1. Become Your Company’s Performance Testing Yoda: Two Books to Help You Harness the Force
  2. HP Diagnostics: How to Install and Configure a Java Probe with LoadRunner without Feeling Like You’ve Been to an HP Proctologist
  3. 10 Performance Tips to Help Optimize Your QuickTest Professional Code

{ 13 comments… read them below or add one }

TM August 15, 2011 at 6:07 pm

Excellent. It helped me to understand with the simple examples and the visual graphs.

Reply

Joe Colantonio August 15, 2011 at 6:15 pm

TM » Thanks! I really appreciate your feedback. It helps me in planning what types of future post I should focus on. Cheers~Joe

Reply

shailesh December 19, 2011 at 6:06 am

Hi,
i would like to know…What is pacing?why pacing should be given between iteration or what if pacing is not given…

Thanks in advance.

Reply

Joe Colantonio December 22, 2011 at 3:08 pm

shailesh » Hi Shailesh – Good question – I think this quy can explain it better than me:. Hope it helps. Cheers~Joe

Reply

earnest January 18, 2012 at 12:13 pm

Shailesh,
Pacing is the time you wait between iterations.

BTW this is a great article JOE.

Reply

Joe Colantonio January 18, 2012 at 12:47 pm

Thanks Shailesh! I like your pithy definition for pacing :) Cheers~Joe

Reply

Paul January 11, 2012 at 7:48 pm

Thanks for the article. It’s really helpful !!

Reply

Joe Colantonio January 11, 2012 at 9:43 pm

Paul » Thanks Paul – I’m glad it helped you! Cheers~Joe

Reply

kumar February 22, 2012 at 2:09 am

Nice article. I do have one question.i was going through the Loadrunner training manual and in that it mentions “If throughput has flattened out while the number of Vusers increase, there is a likely a bandwidth issue.” But i feel your explanation is more correct. can you please shed some views on this?

Reply

Mathews April 4, 2012 at 9:24 am

Hi Joe, I woulld like to know that, what are techniques or methods that can be used to evaluate throughput in terms of computing ? [I am a Computer Science Honours student (South Africa), and currently doing something on throughput evaluation ]

Reply

Joe Colantonio April 9, 2012 at 8:34 pm

Mathews » Hi – First I would use a performance test tool like LoadRunner,SoaSta, Grinder or JMeter to place a load against the test system. I would start with one user and increase the user load by small increments until I found the throughput plateau. I consider a plateau to be the point where either the throughput really falls off or the response time is well over what is acceptable for my requirements.That’s it in a nutshell – this may be to basic for your needs.

Reply

fazal April 12, 2012 at 9:36 am

i want to know that what is throughput out and throughput in.
one think i must tell you, your way of explaining is toooooo good.

Reply

Joe Colantonio April 12, 2012 at 1:45 pm

fazal » Thanks Fazal.

Reply

Leave a Comment

{ 3 trackbacks }

Previous post:

Next post: