Skip navigation.

Performance Requirements / Load Testing

Mercury LoadRunner | performance testing | performance testing patterns
We can easily control load intensity in LoadRunner with think time. If you have scripts without think time and 1,000 users, you have 1,000 users running requests concurrently.

Let's guess that a query takes 1 sec in average. If you put 9 sec think time between queries, you will have about 100 users running requests concurrently (with 1,000 users logged in). If you put 99 sec think time between queries, you will have about 10 users running requests concurrently (with 1,000 users logged in). That change picture completely.

Without specifying the intensity of load, requirements like "With 400 users, no query will take longer than 15 seconds" are not too meaningful. And here we usually have problems. People defining performance requirement usually are ready to agree for 5-10 sec, perhaps 30 sec, but object, for example, 15-30 min think time and decreasing the number of users below the number of their named user. That usually creates much, much heavier load (and usually is equal to buying much much more powerful hardware and creating much much more sophisticated deployment). You would never, never have ALL your user running queries one after another without analyzing results.

Another extreme can be illustrated, for example, by a Cognos benchmark :

"USERS

To accurately judge the number of users that can be supported in a real world environment based on performance in a test environment, you must distinguish between named, active, and concurrent users.

Named users make up the total population of individuals who can be identified by and potentially use the system. They represent the total user community, and can be active or concurrent at any time. In a real-life BI environment, this is the total number of individuals authorized to use the system. It is the number of most interest when planning a BI implementation, because it tells you how many users you can expect to support in a given environment with the response times reported in a test environment.

Active users are logged on to the system at a given time. They include users who are simply viewing the results returned from a query. Although this subset of active users are logged on to the system, they are not sending requests. Based on Cognos’ experience with thousands of customers, a good assumption is that 10 percent of named users are active at any given time. Therefore, 100 active users represent an environment with 1,000 named users.

Concurrent users are not only logged on to the system, but represent the subset of active users who are sending a request or waiting for a response. They are the only users actually stressing the system at any given time. Based on Cognos’ experience with thousands of customers, a good assumption is that 10 percent of active users are concurrent users. Therefore, 100 concurrent users represent an environment with 1,000 active users and 10,000 named users."


While I completely agree with approach in general and user's classification, the ratio looks a little too high. And I completely disagree with the idea that if you test the system with 1,000 concurrent users you can state that you support 100,000 users. Although let's leave it on marketing conscience - I hope none of experienced engineers would state that.

Unfortunately we have one terminology / phychological trap here. When business/IT people defining performance requirements talk about concurrent users, they mean "active" users according the above specification. But as soon as you mention the classification above, they start insisting that they really mean "concurrent" users increasing workload we speak about in 10 (or whatever) times and probably increasing the cost of the system to support that workload in 100 (or whatever - but I guess that function is closer to exponential) times.

Realistic Model

Scott,

I completely agree with you and I believed that I was discussing how to create that "realistic model". I, at least, didn't intended to discuss its implementation in different load testing tools - so I am rather confused what in my note trigger your reply. You definitely need to implement whatever is "realistic model" - and most tools have enough ways to do it - the problem is to define the "realistic model".

Unfortunately the real life is too complicated and you can't exactly reproduce it in performance testing. So "realistic model" is always a trade-off between "reality" and "model". My "calculations" were oversimplified to get to the point - often you need to add staggering, randomness, etc.

Alex

Ahh, enter the flaw of tool usage vs. realistic usage models...

(For MUCH more detail, see www.perftestplus.com. In particular, most of the "User Experience, not Metrics" article series.)

Every load generation tool I have ever used, by default, either enters some static, predetermined, delay between page requests or parrots back the delay that was introduced during recording.

Tell me, how close does THAT mimic reality?!?

When is the last time YOU found 2 users that spent exactly the same amount of time viewing a page... every single time? This is a horrible model that leads to all kinds of misleading performance testing results. Once you remove human randomness from your tests, you create a lack of realism that can swing your test results from one end of the spectrum to the other by changing nothing other than when each user first requests the first page relative to one another.

Think about this example...

Say I have a test that simulates 100 users initially accessing the system over a 5 minute period and it has been determined that the delay between each page is the same for each user (though it may differ by page).

Now, say I execute one test that initializes those 100 users linearly over those 5 min, and say that my results "pass". Sounds good, right?

What happens if, instead of a linear distribution, I intialize them using a normal distribution? Maybe, the decrease in time between users at the 2.5 minute mark causes users to stack up at the login page? Now all of those users that got stacked, are even CLOSER together on EVERY SUBSEQUENT page! This creates an extremely bursty distribution that is totally unrealistic. (Not to mention that very few people actually acount for users giving up and abandoning the application). This test would result in a "fail".

So, which one is "right"? Neither! Communities of people do virtually nothing with a static or linear distrubution. Every individual must have variance (most often normally distributed across certian reasonable boundries - 3 standard deviations is a good guideline based on biological and psychological studies over hundreds of years.)

The bottom line is this, forget what the tool does, doesn't do, makes easy or difficult. Establish a realistic model, the FIND a way to impement it. If you need a new tool, get one or write one.

We wouldn't buy a hammer, the construct with only nails because we have a hammer would we? Sometimes drywall screws are the answer. We wouldn't try to drive a drywall screw with a hammer! We also wouldn't decide that nails are "close enough" to avoid buying a screwdriver! So why do we do it with load generation tools?

Sometimes I fear that too many people "check their common sense at the door" when they become testers. I guess that is a rant for another day.

--
Scott Barber
PerfTestPlus
Software Performance Specialist,
Consultant, Author, Educator
sbarber@perftestplus.com
www.perftestplus.com

I agree

I agree with everything you told, but my point was a little different. I spoke about getting performance requirements from customers. Usually we know the total number of users (named users) and what they supposed to do, but don't know the intensity of their actions. And, usually, that intensity is overestimated. Changing think times can drastically change load (as I illustrated by my super-simplified calculations), so it is one more variable to determine.

Performance testing user concurrency is not so simple

I am afraid that situation of concurrency of user sessions is often more complex than this. Generally it is necessary to analyse and understand the session handling of the application and infrastructure under test before you can start to take liberties with number of concurrent users. Statements about reducing ‘wait times’ and only '10% of concurrent users are active' can be dangerous.

For example, recently I have performance tested a J2EE application that had a user log-on. This deployed a 10 minute ‘inactive’ user time-out mechanism that would end a users session. It may have been assumed that timed-out inactive users could be re-logged in after 10 minutes. But this was wrong as the application server held the user’s log-on data in cache for another hour. But the application dumped the cache if the user logged out. The tests had taken this into account, log out some users, not log out others and not re-use the user ID for at least an hour. Then the SSL accelerator session caching had to be considered, these held sessions open for 20 mins. We also had to consider HTTP 1.1 which holds sockets open for a period after the web page has finished downloading (in our case it was 30 seconds, but this is configurable). I wont mention the load balancers or the database connections as you can already see that the emulation of user concurrency was quite complex.

Where short-cuts have to be taken to increase the load, (hey we’ve all done it), remember what isn’t being tested. Where connection concurrency is the biggest concern, consider using a 2nd performance testing tool with a simple ‘connection’ script. A good combination would be OpenSTA (or BAE Grinder) with M.I. LoadRunner, but others will work.
Note: Always use different boxes for each load testing tool, they are not made to work together.

Comment viewing options

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