Re: How to Calculate Pacing , any effective formaula will be great help.

6,107 views
Skip to first unread message

Avi

unread,
Jul 6, 2012, 10:13:40 AM7/6/12
to lr-loa...@googlegroups.com, LR-Loa...@googlegroups.com
24 sec

Sent from my iPhone

On Jul 6, 2012, at 7:02 PM, shakti sareen <shakti...@gmail.com> wrote:

Example:
 
Volume defined as : 400 transcation per hour needed by business
Vuser Load : 8
Total no of transcation in a script: 5
Think time in script: 10 sec
Execution duration in hours: 1 hour to run
Time taken by 1Vugen in 1iteration: 30 sec
 
What will be the right pacing for the same, if some one can explain with desciption it will great help
 
if any excel with calculation on the same i can get will do wonders for me :)
 
thanx
 
 

--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

Bhavin Patel

unread,
Jul 6, 2012, 11:38:53 AM7/6/12
to lr-loa...@googlegroups.com
ok I am no expert. but I can help you in calculation 

I assume that you have count your think time (10 secs) in total iteration time (30), and you have 8 concurrent vUsers. 

1 vUser is taking 30 secs for 1 iteration, and one iteration has 5 transactions so 5 transactions per 30 seconds. 

now if those 8 vUsers are running concurrently (same time), you will have 40 transactions per 30 seconds. 

So you can complete all the transactions in 5 mins ( 400 transactions in 300 seconds)(10 iterations)  

So you can give pacing 330 seconds between each iteration. 



now if you have 40 seconds for total iteration ( 30 +10) and 8 users are simultaneous users then 

 1 vUser is taking 40 secs for 1 iteration, and one iteration has 5 transactions so 5 transactions per 40 seconds. 

now if those 8 vUsers are running simultaneously, you will have 40 transactions per 320 seconds (8 iterations) 

 So you can complete all the transactions in 53.33 mins ( 400 transactions in 3200 seconds) (80 iterations) 

So you can give pacing  seconds between each iteration is 5 secs. 

I just did basic math. Please expert correct me if I have done something wrong. 

Thanks,
Bhavin 

Sagar Aggarwal

unread,
Jul 6, 2012, 12:32:16 PM7/6/12
to lr-loa...@googlegroups.com
I feel there is something wrong here..

"1 vUser is taking 40 secs for 1 iteration, and one iteration has 5 transactions so 5 transactions per 40 seconds.now if those 8 vUsers are running simultaneously, you will have 40 transactions per 320 seconds (8 iterations) "

if there are 8 Vusers.. there will be 8 transactions per iteration.because 8 Vusers will be spread across 5 scripts.

Here is my calculation

Think Time + Response Time = 10 +30=40 seconds

so 1 Vusers will complete transaction in 1 sec=1/40=0.025

but the TPH requirement for 8 Vusers is=400, 
So TPH for 1 Vuser will be= 400/8=50
so TPS for 1 Vuser = 50/3600=0.014

so we have to reduce the time taken for one script, which we can add into pacing i.e. 1/(40+P)=0.014

so Pacing (P) will be 31 seconds.


we can see the verify our result as well:-

Think Time + Response Time + Pacing = 10 + 30 + 31=71 seconds

so 1 Vusers will complete transaction in 1 sec=1/71=0.014

so 1 Vusers will complete transaction in 1 hour=0.014*3600=50.7

so 8 Vusers will complete transaction in 1 hour=50.7*8=405 Transactions

I have assumed, all the script will have same think time & all will take 30 seconds for 1 iteration.

Please let me know, if anything wrong in the above calculation

Regards,
Sagar Aggarwal

Bhavin Patel

unread,
Jul 7, 2012, 9:50:27 PM7/7/12
to lr-loa...@googlegroups.com

I am still having some queries here.. 
At my work place I set up my script with multiple transactions(n) so if 1 iteration completes, you have n number of transactions. 
AM I doing something wrong? 


Sagar, 
if there are 8 Vusers.. there will be 8 transactions per iteration.because 8 Vusers will be spread across 5 scripts.
(how do you tell that 8 Vusers will be spread across 5 scripts.) bez as per initial query "Total no of transactions in a script: 5"

