Skip navigation.

Performance Requirements

non-functional testing | performance testing
Performance requirements (PR) are necessary for system design and development. If there is no written performance requirements, it just means that they exists in heads of stakeholders, but nobody bothered to write them down and made sure that everybody agrees with them. Then PR will be input for performance testing (where they will be validated) as well as capacity planning and production monitoring (SLA - Service Level Agreement).

There are three classes of performance requirements: response times (how fast the system handle individual requests, what a real user would experience), throughput (how many requests the system can handle), and concurrency (how many users or threads work simultaneously). All classes are vital: good throughput with long response times often is unacceptable as well as good response times for a few users only.

Response times (in case of interactive work) or processing times (in case of batch jobs or scheduled activities) define how fast requests would be processed. Acceptable response times should be defined in each particular case. A time of 30 minutes can be excellent for a big batch job, but absolutely unacceptable for getting a web page in a customer portal. Although it is often difficult to draw the line here, this is rather a common sense decision.

A lot of research was done to define what response time should be for interactive systems, mainly from two point of view: what response time is necessary to achieve optimal user’s performance (for task like entering orders) and what response time is necessary to avoid web site abandoning (for the Internet). Most researchers agreed that for end-user response times (services, for example, are a completely different story) of interactive applications for most cases there is no point making response time faster than 1-2 sec and it is better to make some kind of indicators (like a progress bar) if it takes more than 5-10 sec.

The service / stored procedures response time objectives should be determined by its share in end-to-end performance "budget" that is defined by end-to-end on-line response time or batch performance requirements (so the worst combination of all required services, middleware and presentation layer overheads will provide the requested time). For example, if there is a web page with 10 drop-down boxes calling 10 separate services, the response time objective for each service may be 0.2 sec to get 3 sec average response time (leaving 1 sec for network, presentation, and rendering).

Response times for each individual transaction vary, so we need to use some aggregate values when specify performance requirements like averages or percentiles (for example, 90% of response times are less than this value). Maximal / timeout times should be provided also if necessary.

Throughput is the rate at which incoming requests are completed. Throughput defines load on the system and is measured in operations per a time unit. It may be the number of transactions per second or the number of adjudicated claims per hour.

Defining throughput may be pretty straightforward for a system doing the same kind of operations all the time like processing orders or printing reports (although in many cases some further metrics may be necessary as the number of items in order or the size of report). It may be more difficult for systems where different kind of loads exist: the ratio of different types of request can change with time and season.

It is also important to see how throughput differs with time. For example, throughput can be defined for typical hour, peak hour, and off-hour for each particular kind of load. In some cases, it is important to detail further what the load is hour-by-hour.

The number of users doesn’t, by itself, define throughput. Without defining what each user is doing and how intensely (i.e. throughput for one user), the number of users doesn’t make much sense as a measure of load. For example, if there are 500 users running short queries each minute, we have throughput of 30,000 queries per hour. If the same 500 users are running the same queries, but one per hour, the throughput is 500 queries per hour. So there are the same 500 users, but a 60-time difference between loads (and, respectively, hardware requirements for the system).

Concurrency, the number of users or threads working simultaneously, is important too. Even if users are connected, but not active, they still hold some resources.

The terminology is somewhat vague here. Usually three metrics used:
• Total or named users: all registered or potential users. That is rather a metric of data the system work with. Also indicate the upper potential limit of concurrency.
• Active or concurrent users: users logged in during the specific moment of time. That one is the real measure of concurrency in the sense it used here.
• Really concurrent: users actually running requests in the same time. While that metric looks appealing and used quite often, it is almost impossible to measure and rather confusing: to be exact, the actual number of request that can be executed simultaneously at any single moment of time is equal to the number of processors.
It is important to understand what users you are speaking about: difference between each of these three numbers of users for some systems may be hundred of times. Of course, it heavily depends on the nature of the system.

Finding of the number of concurrent users for a new system can be tricky. Usually information about real usage of similar systems can help to make the first estimation.

For batch jobs, it is also important to specify all schedule-related information like frequency (how often the job will be run), time window, dependency on other jobs and dependent jobs (and their respective time windows to see how change in one of the job may impact other).

