760 likes | 825 Views
Mathematical Approach to Performance Analysis for Web-based Enterprise System. Document Version 3.1 Lee WonYoung, Advisory IT Specialist, WebSphere & Tool, Performance/PD Technical Sales Support 2002.12.18. Contents. - Basic Concept - Request/Response System Modeling - Queuing Theory
E N D
Mathematical Approach toPerformance Analysisfor Web-based Enterprise System Document Version 3.1 Lee WonYoung, Advisory IT Specialist, WebSphere & Tool, Performance/PD Technical Sales Support 2002.12.18
Contents • - Basic Concept • - Request/Response System Modeling • - Queuing Theory • - Sizing Cases • - n-Applications, Multiple-bottleneck • - Benchmark Test • - Performance Analysis
1. Basic Concept 전송량(m3/sec) = 유속(m/sec) * 단면적(m2) Τ (m3/sec) = ν(m/sec) * S(m2) = ν (m/sec) * πr2(m2) ForΤ↑, ν↑orr ↑, but limited bypressure (andheat).
1. Basic Concept 1.1 Objective 1.How many Clients 2.Reasonable response time 3.(Cost-effective)
1. Basic Concept 1.2 Visit time & Think time Click ! Click ! Click ! Click ! Click ! Click ! NewUser Leave Visit Time Click ! Click ! Response Time Think Time Request Interval Request Interval(sec) = Response Time(sec) + Think Time(sec)
1. Basic Concept 1.2.1 Think time [비즈니스별 Think Time 경험치] TM(Telemarket) 시스템(Teler들에 의한 시스템) : 10-15초 MIS 인트라넷 시스템 : 15-20초 인터넷뱅킹 시스템 : 25-35초 온라인쇼핑몰 시스템 : 30-40초 온라인 커뮤너티 사이트 : 보다 길 수 있음. Click ! Click ! Response Time Think Time Request Interval
1. Basic Concept 1.3 Concurrent User Internet F/W A B 1,200-1,400 sessions 45Mbps x 2 L7(1) Internet Clients Inner users 900-1,200 sessions per F/W (Max: 7000 per F/W) Timeout: 30 min 900-1,200 sessions per F/W (Max: 7000 per F/W) F/W F/W C System operators L7(2) L7 1 600 concurrent sessions per server Timeout : 15 min Backend System 2 3 What is the number of concurrent users? 4 250user x 3 = 750 users Timeout: 15 min 5 IBM RS6000 SP (4-way, 2GB) 80 port EST : 10 x 3 = 30 6
1. Basic Concept 1.3.1 Concurrent User Web Server’s access_log RequestInterval( ≈Think Time) Visit Time Different IP Addresses NOTE: 동시단말사용자 10min 10min Time Concurrent Users : 6명
1. Basic Concept 1.3.2 Concurrent User Sample 모인터넷뱅킹: 1,500명 K대지식포털: 275명 모사: 1,000명 모카드웹단말: 2,800명
1. Basic Concept 1.4 Active User Concurrent User Response Time Time Worker-Thread Think Time Active Service Request Interval Click System Click Active User
number of request Throughput(tps) = measure time(sec) 1. Basic Concept 1.5 Throughput Unit : tph, tpm, tps, (pps, rps, ops) 1 tph = 60 tpm = 3,600 tps Time Measure Time
2.Request/Response System Model 1.Mathematical Approach 2.Queuing Theory 3.Quantitative Analysis 4.Measuring
2. Request/Response System Model 2.1 Request and Response Average Response Time Assumption: No ThinkTime Throughput vs ActiveUesr Question: What is the ability of her ? Right Answer: Maximum throughput
2. Request/Response System Model 2.2 Throughput Measuring Increasing Response Time Virtual User (Assumption: ThinkTime=0) Throughput(tps) ResponseTime(sec) Virtual User(ThinkTime=0)
2. Request/Response System Model 2.3 Little’s law Response Time(sec) Throughput(tps) T ResponseTime(sec) R ActiveUser(ThinkTime=0) N ActiveUser N = T x R Number of ActiveUser Throughput(tps) = Average Response Time(sec) Number of ActiveUser = Throughput(tps) x Average Response Time(sec)
2. Request/Response System Model 2.4 Concurrent User vs ActiveUser Concurrent User Response Time Think Time Active User Worker-Thread Active Service Request Interval System Click Ave. ResponseTime(sec) ActiveUser = ConcurrentUser x Request Interval (sec) Ave. ResponseTime(sec) ActiveUser = ConcurrentUser x Ave. ResponseTime(sec) + ThinkTime(sec)
1. Basic Concept 2.4.1 Active User Ave. ResponseTime(sec) ActiveUser = ConcurrentUser x Ave. ResponseTime(sec) + ThinkTime(sec) Service Rate Request Rate Active User
2. Request/Response System Model 2.5 Equation summary Definition Def1 Def2 Def3 Throughput(처리량)(tps) = 총처리건수 / 측정시간(time) RequestInterval(sec) = ResponseTime(sec) + ThinkTime(sec) Concurrent User = ActiveUser + InactiveUser Equations ActiveUser Throughput(tps) = Little’s Law Resp.Time(sec) Resp.Time(sec) ActiveUser = ConcurrentUser x Request Interval(=Resp.Time+ThinkTime) ConcurrentUser Throughput(tps) = Request Interval(=Resp.Time+ThinkTime)
2. Request/Response System Model 2.6 Throughput Formula ResponseTime # of ActiveUser Throughput(tps) = Ave. Resp.Time(sec) Max Worker-Thread: 30 Throughput(tps) = 30/2 = 15 tps SourceBlcok A 2sec Throughput(tps) = 30/3 = 10 tps SourceBlcok B 3sec Throughput Formula 1 = 6 1 1 SourceBlcok A Throughput(tps) = 30/(3+2) = 6 tps 2+3= 5sec 15 10 SourceBlcok B
2. Request/Response System Model 2.6.1 Throughput Formula
2. Request/Response System Model 2.6.2 Throughput Formula
Database Database Database 2. Request/Response System Model 2.6.3 Throughput Measure Program P SourceBlock A Throughput of A+B+C: 6tps Servlet/JSP SourceBlock B SourceBlock C Question: Throughput of B : ? tps SourceBlock A Deleted SourceBlock B SourceBlock C 1 = 6 1 1 15 x Throughput of A+C: 15tps x = 10 tps
3. Queuing Theory G/G/1 G/G/m G/M/1 M/M/1 M/M/m M/G/1 G/M/m Queuing Networks Single-Class Open Queuing Networks Multiple-Class Open Queuing Networks Closed Model Single-Class Closed Model Multiple-Class Closed Model
3. Queuing Theory 3.1 Queuing Theory Concept Arrival Rate (n/sec) Service Time Queue Size Queuing Time How many Queues ?
3. Queuing Theory 3.2 Queuing Theory - G/G/1 Infinite Queue Size 1 Queue Arrival rate Service rate λ μ Arbitrary(infinite) Population (λ<μ)
3. Queuing Theory 3.3 Queuing Theory - G/M/1 Finite Queue Size 1 Queue Arrival rate Service rate λ μ Arbitrary(infinite) Population
3. Queuing Theory 3.4 Queuing Theory - G/G/1 Make sense ? Throughput (λ<μ) Arrival rate Service rate λ μ (λ<μ) ActiveUser Utilization Response Time
3. Queuing Theory 3.5 ActiveUser/Resp.Time vs ConcurrentUser ActiveUser Response Time Arrival Rate(λ) Arrival rate Arrival rate req/sec Response Time(R) Active User(N) Concurrent User ? ? Concurrent User Concurrent User
3. Queuing Theory 3.6 Saturation Point ResponseTime(sec) Throughput(tps) Critical Ave. Response Time Saturation Point p ActiveUser(ThinkTime=0)
3. Queuing Theory 3.6.1 Saturation Point ResponseTime(sec) Critical Ave. Response Time Saturation Point ActiveUser(ThinkTime=0)
3. Queuing Theory 3.7 Maximum Concurrent User ActiveUser Throughput(tps) = Little’s Law Resp.Time(sec) Resp.Time(sec) ActiveUser = ConcurrentUser x Request Interval(=Resp.Time+ThinkTime) ConcurrentUser Throughput(tps) = Request Interval(=Resp.Time+ThinkTime) ConcurrentUser = ActiveUser + Throughput(tps) x ThinkTime(sec) ThinkTime(sec) ConcurrentUser = ActiveUser x { 1 + } Resp.Time(sec) ConcurrentUser = Throughput(tps) x { Resp.Time(sec)+ThinkTime(sec)}
3. Queuing Theory 3.7.1 Maximum Concurrent User ThinkTime(sec) ConcurrentUser = ActiveUser + Throughput(tps) x ThinkTime(sec) ThinkTime(sec) ConcurrentUser = ActiveUser x { 1 + } Resp.Time(sec)
4. Capacity/Sizing Strategy Saturation Point Throughput = ActiveUser(service) / ResponseTime
4. Capacity/Sizing Strategy 4.1 Horizontal Scaling Ttps Throughput : Ttps Throughput Graph Horizontal Scaling n x Ttps ResponseTime - SaturationPoint Throughput Graph Throughput : n x T tps
4. Capacity/Sizing Strategy 4.1.1 Horizontal Scaling
4. Capacity/Sizing Strategy 4.2 Vertical Scaling t tpmC Ttps Throughput Graph Throughput : Ttps Vertical Scaling n xt tpmC n x Ttps ResponseTime SaturationPoint Throughput Graph NOTE: For only CPU bounded Job Throughput : n x T tps
4. Capacity/Sizing Strategy 4.2.1 Vertical Scaling Horizontal - nxT - Expensive? Vertical - nxT (Only CPU bounded App) - Cheap?
Database Database 4. Capacity/Sizing Strategy 4.3 Distribution - Division CPU 100% 10tps 2sec Saturation Point 20 Throughput : 20 / 2 = 10 tps 2sec 13.3tps CPU 70% CPU 100% 3sec ActiveUser Saturation Point 40 T = 2 + 1 = 3sec ResponseTime Throughput : 40 / 3 = 13.3 tps
Database Database 4. Capacity/Sizing Strategy 4.3.1 Division Bad Case 85tps 85 tps Servlet/JSP EJB SUN E10000(4-way,4GB) CPU 100% Throughput : 85 tps Throughput Graph Servlet/JSP 25tps SUN R420 (2-way,2GB) EJB 25tps Servlet/JSP SUN E10000(4-way,4GB) SUN R420(2-way,2GB) NOTE: Remote EJB Call Throughput : 25 + 25 = 50 tps
Database Database 4. Capacity/Sizing Strategy 4.4 Distribution - Complex Complex Environment Throughput Formula 1 1 1 T1 tps T2 tps T1 T2 Throughput : 1/{1/ T1 + 1/ T2} tps T2 /n Throughput Formula T1 tps T2 /n n T1 tps 1 1 T2 /n T1 T2 /n T1 tps T2 tps Throughput : n / {1/ T1 + n/ T2} tps If n∞ T T2
4. Capacity/Sizing Strategy 4.5 Sizing Case Study 4.5.1 K대 지식포털시스템 S80(12-way,8GB, 78,126 tpmC) S80(6-way,6GB, 41,140 tpmC) 일일총방문자: 4,506명 Peak동시단말사용자: 275명 Peak Arrival Rate : 18.3 tps RequestInterval : 18 sec 총접속자 vs 동시단말사용자수 비율: 6.1% CPU 사용률: ?(CPU병목은 없었음) 119,266tpmC/18.3tps = 6,517 tpmC/tps
4. Capacity/Sizing Strategy 4.5.2 모사 M80 (4-way, 3GB, 34,588 tpmC) x 2 S80 (12-way, 8GB, 78,126 tpmC) x 2 6F1 (4-way, 4GB, 44,500 tpmC) x 1 H80 (2-way, 1GB) x 8 [서울지역:M80(4-way)x2: 69,176 tpmC ] 일일총방문자: 1,621명(전국 3,435명) Peak동시단말사용자: 600명 일일총호출건수 : 466,639건 Peak Arrival Rate : 20.0 tps RequestInterval : 30 sec Visit time: 1시간 25분 43초 총접속자 vs 동시단말사용자수 비율: 31% CPU 사용률: 70-100% 69,176tpmC/20tps= 3,459 tpmC/tps 6F1(4-way,4GB, 44,500 tpmC )추가 도입후 CPU사용률 60% 113,676tpmC/20tps= 5,684 tpmC/tps
4. Capacity/Sizing Strategy 4.5.3 모 인터넷뱅킹 M80(4-way, 4GB, 34,588 tpmC) x 3 일일총방문자: 96,753명 Peak동시단말사용자: 1,500-2,000명 일일총호출건수 : 1,795,867건 Peak Arrival Rate : 58.3 tps RequestInterval : 25.7 sec Visit time: 6분 25초 한사용자당 총호출횟수: 18.6회 총접속자 vs 동시단말사용자수 비율: 1.6-2.0% CPU 사용률: 70% 103,764 tpmC/58.3tps= 1,780tpmC/tps
4. Capacity/Sizing Strategy 4.5.4 J은행 CRM시스템 S85(12-way, 32GB, 124,818tpmC) X 2 + HOST DB 일일총방문자: 5,028명 Peak동시단말사용자: 250 명 일일총호출건수 : 264,060건 Peak Arrival Rate : 10 tps RequestInterval : 25.3 sec Visit time: 4분 10초 한사용자당 총호출횟수: 9.9 회 총접속자 vs 동시단말사용자수 비율: 4.97 % CPU 사용률: 30-40% 249,636tpmC / 10 tps = 24,964 tpmC/tps
4. Capacity/Sizing Strategy 4.5.5 D화재 e-Hanaro시스템 WAS 6H1(4-Way 4 GB, 40,763 tpmC) DB H70(4-Way 4GB, 17,134 tpmC) +HOST CICS 일일총방문자: 2,800 명(등록자수 3,300명) Peak동시단말사용자: 350 명 일일총호출건수 : 301,190 건 Peak Arrival Rate : 33 tps RequestInterval : 9 sec Visit time: 16 분 한사용자당 총호출횟수: 120.5 회 총접속자 vs 동시단말사용자수 비율: 12.5 % CPU 사용률: 50% (응용App병목) 40,763 tpmC / 33 tps= 1,235 tpmC/tps (App튜닝후 CPU병목 예상되었음)
4. Capacity/Sizing Strategy 4.5.6 모사 검역검사시스템 WAS H80(2-way, 2GB, 14,756(?) tpmC) DB S80(12-way, 8GB, 67,908tpmC) 일일총방문자: 258 명 Peak동시단말사용자: 45 명 일일총호출건수 : 65,192 건(정적컨텐츠의 20%) Peak Arrival Rate : 4.2 tps RequestInterval : 11-18 sec 총접속자 vs 동시단말사용자수 비율: 17.4 % CPU 사용률: 50-60% (DB서버 35%) (CPU병목 이전 APP/Sybase SQL 병목) 14,756 tpmC / 4.2 tps= 3,513 tpmC/tps
4. Capacity/Sizing Strategy 4.5.7 K은행 eCRM 원투원 마케팅 WAS H80 (2-way, 4GB, 14,756(?) tpmC) x 2 DB M80(2way-4GB, 18,647(?) tpmC) 일일총방문자: 37,951명 Peak동시단말사용자: 230 명 일일총호출건수 : 235,527 건 Peak Arrival Rate : 5.83 tps RequestInterval : 24.7 sec Visit time: 2 분 33 초 한사용자당 총호출횟수: 6.2 회 총접속자 vs 동시단말사용자수 비율: 0.6 % CPU 사용률: ?(CPU병목 없었음) 29,512 tpmC / 5.83 tps= 5,062 tpmC/tps
4. Capacity/Sizing Strategy 4.5.8 K카드 차세대 웹단말 시스템 M80 (4-way, 4GB, 34,588 tpmC) x 9 WSBCC , Servlet/JSP, CTG 일일총방문자: 5,323 명 시간당최고방문자: 4,500명 Peak동시단말사용자: 2,800 명 일일총호출건수 : 6,198,133건 Peak Arrival Rate : 217 tps RequestInterval : 23 sec 총접속자 vs 동시단말사용자수 비율: 53 % CPU 사용률: 좌측하단 참조 311,292tpmC / 217 tps= 1,435 tpmC/tps [2호기] Peak Arrival Rate : 31.7 tps Peak동시단말사용자: 600 명 34,588 tpmC / 31.7 tps= 1,091 tpmC/tps [4호기] Peak Arrival Rate : 50 tps 34,588 tpmC / 50 tps= 692 tpmC/tps CPU 사용률
4. Capacity/Sizing Strategy 4.5.9 Statistic Result? ? Performance Aspect SI Project Scope
4. Capacity/Sizing Strategy 4.6 Capacity/PerformanceApproach 제안 Pilot BMT 분석/개발 기능테스트 가Open 성능테스트 Capacity Estimation Perf. Prediction Unit App. Perf.Test BMT방법론 분석방법론 경험자료+ HVWS Simulator 추가App 개발 추가App 적용 시스템Open 모니터링 App Tuning Unit App. Perf.Test Perf. Prediction Perf. Data Logging Perf Analysis 부하량 증가 추이분석 Perf Analysis