Avi, 
How did you get this number? 24 sec can you please explain? 

Can some other expert try to explain this? 


Thanks,
Bhavin 

Sagar Aggarwal

unread,
Jul 9, 2012, 10:42:32 AM7/9/12
to lr-loa...@googlegroups.com
My Bad...
 
I missread it.. I thought there are 5 scripts..but still my calculation should not be impacted as i didnt include that in my calculation.
 
We can have any no. of transactions in a scripts. we can divide the transaction into sub transactions as well but it should not have any impact on TPS because we can consider all the transactions as one transaction for one iteration while calculation.

for e.g. if one iteration includes login, enrollment,log out together then for any no. of iterations say 5, login, enrollment & log out will be invoked 5 times.

 while calculating pacing, we can consider wrapper transaction (Action as one transation), Total Think Time & TPS

 Please correct me if I am wrong somewhere.. I have used this method & I have got correct TPS & pacing time. This has been validated in PC as well.
 
Regards,
Sagar Aggarwal

Mital Majmundar

unread,
Jul 10, 2012, 2:43:38 AM7/10/12
to lr-loa...@googlegroups.com

400 transactions per hour required by business in 1 hour by 8 virtual users.
So 1 virtual user should be doing 400/8=50 transactions.
Now, 1 v user is doing:
1 iteration in 30 secs
Hence, in an hour 1 v user does 120 iterations, which is 70 more than required.
So you need to adjust time of 70 iterations, which is 70*30=2100 secs.
So the efective pacing would be 2100 secs.
I suggest you go for a random pacing of 2000 to 2200 secs of pacing with third option selected which also takes into account the think time you havw provided.

Let me know in case of any issues about the above explanation.

Adil Ahmed

unread,
Jul 10, 2012, 3:31:05 AM7/10/12
to lr-loa...@googlegroups.com
Pacing should be approximately 355.55 seconds

Here you go with the calculation:

Time taken for each iteration with 8 users and 5 transactions per script (40 transactions in 30 seconds) - Derived from your email.
so i = 30 seconds

Total iterations Ti = 10 , because 10* 40 = 400 transactions (requirement),

No of times pacing comes into picture Pn= Ti - 1- 9

Total run duation Td = 3600 seconds

Pacing in seconds:
Ti * i + Pn * p = Td
10*30 + 9*p = 3600
9p = 3600-300 = 3200
p = 3200/9 = 355.56 seconds

NOTE: System performance has been slightly ignored.

Hope this helps.

Regards,
Adil

Adil Ahmed

unread,
Jul 10, 2012, 5:22:05 AM7/10/12
to lr-loa...@googlegroups.com
Sorry, the pacing should be 355.5 seconds/ No of Vusers = 44.44 seconds.

Regards,
Adil

Adil Ahmed

unread,
Jul 10, 2012, 5:34:36 AM7/10/12
to lr-loa...@googlegroups.com
The correct one:

Pacing should be approximately 45.83 seconds

Here you go with the calculation:

Time taken for each iteration with 8 users and 5 transactions per script (40 transactions in 30 seconds) - Derived from your email.
so i = 30 seconds

Total iterations Ti = 10 , because 10* 40 = 400 transactions (requirement),

No of times pacing comes into picture Pn= Ti - 1- 9

Total run duation Td = 3600 seconds

Pacing in seconds p for all users:
Ti * i + Pn * p = Td
10*30 + 9*p = 3600
9p = 3600-300 = 3300
p = 3300/9 = 366.66 seconds

Pacing in seconds per user P = p/(no of users) = 366.66/8 = 45.83 seconds.

NOTE: System performance has been slightly ignored.

Hope this helps.

Regards,
Adil

Adil Ahmed

unread,
Jul 10, 2012, 1:33:36 PM7/10/12
to lr-loa...@googlegroups.com

Mr. Majumdar, u r confused with transactions and iterations. Check out once again. 2000 seconds of pacing, does that make sense.

Mital Majmundar

unread,
Jul 11, 2012, 1:49:30 AM7/11/12
to lr-loa...@googlegroups.com

Hello Adil,

Yes i think i missed tht point of transactions and business process. But i guess i gave a fair idea of how to calculate pacing.