All context is important. Performance isn’t something completely independent. It depends, for example, on hardware resources provided, volume of data it operates on, and functionality included in the system. So if any of that information is known, it should be specified in the requirements. While hardware configuration may be determined during the design stage, the volume of data to keep is usually determined by business and should be specified.

Scalability is the ability of a system to meet performance requirements as the demand increases (usually by adding hardware). Scalability requirements may include demand projections for the system such as increasing of the number of users, transaction volumes, data size, or appearing additional types of load for specific point of time in the future.

A good book in performance analysis

A very good book indeed. About performance analysis and capacity planning. As I recall not much about testing or development. I believe that it is not the opposite approach, it is another area.

You don't need to request decision makers to define up-front all the decision rules, you need to define what system you are developing. For small systems you perhaps can keep it in mind (although I think it is worth efforts to document it), but for large system it is really the only way.

Analyze performance VS test requirements

My first book on performance testing was "The Art of Computer Systems Performance Analysis." published on 1991. . There is no “testing” in the title and there are only 3 (out of 720) pages in chapter “3.5 Setting performance requirements.” which is a great chapter in a fantastic book however. The book (and my practice) focuses on the art of analyzing performance characteristics and presenting them in a form readable by decision makers. I believe the opposite of this approach is requesting decision makers to define up-front all the decision rules and based on those rules make the decisions for them based on test results.

Yes, the subject is deeper than looks at first glance

Really what I posted here are topics I have some opinion about. The more I looking into the subject of performance requirements, the more issues I see. And about many of them I don't know what is the best way (or even a good way) to approach them. Moreover, haven't read anything going beyond stating these issues.

Goals vs. requirements are one of such issues. It definitely exists. Yes, most response time requirements (and sometimes other kinds of performance requirements, although for many internal applications we often know throughput and the number of online users) are goals (and sometimes dreams or just nonsense), not requirements. At one point I was close to say that we need to specify both goals and requirements. And, by the way, we know that requirements exist. There is a point where customer (whoever it is) says: no way it goes in production with such performance. For most interactive web applications, I guess, that point is somewhere between 8 sec and 1 min. But quite often we have a grey area where we see that performance is multi-dimensional. For example, you state that you have 10 sec requirement. And you got 15 sec under full load. But what if we know that this full load is potential high load in the busiest day of year, max load for other days gets below 10 sec, and we see that it is CPU-constrained and may be fixed by hardware upgrade? The real response time requirements are so environment and business dependent, so for many applications it is somewhat cruel to force people to make such hard decision in advance for each possible combination of circumstances. Maybe it is okay to specify goals (making sure that they make sense) and then, if they are not met, make the decision what to do having full information on hands?

But saying that I still strongly believe that we need to specify performance requirements at the beginning for design and development (and, of course, re-use them during performance testing). And, while I agree with Ainars Galvans that validation of performance requirements isn't the only goal of performance testing, I can't agree that we need to discard performance requirements because most of them are not good and that we don't need to validate them. We need to figure out a way to make it better. I believe that forcing stakeholders just to think about performance increases chances to succeed. And performance requirements are a good way to do it as well as asking architects and developers how they are going to meet these requirements.

Another big question is how to specify response time requirements or goals. "99.5% of all transactions should have a response time less than 5 sec ..." is one way to do that. Other ways are average, max, different kinds of percentile, typical (not defined – perhaps median, 80% below x sec). Not mentioning that the number in percentile (90%, 95%, 98%, 99.99%) makes a big difference. Perhaps percentile is more typical in SLAs (service-level agreements). But what percentile number to use? Does it matter what happens with the 0.5%? Does it mean that 0.5% may be 7 sec or all of the may be timeouts? Or we need to specify a combination of requirements: for example, 80% below 4 sec, 99.5% below 6 sec, 99.99% below 15 sec? Or average 4 sec and max 12 sec? Or average 4 sec and 99% below 10 sec?

By the way, I am never comfortable when under load some transactions fail or have a longer response time in controlled environment and we don't know why. That indicates that we have a problem (or a few). And while customers are happy at the moment, I am not. When we have an unknown problem, why not to trace down and fix it in the controlled environment? What if that few failed transactions are a view page for your largest customer and you won't be able to create any order for that customer? Say, the view page fails when you have more than x orders for that customer?

