Understand the WorkLoad Model - Task Distribution Diagram
- Identify transactions and workflows, and calculate workload TPS goals and rates.
- Calculate think time and pacing.
- Understand how to log file analyses, run queries, and monitor production.
- Understand Little's Law
NFR05 Application Admin gets an avg of 200 Req/hr every time. 1. Admin so Iterations/hr =100
NFR06 Application The number of orders:
1. Peak Hour volume: 1340
2. Sale Hour Volume: 2830
3. Future Volume: 7500
4. Average Volume: 600
Note: 4% of the users cancel the order in every scenario. 1. Buyer
NFR07 Application Sellers add an avg of 180 products per hour and delete 18 existing products every hour 1. Seller
Pacing = (No. of Users / Iterations per second) – (End to End Response Time + Total Think Time)
2 - 0.028 = 71.4285
15+18 = 33
so Pacing Time = 71.4285 - 33 = 38.42
================================================
Total Think Time = Individual Think Time * (No. of Transactions – 1)
If the think time values are different between each transaction then simply sum-up all the think time values to get the total think time.
Total Think Time = (Think Time 1) + (Think Time 2) + (Think Time 3) + …….. + (Think Time N)
Pacing = (No. of Users / Iterations per second) – (End to End Response Time + Total Think Time)
500 -4500 --12trnxs
no of users = tps(RT+TT+PT);
500 = 4500/3600 (RT+TT+PT);
500 = 1.25(RT+TT+PT);
500/1.25=(RT+TT+PT);
400=(RT+TT+PT); here 400 is a total RT+TT+PT
here executing the 12trnxs without think time the RT is taking 24 sec's.
so 400-24=TT+PT
376 =TT+PT
suppose for 12 tnx are taking AVG think time is 55 sec (11*5)(12 tnx means 11 Think Times placed so 11*5=55 is TT).
376 = 55+PT
376-55=321 sec pacing time.
Formula: -
TXN/Hr = TPS
Txn*TPS/60 = Users.
TXN/Iterations = Users
TXN/Users = Iterations
Hr/Iterations = Pacing
Total Duration/Iteration per Hour = TXN's
Questions: -
Qus : - 4 Hrs with 200 Users, Avg one complete TXN in 5 Sec's. So how many TXN's will run per Min ?
Ans: - 4 Hrs = 200 Users 1 TXN = 5 Sec's so here 1 Min = 12 TXN's (5* 12 = 60).
so 1 Min =12 Txn's
4 Hr's = 4*60 =240 Min's so 240 *12 = 2880 Txn's in 4 Hr's
so for 200 Users = 2880 * 200/240 = 2400 Txn's will run per min.
Qus : TPS = 8, Users = 8, Pacing = ?
Ans: 8 * 3600 =28800 Txn's per Hr.
28800/8 = 3600 Txn's per 1 User in an Hr.
so Pacing = 3600/3600 = 1 sec.
( Pacing = Execution Time / Iteration Time)
Qus : Calculate the Pacing Time or Think Time to achieve 50 TPS with Avg Response Time of 0.5 Sec's with 100 user's ?
Ans : - TPS = 50 so 1 Sec =50 Txn's
3600 sec = X
so X = 3600 * 50 = 180000 Txn's per an Hr for 100 users
so for each user = 180000 / 100 = 1800 Txn's per Hr.
Qus : - 10000 Txn's 1 Hour User = ? and Pacing = ?
Ans : - 1 txn taking time to complete 3 Min's
Users = 10000 * 3X/60 = 500 users
Pacing = 10000 txn's = 500 user's we need to find Txn's for 1 user
10000/500 = 20 Txn's for 1 User
So Pacing = 3600/20 = 180 Sec.
Qus :- 600Txn's(User Sessions) 100 Users, 1 Hr Duration, Pacing = ?
Ans : TPS = 600/3600 = 0.166 Txn's per Sec
Pacing = 100 / 0.166 = 625 Sec's.
Qus :- We want to do 10000 Txn's/1 hr, How many users needed and Pacing ?
Ans :- Txn/Sec = 10000/3600 = 2.7 Sec (per Iterations)
10000 *2.7X/60 = 450 Users.
10000/450 = 22 Iterations
3600/22 = 163 sec Pacing. (here 3600 is sec's per 1 hour).
So, 163 sec's Pacing needed for 450 users test.
Qus :- 500000 Txn's in 1 Day, How many Txn's can do in 1 sec ?
Ans : here 1 Day = 8 Hours
So 8 * 60 * 60 = 28800 sec's
500000 Txn's --- 28800 sec'x
? --- 1 Sec
500000/28800 = 17.36 Txn's per 1 Sec.
Qus :- TPS =8 Pacing = ?
Ans :- Txn per Min = 8* 60 = 480
Txn per Hour = 480 * 60 = 28800
No comments:
Post a Comment