pramod phophalia

unread,
Jul 11, 2012, 2:33:54 AM7/11/12
to lr-loa...@googlegroups.com
Hi,

The pacing should be 330 seconds

400 Transactions  - 1 hour

400/8 = 50 transactions/vuser

1 vuser = 50/5 = 10 Iterations/Vuser

Duration required for completing 10 iterations
10 * 30 = 300 seconds

Total Duration of run (1 hr) = 3600 seconds

Extra time

3600 - 300 seconds = 3300 seconds

Pacing  = Extra Timing/No of Iterations

i.e Pacing = 3300/10 = 330 seconds

So these calculation for 1 vuser goes like 

5.5 minutes + 0.5 minutes = 6 minutes/Iteration

In 60 Minutes =  60/6 = 10 iterations per Vuser
8 Vuser = 10 * 8 = 80 Iterations
80 iterations * 5 Transactions/Iteration = 400 Transactions  in 1 hour

Thanks
Pramod

Adil Ahmed

unread,
Jul 11, 2012, 1:52:44 AM7/11/12
to lr-loa...@googlegroups.com

True.

That's a bottom up approach.

Adil Ahmed

unread,
Jul 11, 2012, 2:40:53 AM7/11/12
to lr-loa...@googlegroups.com
I was right in the first go.

The pacing should be 366.66 seconds.

It just does not depend on the no of vusers when they are concurrently impacting the system.

All 8 users will complete their 1st iteration in 30 seconds and should wait for 366.66 seconds and then start their second iteration and so on and so forth.

@ Pramod: pacing comes into picture only 1 less than total no of iterations, in this case 10-1 = 9.

Regards,
Adil

Adil Ahmed

unread,
Jul 11, 2012, 11:22:50 PM7/11/12
to lr-loa...@googlegroups.com

Response times are ignored.

On Jul 12, 2012 12:51 AM, "Ashish Tyagi" <tyagi.a...@gmail.com> wrote:
Are you sure that a single iteration will take the same time for a single run in VuGen as compared to an 8 user run in Controller? If the response times change, the pacing will also need to be changed.
 
Ashish

On Friday, July 6, 2012 7:02:04 PM UTC+5:30, shakti sareen wrote:

Mital Majmundar

unread,
Jul 12, 2012, 1:49:43 AM7/12/12
to lr-loa...@googlegroups.com

@ashish - Selecting the third option in the pacing selector can prevent what you are suggesting. The third option in pacing means the one in which it will wait for a given amount of time no matter when it finishes. Supposing that the iteration gets completed in 60 secs max, the pacing that we have provided is 366 secs . So it wait for rest of the time and then start the second iteration.

piyush gupta

unread,
Jul 13, 2012, 12:15:02 PM7/13/12
to lr-loa...@googlegroups.com
what if i select in the pacing option "at fixed intervals every 360 seconds(6 minutes"  because how could you calculate exact iteration timing at multiple user load.

Adil Ahmed

unread,
Jul 13, 2012, 12:42:11 PM7/13/12
to lr-loa...@googlegroups.com

Bala, u r wrong. Think again.

On Jul 13, 2012 6:49 PM, "balakrishna chowdary" <balucho...@gmail.com> wrote:
Pacing should be 30 sec.

Here 400 transactions should processed per 1 hour(3600 Sec) with 8 Vusers.

So each user should process 50 transactions (i.e. 400/8 = 50 tran/1 user).

1 iteration = 5 transactions ( as shakti sareen said)

10 iterations = 50 transactions.

So 1 user should process 10 iterations.

Then 8 users should process 80 iterations.

time to execute 1 iteration is 30 sec.

time to execute 10 iteration is 300 secs.

so time to execute 80 iterations is 2400 secs.

we have 1 hour. i.e. 3600 sec

remaining time is 3600-2400=1200 sec

so all 80 iteartions should share remaining 1200 secs.

1200/80 = 30 sec.

So Pacing should be 30 sec if we ignore response times. Bcoz some times response times vary for iteration to iteration.

Please correct if i am wrong

Thanks
Bala

Bhavin Patel