Under concurrency I really mean the number of online users (the number of parallel session). By my opinion, requirements like support up to 20 concurrent reports don't make sense at all. And I wrote that in my post:

Really concurrent: users actually running requests in the same time. While that metric looks appealing and used quite often, it is almost impossible to measure and rather confusing: to be exact, the actual number of request that can be executed simultaneously at any single moment of time is equal to the number of processors.

The number of "concurrent" requests depends on the processing time for this request. For example, if request takes 1 sec, 20 concurrent requests mean 1,200 requests per minute. If request takes 30 sec, 20 concurrent requests mean 40 requests per minute. So if we improve processing time we can miss our requirement? I believe that we need to use throughput instead.

There are four independent requirements

Many people believe that there are only three independent performance requirements:
1) Response times
2) Throughput
3) Concurrency

In an ideal world we would not need more.

At the same time in my world, typically, under load some transactions fail or have a longer response time.
Nevertheless my clients are happy. They can live with a few longer responses or lost transactions.

So in a real world we need one more performance requirement:

4) Percent of transactions with a response time less than our response time requirement.

E.g. "99.5% of all transactions should have a response time less than 5 sec ..."

Yury

There are issues with performance requirements.

One of the ongoing frustrations in performance testing is the fact that performance requirements seem to be fluid and not hard and fast. Particularly the response requirements are the ones that are very hard to capture, secondly it is very hard to get an agreement on what is the correct requirement and they will easily be dismissed when the performance testing results show significant deviation from the requirements.

During WOPR6 I showed a better way of acquiring response requirements in combination with a prototype tool. This actually exposed the users to the experience that they would find when operating the application. In other words, I provided as much of the context and the environment that I could in a very early stage in order to solicit their opinion.
And even though this seems to be working well for collecting the initial response time requirements, they are still not seen as unmutable and will be dismissed if the performance test results showed deviations.

Here then is the bridge with Scott's comments. Because in order to move forward with your application or your system, a level of satisfaction by the users needs to be expressed. If the users decide that although they specified a three second response time, they are perfectly happy with a five second response time (after actually seeing it) so be it.

Some comments to the other two items of your requirements. it is my belief that before a system is architected an investigation needs to happen with regards to volumes, throughput, stability, reliability etc.. Once you start to develop a solid understanding of what actually is required from the system then you are able to devise an architecture that will support this. In the last few years I have been pushing (and participating) for early performance validation during the architecture review process. During the architectural review process prototypes are built in order to prove that the directions chosen are actually viable. By applying targeted performance tests to these prototypes the assumptions can be quickly verified and necessary changes to the plans can be adopted and incorporated. It has been my experience that this way of operating is very successful because it is light on process and heavy on results. Finding reliability, stability and throughput problems during your last end to end performance test is typically too little, too late.

With regards to concurrency, I believe that this is a direct results of the workload definition that you create when building your performance tests. in my practice, I do not specifically test for concurrency type issues, but I do create a workload that is as realistic as I can get and whatever comes out of the results with regards to concurrency I will investigate, review and give my opinion on. If I look back to the times that I actually had concurrency requirements specified, I find that most of these requirements were actually nonsense. The requirements where depicting situations that during a realistic load scenarios, even the extreme scenarios, would never occur. examples of these are the requirements for logins for instance. I have seen requirements that state: The system needs to be able to have 1000 users login simultaneously. while this might seem a very reasonable requirement it's most often just bloody nonsense.

I just want to close these comments with one statement.
Requirements are not unmutable.

This is a fact of life and quite frankly I would be dismayed if after all the tests and reviews we are not coming up with observations that could potentially change the requirements.
Our task is to recognize this and to most effectively deal with it.

Roland Stens

Alex, I know that we've ne

Alex,

I know that we've never really agreed on terminology, but I would like to encourage you to think about goals vs. requirements. My experience is that very few performance characteristics are actually required.

Take a look at the testing terminology that I've come to prefer and see if the distinction rings true for you.

--
Scott Barber
Chief Technologist, PerfTestPlus
Executive Director, Association for Software Testing
sbarber@perftestplus.com

Comment viewing options

Select your preferred way to display the comments and click 'Save settings' to activate your changes.