Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Software Architecture in Practice Theoretical Exercise in Performance Engineering Exercise 1a: Response Time Calculation Web Browser Web Browser (per user) 150 users 12 txn per min • • – Network latency (transmission time overhead) is 500ms – User transaction arrival rate is fixed and exponentially distributed across the user community – Ignore processing time of browser 100 KB Internet 20 KB Amount of data sent over network 1 Mbps per user Web Server 0.03 s service time uni-processor system What is the end-user response time? Assume: • Hints: – Network: Use the utilization law – Server: Use graphs of service time under increasing load for server response time OR calculate using formula for response time Exercise 1a: Answer • The solution to this problem is to break down the response time into manageable pieces. • User response time (RU) consists of: – Request network time (RRQ) – Web server response time (RS) – Response network time (RRS) • RU = RRQ + RS + RRS • First, consider the Request Network Time • Each user sends 20KB of network data/1Mbps – Transmission: • S = 20*1024*8 bits on a 1024*1024 bits/sec line = 163840 bits / 1048576 bits/sec = 0,15625 sec – R = S + W, W is given as 0,5 sec – Request Network Time = 0,156 + 0,500 = 0,656 sec • Next, consider the Response Network Time • Each user receives 100 KB of network data – Transmission • 100*1024*8 bits on a 1024*1024 bits/sec line = 819200 bits / 1048576 bits/sec = 0,78125 sec – Response Network Time = 0,78 + 0,500 = 1,281 sec • Finally, consider the response time of the web server – Transaction arrival rate (lambda) = Throughput (X) = 150 users * 12 txn / min = 150 * 0,2 txn/sec = 30 tps – Utilization Law: U = X * S = 30 * 0,03 = 0,90 = 90% Alternative 1: use the graph Response Time 0.7 0.6 Effect of service time on expected response time for c=1 0.5 0.03 0.4 0.02 0.01 0.3 0.005 0.2 Service Time (s) 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 Utilization 0.7 0.8 0.9 0.95 Alternative 2: Calculate Response Time • Response Time = Service Time + Wait Time • RS = S / (1 – U) • RS = 0,03 / (1 – 0,90) • RS = 0,03 / 0,1 = 0,30 sec Exercise 1a: The Result • RU = RRQ + RS + RRS • RU = 0,656 + 0,300 + 1,281 = 2,237 sec Exercise 1b: Answer