unread,
Jul 14, 2012, 1:11:47 PM7/14/12
to lr-loa...@googlegroups.com

basic math... 
1 iteration = 40 transactions ( 8 users is constant) 
10 iteration =  ?? 

(10 iteration* 40 transactions)/ 1 iteration=400 transactions.










On Sat, Jul 14, 2012 at 8:32 AM, balakrishna chowdary <balucho...@gmail.com> wrote:
Adil, 

If you give 366 sec as pacing, it is around 6 mins. 

we have 1 hr execution time i.e. 60 mins

time to execute 1 iteration is 30 sec. 

if we execute the script for 10 iterations, the time it took is 300 sec(5 mins).

if we give pacing 6 min, for 10 iterations it would be 54 mins

So if we execute 10 iterations, the total execution time + pacing (5 min + 54 min) = 59 mins....(almost 1 hour).

1 iteration with 1 user = 5 transactions

1 iteration with 8 users = 40 transactions

10 iterations with 8 users = 80 tranactions

so in 1 hr 80 transactions are processing here....but we have to process 400 transactions

Adil is this correct?

-- Bala

On Friday, 6 July 2012 19:02:04 UTC+5:30, shakti sareen wrote:
Example:
 
Volume defined as : 400 transcation per hour needed by business
Vuser Load : 8
Total no of transcation in a script: 5
Think time in script: 10 sec
Execution duration in hours: 1 hour to run
Time taken by 1Vugen in 1iteration: 30 sec
 
What will be the right pacing for the same, if some one can explain with desciption it will great help
 
if any excel with calculation on the same i can get will do wonders for me :)
 
thanx
 
 

--

Adil Ahmed

unread,
Jul 16, 2012, 10:42:20 AM7/16/12
to lr-loa...@googlegroups.com

Der u go shakti. Calculated right but that should be div by 9.

On Jul 16, 2012 6:34 PM, "shakti sareen" <shakti...@gmail.com> wrote:
To find out pacing basic formaula which can be used based on condition i have given is :
 
Total Duration/K
 
where K= Transcation Per Hour/Total No of Vusers
 
Hence K= 80 / 8= 10
 
3600/10=360 pacing (this is not the accurate pacing, but near by which is required, easy way)

Rishu Sarpal

unread,
Jul 17, 2012, 8:38:08 AM7/17/12
to lr-loa...@googlegroups.com
Guys the total time for each iteration will be 72 seconds to achieve 400 transactions 

reduce 30 seconds iteration time , so pacing comes out to 42 seconds

Regards
Rishu


On 17-Jul-2012, at 2:21 PM, balakrishna chowdary wrote:

Adil, you are right.....pacing is 366 sec..... I did wrong calculation. 

Adil Ahmed

unread,
Jul 17, 2012, 11:19:14 AM7/17/12
to lr-loa...@googlegroups.com

Thanks bala.

Rishu, please look up for calculations been done by engineers. You will get an idea.

Regards,
Adil

tarjun1110

unread,
Jul 28, 2012, 12:14:20 PM7/28/12
to lr-loa...@googlegroups.com
Hi
If u need to achieve(2000 transactions total) 400 txns for each transaction then pacing will be 72 seconds
f u need to achieve(400 transactions total) 80 txns for each transaction then pacing will be 360 seconds .

Regards,
Arjun

tarjun1110

unread,
Aug 29, 2012, 8:29:12 AM8/29/12
to lr-loa...@googlegroups.com
Hi ,
Please find below steps to calculate pacing.

X= users

Y= transactions per hour

Now convert transaction per hour into transactions per second i,e

Z= Y/3600

 

Now pacing P= X/Z seconds.


Thanks,

Arjun



On Sat, Aug 25, 2012 at 6:52 AM, Peter <pruthvi...@gmail.com> wrote:
I have a feeling that you posted it wrong.

Assuming that 400 txns/hr includes all the transactions (5) in your script and the total think time in your script is 10 secs, here is my analysis.

400/8 users = 50txns/ user

1hr = 3600 sec

3600/ 50 txns = 72 secs

So, use the pacing type: After the previous iteration ends with a fixed/random delay and use 72 seconds.

Done ! 
Reply all
Reply to author
Forward
0 new messages