1. ## Calculating number of virtual users required to satisfy load

I've been working on a formula to determine the number of Virtual Users (VU) required to conduct a load test based on requirements. (Not stress testing.)

For example, I'm going to load test an application and I'm provided with the following requirements:

6,000,000 transactions per month
10 pages per transaction
The average user time per transaction is 60 seconds.

First, I determine the Transactions Per Second (TPS):

6000000 / 30 / 24 / 60 / 60 = 2.31 TPS

However, I like to estimate "peak" usage, so I use this forumla instead:

6000000 / 20 / 12 / 60 / 60 = 6.94 TPS

(This assumes 20 business days per month and 12 peak hours of high activity. This is only an estimate for peak usage. For us, reports show that peak levels are normally about 2X the true average, so this formula should be more than sufficient.)

Either way, once I know TPS I can determine the number of Pages Per Second (PPS):

6.94 TPS X 10 Pages Per Transaction = 69.44 PPS

To determine the number of VU required:

6.94 TPS X 60 Seconds Per Transaction = 416.7 VU

To verify this is correct, I think about it like this: 416.7 VU are sending a page view every six seconds, or 10 pages per minute. 416.7 X 10 = 4166.67 page views per minute. Dividing that result by 60 seconds = 69.44 PPS. This matches the PPS I calculated above.

What do you think? Does this make sense?

Thanks!

--Tim

2. ## Re: Calculating number of virtual users required to satisfy load

Tim,

"Does this make sense?"

What do you think?
Again, it makes sense. Will it work? That is a question to be answered by executing the test - the purpose of this type of testing. You may just end up stress testing with that volume. There is a possibility that you may have plenty of processing power to achieve your goals - or you may discover that you do not. There are a number of factors that can impact the outcome. Does this help?

Also - for other contributors: Will http 1.1 impact what Tim is driving at?

Thanks-Jim

[This message has been edited by jpensyl (edited 02-05-2001).]

3. ## Re: Calculating number of virtual users required to satisfy load

Thanks, Jim! The numbers I used were not real, but the 6,000,000 transactions per month might be.

In theory, I'm pretty confident that the forumla works for determining the number of Virtual Users (VU) when the requirements I listed are known. It's in the "real world" where I'm not sure if my assumptions will hold up or not. I plan to do some testing to find out.

One issue I see is that as VU are added, the response time may increase, which will then increase the time each transaction takes to complete. If that happens, the calculated number of VU will no longer be enough to generate the desired number of Pages Per Second (PPS), so the target load will not be met.

Another thing I'm trying to figure out is how to judge response time. For example, a transaction consists of 10 pages and playback time is 60 seconds. If, during the load test, the measured transaction time is 70 seconds, the assumption would be that the response time increased by one second per page?

--Tim

4. ## Re: Calculating number of virtual users required to satisfy load

Tim - I'm also wondering if the transaction 'type' will influence the results? I'm using the formula:
active workload = (#active users*avg load per user)+(#active jobs*avg load per job). I think the 'avg load per user' is your transaction rate - but that is really determined by the type of activity (simple or complex query, table update, data view, etc.).

So would I also have to decompose the tps rate to categorize transactions types?

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by TimBurleson:
Thanks, Jim! The numbers I used were not real, but the 6,000,000 transactions per month might be.

In theory, I'm pretty confident that the forumla works for determining the number of Virtual Users (VU) when the requirements I listed are known. It's in the "real world" where I'm not sure if my assumptions will hold up or not. I plan to do some testing to find out.

One issue I see is that as VU are added, the response time may increase, which will then increase the time each transaction takes to complete. If that happens, the calculated number of VU will no longer be enough to generate the desired number of Pages Per Second (PPS), so the target load will not be met.

Another thing I'm trying to figure out is how to judge response time. For example, a transaction consists of 10 pages and playback time is 60 seconds. If, during the load test, the measured transaction time is 70 seconds, the assumption would be that the response time increased by one second per page?

--Tim
<HR></BLOCKQUOTE>

5. ## Re: Calculating number of virtual users required to satisfy load

Tim & Melr-

What are your thoughts on http 1.0 vs. http 1.1? Might one over the other influence what you can expect for tps as well as potentially raise bottleneck issues on the VU hosts?

6. ## Re: Calculating number of virtual users required to satisfy load

jpensyl, I have been calculating transactions as application events - so your question is very interesting. I don't know enough about the version differences. My app is Web http - but I haven't been tracking version. I could see it as a bottleneck - but what type of transaction impact do you think it could have?

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by jpensyl:
Tim & Melr-

What are your thoughts on http 1.0 vs. http 1.1? Might one over the other influence what you can expect for tps as well as potentially raise bottleneck issues on the VU hosts?
<HR></BLOCKQUOTE>

7. ## Re: Calculating number of virtual users required to satisfy load

Tim: Your methodology jibes with the types of calculations that we use here at work.

We like to break down the number of pageviews/queries a month into a more "peak" number and use that number as the average. For our peak number, we plan on 30% more than the calculated number - but you could make it even higher for "bursty" activity (like Victoria secret live simulcast - LOL)

As far as which transactions to run during the tests - we take a profile of what is happening on the production site (we've been up and running for several years now, so we have historical data - this is more a challenge for newer sites).

Also I saw a question on HTTP 1.0 vs. 1.1 I don't think that the performance difference would matter at all, since 1.1 just defines more header info that extends the protocol messaging. I don't think it really makes the CPU on either the web server or client work harder (I could be mistaken).

It might be better to start a new thread asking the generality if there is a performance difference between the two protocols....

Good luck

8. ## Re: Calculating number of virtual users required to satisfy load

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by MelR:
jpensyl, I have been calculating transactions as application events - so your question is very interesting. I don't know enough about the version differences. My app is Web http - but I haven't been tracking version. I could see it as a bottleneck - but what type of transaction impact do you think it could have?

<HR></BLOCKQUOTE>

I was thinking that http 1.1 permitted multiple connections to a web server and that code could be included within a LoadRunner script to make use of that. My experiences with that aspect are limited.
?? - Jim

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.