Planning Number Of Instance And Thread In Web Application Server
description
Transcript of Planning Number Of Instance And Thread In Web Application Server
Determine number of wls threads and instances
BEA Systems Korea
Byungwook Cho
Date 10/May 2004
©2003 BEA Systems, Inc. | 2
AGENDA
Determine # of WebLogic Instance1
Determine # of WebLogic Process2
3 Q&A
©2003 BEA Systems, Inc. | 3
Determine number of WLS Thread
©2003 BEA Systems, Inc. | 4
1. Response Time & Think Time
Response Time
Think Time
Request Interval
Visit Time
Response Time Think Time
Transaction Time
Response Network Time
Request Network Time
ClickClick
Request Interval
©2003 BEA Systems, Inc. | 5
2. Concurrent User
What is concurrent user?
We will define – the user who is in front of computer to use system
10 분시간
사용자 A
사용자 B
사용자 C
사용자 D
사용자 E
Think Time
Response Time
각각의 다른 IP
10 분간 동시 사용자 3 명
Visit Time
©2003 BEA Systems, Inc. | 6
3. Active User
시간
사용자 A
사용자 B
사용자 C
사용자 D
사용자 E
Response Time
순간 Active User 3 명 ( 사용자 A,B,C)동시 사용자 5 명
What is active user?
We will define – the user who is in transaction
It is almost same as “number of WLS thread”
©2003 BEA Systems, Inc. | 7
3. Active User
Active User from Concurrent User Active User = (Concurrent User) * (Response Time /
Request Interval)
시간
사용자 A
사용자 B
사용자 C
사용자 D
사용자 E
Request Interval
©2003 BEA Systems, Inc. | 8
4. TPS
What is TPS Throughput(Active User) Per Second (TT=0 으로 하고 측정가 )
Measured by access log and Weblogic MBean
사용자 A
사용자 B
사용자 C
사용자 D
사용자 E
Response Time (ex 2sec) TPS=5/2 = 2.5 TPS
©2003 BEA Systems, Inc. | 9
4. TPS
TPS = Throughput / measured time [seconds]
= number of response / measured time [seconds]
= number of request / measured time [seconds]
= (Active User) / (Average Response Time) – F1
= (Concurrent User) / (Request Interval) – F2
= (Concurrent User) / (AVRT + AVTT)
©2003 BEA Systems, Inc. | 10
4. TPS
Measuring TPS From Access Log (# of request)
From WebLogic Console/Monitoring
From WebLogic MBean
©2003 BEA Systems, Inc. | 11
5. Formula
TPS = (Active User) / (Average Response Time) – F1
TPS = (Concurrent User) / (Request Interval) – F2
Active User = TPS * (Average Response Time) – F3
Active User = (Concurrent User) * (Average Response Time) / (Request Interval) – F4
Active User = (Concurrent User) * (Average Response Time) / [ (Average Response Time) + (Average Think Time) ] – F5
Example) 동시에 사용자 300 명 , 응답시간은 3 초이내 , Think Time 은 15 초
F5 에 따라서 Active User = 300 * 3 / (3+15) = 50 적정 쓰레드는 50 개 이상
©2003 BEA Systems, Inc. | 12
6. Test
# of thread from formula is just basic (min value)
You must find max value by STRESS TEST
And You must find appropriate value by monitoring WLS and tune it. – depends on JVM & AP
※ big number of thread could reduce performance. (normally 50~100 thread per instance is recommended)
©2003 BEA Systems, Inc. | 13
Determine number of WLS Instance
©2003 BEA Systems, Inc. | 14
1. Determine # of WLS instance
There is no formula but many factors exist.
Normally just one instance per box is fastest.
©2003 BEA Systems, Inc. | 15
2. # of Instance Determine Factor
Memory Size
Number Of Threads
Number Of GC and Time Of GC
Number Of CPU
Fail Over
©2003 BEA Systems, Inc. | 16
3. Factors
Memory Size JVM Heap size is less than 1GB
When (Logical memory size > Physical memory size) DISK SWAP OCCURRED It brings slow down or other trouble
Number of Threads Number of Threads is related on # of active users.
50~100 threads per instance recommended.
©2003 BEA Systems, Inc. | 17
3. Factors
Number of GC and Time of GC When Full GC occurred, Application is stopped.
Number of GC 3~5 Times in a day (WAS)
Time of GC 3~5 seconds recommended (WAS)
Number of CPU One instance required 1~2 CPU needed.
Fail Over Prepare for crash
Clustering, Domain
©2003 BEA Systems, Inc. | 18
4. Determine # of WLS Instance Summary
1 Instance One domain should be consists of more than two instance
Java Heap should be less than 1GB.
Number of threads in one WLS instance are recommended to 50~100
Number of Full GC is about 5times per day.
Time of Full GC is about 3~4 seconds
©2003 BEA Systems, Inc. | 19
How to?
Define performance Objective
Making Test scenario
Determine # of threads and instances
Test
Tuning
Monitoring in production
Tuning
•# of GC•GC Time•Response Time•CPU Usage•# of idle threads
•Concurrent User,AVTT,AVRT
•# of GC•GC Time•Response Time•CPU Usage•# of idle threads•E-AVTT,E-AVRT,E-Concurrent User
•Stress Test Tool / Load Runner•Field Test
Very Important!!
©2003 BEA Systems, Inc. | 20
Q&A
©2003 BEA Systems, Inc. | 21
Thank you~~
BEA Systems Korea
Customer Support Team
WebLogic Specialist
Byungwook Cho