SlideShare a Scribd company logo
1 of 22
<대용량 아키텍처와 성능 튜닝>
CH.10 애플리케이션 서버
의 병목 발견 방법
아꿈사 스터디 2015.5.16
정민철(ccc612@gmail.com)
자바 서버 애플리케이션
구조
User AP
WAS
JVM RDBMS
Web Server
Client
Network
현상 및 튜닝 개요
Hang up: 실행되고 있으나 응답이 없는 상태
Slow down: 응답시간이 급격히 떨어지는 상태
동작을 위한 구성 요소 중 하나 이상의 병목으로
발생
튜닝: 병목 구간 발견 => 제거
애플리케이션 서버의 기본
구조
WebServer
OR Browser
OR Client
Dispatcher
Request
Queue
Thread
Pool
Connection
Pool
Thread
Queue
JMS Thread
Queue
APP1 Thread
Queue
APP2 Thread
Queue
Other
Resources
Connector
Working
Thread
Idle
Thread
Queue + Thread Pool
애플리케이션 서버의 기본
구조
Thread Pooling
Thread를 미리 생성해 pool에 저장
필요 시 꺼내서 사용
업무의 성격에 따라 Thread pool 나눠서 운영
장점
업무 부하에 따라 각 pool의 thread 수 조정 가능
문제가 생겨도 다른 업무에 영향이 없음
죄송합니다 여기부터는
Copy & Paste
from here
쓰레드 덤프
• Thread dump
– Snapshot of java ap (X-ray)
– We can recognize thread running tread state
by “continuous thread dump”
Slow down in WAS & User AP
• Getting Thread Dump
– Unix : kill –3 pid , Windows : Ctrl + Break
– Get thread dump about 3~5 times between 3~5secs
Threads
Time
Working thread
Thread dump
Slow down in WAS & User AP
• Thread dump
– It displays all of thread state by “THREAD STACK”
"ExecuteThread: '42' for queue: 'default'" daemon prio=5 tid=0x3504b0 nid=0x34 runnable
[0x9607e000..0x9607fc68]
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:730)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:702)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1427)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:911)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1948)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2137)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:404)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:344)
at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:51)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:56)
Thread name Thread id (signature)Thread State
Program stack of this thread
Sun JVM
Slow down in WAS & User AP
• How to analysis thread dump
MYTHREAD_RUN(){  1
call methodA();
}
methodA(){
//doSomething(); 2
call methodB();
}
methodB(){
//call methodC(); 3
}
methodC(){
// doSomething 4
for(;;){// infinite loop } 5
}
“MYTHREAD” runnable  1
at …MYTHREAD_RUN()
:
“MYTHREAD” runnable 2
at …methodA()
at …MYTHREAD_RUN()
:
“MYTHREAD” runnable 3
at …methodB()
at …methodA()
at …MYTHREAD_RUN()
:
“MYTHREAD” runnable 4
at …methodC()
at …methodB()
at …methodA()
at …MYTHREAD_RUN()
:
“MYTHREAD” runnable
at …methodC()
at …methodB()
at …methodA()
at …MYTHREAD_RUN()
:
계속 이모양이
반복됨
Source code
Thread dumps
Slow down in WAS & User AP
• CASE 1. Lock contention
– In the java application java thread wait for lock in synchronized method
– Occurred in multi threaded program
– Reduce frequency of synchronized method
– Synchronized block must be implemented to be end as soon as possible (※
IO? )
public void synchronized methodA(Object param)
{
//do something
while(1){}
}
< sample code >
Slow down in WAS & User AP
• CASE 1. Lock contention
Thread1 Thread3
Thread2
Thread4
Sychronized
MethodA
Threads
Time
Thread1 – That has a lock
Thread 2.3.4 – waiting for lock
Slow down in WAS & User AP
• CASE 1. Lock contention : Thread dump example
"ExecuteThread: '12' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0055ae20 nid=23
lwp_id=3722788 waiting for monitor entry [0x2fb6e000..0x2fb6d530]
:
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
:
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at org.apache.axis.utils.XMLUtils.getSAXParser(XMLUtils.java:252)
- locked <0x329fcf50> (a java.lang.Class)
"ExecuteThread: '13' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0055bde0 nid=24
lwp_id=3722789 waiting for monitor entry [0x2faec000..0x2faec530]
at org.apache.axis.utils.XMLUtils.getSAXParser(XMLUtils.java:247)
- waiting to lock <0x329fcf50> (a java.lang.Class)
:
"ExecuteThread: '15' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0061dc20 nid=26
lwp_id=3722791 waiting for monitor entry [0x2f9ea000..0x2f9ea530]
at org.apache.axis.utils.XMLUtils.releaseSAXParser(XMLUtils.java:283)
- waiting to lock <0x329fcf50> (a java.lang.Class)
at
Slow down in WAS & User AP
• CASE 2. Dead lock
– CWC “Circular waiting condition”
– Commonly it makes WAS hang up
– Remove CWC by changing lock direction
– Some kind of JVM detects dead lock automatically
sychronized methodA(){
call methodB();
}
sychronized methodB(){
call methodC();
}
sychronized methodC(){
call methodA();
}
< sample code >
Slow down in WAS & User AP
• CASE 2. Dead lock
Thread1
Sychronized
MethodA
Thread2
Sychronized
MethodB
Thread3
Sychronized
MethodC
Threads
Time
Thread 1
Thread 2
Thread 3
Circular waiting condition
Slow down in WAS & User AP
• CASE 2. Dead lock
FOUND A JAVA LEVEL DEADLOCK:
----------------------------
"ExecuteThread: '12' for queue: 'default'":
waiting to lock monitor 0xf96e0 (object 0xbd2e1a20, a weblogic.servlet.jsp.JspStub),
which is locked by "ExecuteThread: '5' for queue: 'default'"
"ExecuteThread: '5' for queue: 'default'":
waiting to lock monitor 0xf8c60 (object 0xbd9dc460, a weblogic.servlet.internal.WebAppServletContext),
which is locked by "ExecuteThread: '12' for queue: 'default'" JAVA STACK INFORMATION FOR THREADS LISTED
ABOVE:
------------------------------------------------
Java Stack for "ExecuteThread: '12' for queue: 'default'":
==========
at weblogic.servlet.internal.ServletStubImpl.destroyServlet(ServletStubImpl.java:434)
- waiting to lock <bd2e1a20> (a weblogic.servlet.jsp.JspStub)
at weblogic.servlet.internal.WebAppServletContext.removeServletStub(WebAppServletContext.java:2377)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:207)
:
Java Stack for "ExecuteThread: '5' for queue: 'default'":
==========
at weblogic.servlet.internal.WebAppServletContext.removeServletStub(WebAppServletContext.java:2370)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:207)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154)
- locked <bd2e1a20> (a weblogic.servlet.jsp.JspStub)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
:
Found 1 deadlock.========================================================
Deadlock auto detect in Sun JVM
Slow down in WAS & User AP
• CASE 2. Dead lock
"ExecuteThread-6" (TID:0x30098180, sys_thread_t:0x39658e50, state:MW, native ID:0xf10) prio=5
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java(Compiled Code))
at weblogic.jdbc.common.internal.ConnectionEnv.cleanup(ConnectionEnv.java(Compiled
:
"ExecuteThread-8" (TID:0x30098090, sys_thread_t:0x396eb890, state:MW, native ID:0x1112) prio=5
at oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java(Compiled Code))
at weblogic.jdbcbase.pool.Connection.commit(Connection.java(Compiled Code))
:
sys_mon_t:0x39d75b38 infl_mon_t: 0x39d6e288:
oracle.jdbc.driver.OracleConnection@310BC380/310BC388: owner "ExecuteThread-8" (0x396eb890)
1 entry  1)
Waiting to enter:
"ExecuteThread-10" (0x3977e2d0)
"ExecuteThread-6" (0x39658e50)
sys_mon_t:0x39d75bb8 infl_mon_t: 0x39d6e2a8: 
oracle.jdbc.driver.OracleStatement@33AA1BD0/33AA1BD8: owner "ExecuteThread-6"
(0x39658e50) 1 entry  2)
Waiting to enter:
"ExecuteThread-8" (0x396eb890
Deadlock trace in AIX JVM
Slow down in WAS & User AP
• CASE 3. Wait for IO Response
– Situation in waiting for IO response (DB,Network)
– Commonly occurred caused by DB locking or slow response
Threads
Time
Wait for IO response
Slow down in WAS & User AP
• CASE 3. Wait for IO Response
"ExecuteThread: '42' for queue: 'default'" daemon prio=5 tid=0x3504b0 nid=0x34 runnable [0x9607e000..0x9607fc68]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:730)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:702)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1427)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:911)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1948)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2137)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:404)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:344)
at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:51)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:56)
at weblogic.jdbc.rmi.SerialPreparedStatement.executeQuery(SerialPreparedStatement.java:42)
at com.XXXX 생략
at ……..
Slow down in WAS & User AP
• CASE 4. High CPU usage
– When monitoring CPU usage by top,glance. WAS process consumes a lot of
CPU - almost 90~100%
– Find it using tools below
• Sun : prstat,pstack,thread dump
• AIX : ps –mp,dbx,thread dump
• HP : glance,thread dump
• See a document “How to find bottleneck in J2EE application “ in
http://www.j2eestudy.co.kr
Slow down in WAS & User AP
• CASE 4. High CPU usage
– Example in HP UX
HP glance
1. Start “glance”
2. Press “G” and enter the WAS
PID
3. Find the TID that consumes a
lot of CPU resource
4. Get a thread dump
5. Find the thread in Thread dump
that has a matched LWID with
this TID
6. And find the reason and fix it
Slow down in WAS & User AP
• Summarize
– Thread dump is snapshot of Java Application.
– If u meet a slowdown situation, Get a thread dump.
– Analysis thread dump.
– And fix it..

More Related Content

What's hot

Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & LuaKit Chan
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clusteringgouthamrv
 
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios
 
NetApp ontap simulator
NetApp ontap simulatorNetApp ontap simulator
NetApp ontap simulatorAshwin Pawar
 
How to add non root user account to netapp for commvault
How to add non root user account to netapp for commvaultHow to add non root user account to netapp for commvault
How to add non root user account to netapp for commvaultAshwin Pawar
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 
Backup workflow for SMHV on windows 2008R2 HYPER-V
Backup workflow for SMHV on windows 2008R2 HYPER-VBackup workflow for SMHV on windows 2008R2 HYPER-V
Backup workflow for SMHV on windows 2008R2 HYPER-VAshwin Pawar
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzJBug Italy
 
Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATSKit Chan
 
Nginx Internals
Nginx InternalsNginx Internals
Nginx InternalsJoshua Zhu
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례John Kim
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideAbhishek Kumar
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaJames Falkner
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Java/Spring과 Node.js의공존
Java/Spring과 Node.js의공존Java/Spring과 Node.js의공존
Java/Spring과 Node.js의공존동수 장
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 

What's hot (20)

Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & Lua
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clustering
 
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
 
NetApp ontap simulator
NetApp ontap simulatorNetApp ontap simulator
NetApp ontap simulator
 
How to add non root user account to netapp for commvault
How to add non root user account to netapp for commvaultHow to add non root user account to netapp for commvault
How to add non root user account to netapp for commvault
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
Backup workflow for SMHV on windows 2008R2 HYPER-V
Backup workflow for SMHV on windows 2008R2 HYPER-VBackup workflow for SMHV on windows 2008R2 HYPER-V
Backup workflow for SMHV on windows 2008R2 HYPER-V
 
ReplacingSquidWithATS
ReplacingSquidWithATSReplacingSquidWithATS
ReplacingSquidWithATS
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzz
 
Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATS
 
Nginx Internals
Nginx InternalsNginx Internals
Nginx Internals
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례
 
WebSockets with Spring 4
WebSockets with Spring 4WebSockets with Spring 4
WebSockets with Spring 4
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and Java
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Java/Spring과 Node.js의공존
Java/Spring과 Node.js의공존Java/Spring과 Node.js의공존
Java/Spring과 Node.js의공존
 
201904 websocket
201904 websocket201904 websocket
201904 websocket
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 

Viewers also liked

[4]iv.경험디자인을 통한 생산성 향상 coex 110822
[4]iv.경험디자인을 통한 생산성 향상 coex 110822[4]iv.경험디자인을 통한 생산성 향상 coex 110822
[4]iv.경험디자인을 통한 생산성 향상 coex 110822uEngine Solutions
 
JVM과 톰캣 튜닝
JVM과 톰캣 튜닝JVM과 톰캣 튜닝
JVM과 톰캣 튜닝Mungyu Choi
 
[메조미디어] Man 네트워크 소개서 2015 version6_2
[메조미디어] Man 네트워크 소개서 2015 version6_2[메조미디어] Man 네트워크 소개서 2015 version6_2
[메조미디어] Man 네트워크 소개서 2015 version6_2Jiwon Yoon
 
Ch6 대용량서비스레퍼런스아키텍처 part.1
Ch6 대용량서비스레퍼런스아키텍처 part.1Ch6 대용량서비스레퍼런스아키텍처 part.1
Ch6 대용량서비스레퍼런스아키텍처 part.1Minchul Jung
 
홍익경영혁신2015 b131378
홍익경영혁신2015 b131378홍익경영혁신2015 b131378
홍익경영혁신2015 b131378Jisubi
 
H/W 규모산정기준
H/W 규모산정기준H/W 규모산정기준
H/W 규모산정기준sam Cyberspace
 
Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상knight1128
 
경영 혁신 15.10.25
경영 혁신 15.10.25경영 혁신 15.10.25
경영 혁신 15.10.25Jisubi
 
UNUS BEANs 소개서 20141015
UNUS BEANs 소개서 20141015UNUS BEANs 소개서 20141015
UNUS BEANs 소개서 20141015YoungMin Jeon
 
TTA H/W 규모산정 지침 Ttak.ko 10.0292
TTA H/W 규모산정 지침 Ttak.ko 10.0292TTA H/W 규모산정 지침 Ttak.ko 10.0292
TTA H/W 규모산정 지침 Ttak.ko 10.0292sam Cyberspace
 
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝Mungyu Choi
 
생산성 측정을 통한 인력관리의 혁신
생산성 측정을 통한 인력관리의 혁신생산성 측정을 통한 인력관리의 혁신
생산성 측정을 통한 인력관리의 혁신Minsu Kim
 
안드로이드 리스트뷰 최적화 사례 연구
안드로이드 리스트뷰 최적화 사례 연구안드로이드 리스트뷰 최적화 사례 연구
안드로이드 리스트뷰 최적화 사례 연구Hyun Cheol
 
어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법Daniel Kim
 
람다아키텍처
람다아키텍처람다아키텍처
람다아키텍처HyeonSeok Choi
 
서버성능개선 류우림
서버성능개선 류우림서버성능개선 류우림
서버성능개선 류우림우림 류
 

Viewers also liked (16)

[4]iv.경험디자인을 통한 생산성 향상 coex 110822
[4]iv.경험디자인을 통한 생산성 향상 coex 110822[4]iv.경험디자인을 통한 생산성 향상 coex 110822
[4]iv.경험디자인을 통한 생산성 향상 coex 110822
 
JVM과 톰캣 튜닝
JVM과 톰캣 튜닝JVM과 톰캣 튜닝
JVM과 톰캣 튜닝
 
[메조미디어] Man 네트워크 소개서 2015 version6_2
[메조미디어] Man 네트워크 소개서 2015 version6_2[메조미디어] Man 네트워크 소개서 2015 version6_2
[메조미디어] Man 네트워크 소개서 2015 version6_2
 
Ch6 대용량서비스레퍼런스아키텍처 part.1
Ch6 대용량서비스레퍼런스아키텍처 part.1Ch6 대용량서비스레퍼런스아키텍처 part.1
Ch6 대용량서비스레퍼런스아키텍처 part.1
 
홍익경영혁신2015 b131378
홍익경영혁신2015 b131378홍익경영혁신2015 b131378
홍익경영혁신2015 b131378
 
H/W 규모산정기준
H/W 규모산정기준H/W 규모산정기준
H/W 규모산정기준
 
Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상Ssl 하드웨어 가속기를 이용한 성능 향상
Ssl 하드웨어 가속기를 이용한 성능 향상
 
경영 혁신 15.10.25
경영 혁신 15.10.25경영 혁신 15.10.25
경영 혁신 15.10.25
 
UNUS BEANs 소개서 20141015
UNUS BEANs 소개서 20141015UNUS BEANs 소개서 20141015
UNUS BEANs 소개서 20141015
 
TTA H/W 규모산정 지침 Ttak.ko 10.0292
TTA H/W 규모산정 지침 Ttak.ko 10.0292TTA H/W 규모산정 지침 Ttak.ko 10.0292
TTA H/W 규모산정 지침 Ttak.ko 10.0292
 
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝
조대협의 서버 사이드 - 대용량 아키텍처와 성능튜닝
 
생산성 측정을 통한 인력관리의 혁신
생산성 측정을 통한 인력관리의 혁신생산성 측정을 통한 인력관리의 혁신
생산성 측정을 통한 인력관리의 혁신
 
안드로이드 리스트뷰 최적화 사례 연구
안드로이드 리스트뷰 최적화 사례 연구안드로이드 리스트뷰 최적화 사례 연구
안드로이드 리스트뷰 최적화 사례 연구
 
어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법어플리케이션 성능 최적화 기법
어플리케이션 성능 최적화 기법
 
람다아키텍처
람다아키텍처람다아키텍처
람다아키텍처
 
서버성능개선 류우림
서버성능개선 류우림서버성능개선 류우림
서버성능개선 류우림
 

Similar to Ch10.애플리케이션 서버의 병목_발견_방법

Analysis bottleneck in J2EE application
Analysis bottleneck in J2EE applicationAnalysis bottleneck in J2EE application
Analysis bottleneck in J2EE applicationTerry Cho
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Applicationguest1f2740
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setupRamakrishna Narkedamilli
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsJack Franklin
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Elixir Club
 
Thread dump troubleshooting
Thread dump troubleshootingThread dump troubleshooting
Thread dump troubleshootingJerry Chan
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)aragozin
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slowaragozin
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2aIvan Ma
 
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8Ben Abdallah Helmi
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comVan-Duyet Le
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
자바 성능 강의
자바 성능 강의자바 성능 강의
자바 성능 강의Terry Cho
 

Similar to Ch10.애플리케이션 서버의 병목_발견_방법 (20)

Analysis bottleneck in J2EE application
Analysis bottleneck in J2EE applicationAnalysis bottleneck in J2EE application
Analysis bottleneck in J2EE application
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Application
 
J2EE-assignment
 J2EE-assignment J2EE-assignment
J2EE-assignment
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
 
Thread dump troubleshooting
Thread dump troubleshootingThread dump troubleshooting
Thread dump troubleshooting
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slow
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
J boss
J bossJ boss
J boss
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Java .ppt
Java .pptJava .ppt
Java .ppt
 
25.ppt
25.ppt25.ppt
25.ppt
 
Celery
CeleryCelery
Celery
 
자바 성능 강의
자바 성능 강의자바 성능 강의
자바 성능 강의
 

More from Minchul Jung

13.앙상블학습
13.앙상블학습13.앙상블학습
13.앙상블학습Minchul Jung
 
10장 진화학습
10장 진화학습10장 진화학습
10장 진화학습Minchul Jung
 
DDD Start! - 2장 아키텍처 개요
DDD Start! - 2장 아키텍처 개요DDD Start! - 2장 아키텍처 개요
DDD Start! - 2장 아키텍처 개요Minchul Jung
 
Ch9 프로세스의 메모리 구조
Ch9 프로세스의 메모리 구조Ch9 프로세스의 메모리 구조
Ch9 프로세스의 메모리 구조Minchul Jung
 
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)Minchul Jung
 
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기Minchul Jung
 
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형Minchul Jung
 
[Http완벽가이드] 9장 웹로봇
[Http완벽가이드] 9장 웹로봇[Http완벽가이드] 9장 웹로봇
[Http완벽가이드] 9장 웹로봇Minchul Jung
 
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항Minchul Jung
 
Ch1 일래스틱서치 클러스터 시작
Ch1 일래스틱서치 클러스터 시작Ch1 일래스틱서치 클러스터 시작
Ch1 일래스틱서치 클러스터 시작Minchul Jung
 
Apprenticeship patterns 7
Apprenticeship patterns 7Apprenticeship patterns 7
Apprenticeship patterns 7Minchul Jung
 
Tools in android sdk
Tools in android sdkTools in android sdk
Tools in android sdkMinchul Jung
 

More from Minchul Jung (12)

13.앙상블학습
13.앙상블학습13.앙상블학습
13.앙상블학습
 
10장 진화학습
10장 진화학습10장 진화학습
10장 진화학습
 
DDD Start! - 2장 아키텍처 개요
DDD Start! - 2장 아키텍처 개요DDD Start! - 2장 아키텍처 개요
DDD Start! - 2장 아키텍처 개요
 
Ch9 프로세스의 메모리 구조
Ch9 프로세스의 메모리 구조Ch9 프로세스의 메모리 구조
Ch9 프로세스의 메모리 구조
 
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)
7부. 애플리케이션 입장에서의 성능 튜닝 (1~8장)
 
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
 
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
HTTP 완벽 가이드 / 20장 리다이렉션과 부하균형
 
[Http완벽가이드] 9장 웹로봇
[Http완벽가이드] 9장 웹로봇[Http완벽가이드] 9장 웹로봇
[Http완벽가이드] 9장 웹로봇
 
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항
일래스틱 서치 ch7. 일래스틱 서치 클러스터 세부사항
 
Ch1 일래스틱서치 클러스터 시작
Ch1 일래스틱서치 클러스터 시작Ch1 일래스틱서치 클러스터 시작
Ch1 일래스틱서치 클러스터 시작
 
Apprenticeship patterns 7
Apprenticeship patterns 7Apprenticeship patterns 7
Apprenticeship patterns 7
 
Tools in android sdk
Tools in android sdkTools in android sdk
Tools in android sdk
 

Recently uploaded

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 

Recently uploaded (20)

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 

Ch10.애플리케이션 서버의 병목_발견_방법

  • 1. <대용량 아키텍처와 성능 튜닝> CH.10 애플리케이션 서버 의 병목 발견 방법 아꿈사 스터디 2015.5.16 정민철(ccc612@gmail.com)
  • 2. 자바 서버 애플리케이션 구조 User AP WAS JVM RDBMS Web Server Client Network
  • 3. 현상 및 튜닝 개요 Hang up: 실행되고 있으나 응답이 없는 상태 Slow down: 응답시간이 급격히 떨어지는 상태 동작을 위한 구성 요소 중 하나 이상의 병목으로 발생 튜닝: 병목 구간 발견 => 제거
  • 4. 애플리케이션 서버의 기본 구조 WebServer OR Browser OR Client Dispatcher Request Queue Thread Pool Connection Pool Thread Queue JMS Thread Queue APP1 Thread Queue APP2 Thread Queue Other Resources Connector Working Thread Idle Thread Queue + Thread Pool
  • 5. 애플리케이션 서버의 기본 구조 Thread Pooling Thread를 미리 생성해 pool에 저장 필요 시 꺼내서 사용 업무의 성격에 따라 Thread pool 나눠서 운영 장점 업무 부하에 따라 각 pool의 thread 수 조정 가능 문제가 생겨도 다른 업무에 영향이 없음
  • 7. 쓰레드 덤프 • Thread dump – Snapshot of java ap (X-ray) – We can recognize thread running tread state by “continuous thread dump”
  • 8. Slow down in WAS & User AP • Getting Thread Dump – Unix : kill –3 pid , Windows : Ctrl + Break – Get thread dump about 3~5 times between 3~5secs Threads Time Working thread Thread dump
  • 9. Slow down in WAS & User AP • Thread dump – It displays all of thread state by “THREAD STACK” "ExecuteThread: '42' for queue: 'default'" daemon prio=5 tid=0x3504b0 nid=0x34 runnable [0x9607e000..0x9607fc68] at java.net.SocketInputStream.read(SocketInputStream.java:85) at oracle.net.ns.Packet.receive(Unknown Source) at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:730) at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:702) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1427) at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:911) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1948) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2137) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:404) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:344) at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:51) at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:56) Thread name Thread id (signature)Thread State Program stack of this thread Sun JVM
  • 10. Slow down in WAS & User AP • How to analysis thread dump MYTHREAD_RUN(){  1 call methodA(); } methodA(){ //doSomething(); 2 call methodB(); } methodB(){ //call methodC(); 3 } methodC(){ // doSomething 4 for(;;){// infinite loop } 5 } “MYTHREAD” runnable  1 at …MYTHREAD_RUN() : “MYTHREAD” runnable 2 at …methodA() at …MYTHREAD_RUN() : “MYTHREAD” runnable 3 at …methodB() at …methodA() at …MYTHREAD_RUN() : “MYTHREAD” runnable 4 at …methodC() at …methodB() at …methodA() at …MYTHREAD_RUN() : “MYTHREAD” runnable at …methodC() at …methodB() at …methodA() at …MYTHREAD_RUN() : 계속 이모양이 반복됨 Source code Thread dumps
  • 11. Slow down in WAS & User AP • CASE 1. Lock contention – In the java application java thread wait for lock in synchronized method – Occurred in multi threaded program – Reduce frequency of synchronized method – Synchronized block must be implemented to be end as soon as possible (※ IO? ) public void synchronized methodA(Object param) { //do something while(1){} } < sample code >
  • 12. Slow down in WAS & User AP • CASE 1. Lock contention Thread1 Thread3 Thread2 Thread4 Sychronized MethodA Threads Time Thread1 – That has a lock Thread 2.3.4 – waiting for lock
  • 13. Slow down in WAS & User AP • CASE 1. Lock contention : Thread dump example "ExecuteThread: '12' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0055ae20 nid=23 lwp_id=3722788 waiting for monitor entry [0x2fb6e000..0x2fb6d530] : at java.lang.ClassLoader.loadClass(ClassLoader.java:255) : at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at org.apache.axis.utils.XMLUtils.getSAXParser(XMLUtils.java:252) - locked <0x329fcf50> (a java.lang.Class) "ExecuteThread: '13' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0055bde0 nid=24 lwp_id=3722789 waiting for monitor entry [0x2faec000..0x2faec530] at org.apache.axis.utils.XMLUtils.getSAXParser(XMLUtils.java:247) - waiting to lock <0x329fcf50> (a java.lang.Class) : "ExecuteThread: '15' for queue: 'weblogic.kernel.Default'" daemon prio=10 tid=0x0061dc20 nid=26 lwp_id=3722791 waiting for monitor entry [0x2f9ea000..0x2f9ea530] at org.apache.axis.utils.XMLUtils.releaseSAXParser(XMLUtils.java:283) - waiting to lock <0x329fcf50> (a java.lang.Class) at
  • 14. Slow down in WAS & User AP • CASE 2. Dead lock – CWC “Circular waiting condition” – Commonly it makes WAS hang up – Remove CWC by changing lock direction – Some kind of JVM detects dead lock automatically sychronized methodA(){ call methodB(); } sychronized methodB(){ call methodC(); } sychronized methodC(){ call methodA(); } < sample code >
  • 15. Slow down in WAS & User AP • CASE 2. Dead lock Thread1 Sychronized MethodA Thread2 Sychronized MethodB Thread3 Sychronized MethodC Threads Time Thread 1 Thread 2 Thread 3 Circular waiting condition
  • 16. Slow down in WAS & User AP • CASE 2. Dead lock FOUND A JAVA LEVEL DEADLOCK: ---------------------------- "ExecuteThread: '12' for queue: 'default'": waiting to lock monitor 0xf96e0 (object 0xbd2e1a20, a weblogic.servlet.jsp.JspStub), which is locked by "ExecuteThread: '5' for queue: 'default'" "ExecuteThread: '5' for queue: 'default'": waiting to lock monitor 0xf8c60 (object 0xbd9dc460, a weblogic.servlet.internal.WebAppServletContext), which is locked by "ExecuteThread: '12' for queue: 'default'" JAVA STACK INFORMATION FOR THREADS LISTED ABOVE: ------------------------------------------------ Java Stack for "ExecuteThread: '12' for queue: 'default'": ========== at weblogic.servlet.internal.ServletStubImpl.destroyServlet(ServletStubImpl.java:434) - waiting to lock <bd2e1a20> (a weblogic.servlet.jsp.JspStub) at weblogic.servlet.internal.WebAppServletContext.removeServletStub(WebAppServletContext.java:2377) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:207) : Java Stack for "ExecuteThread: '5' for queue: 'default'": ========== at weblogic.servlet.internal.WebAppServletContext.removeServletStub(WebAppServletContext.java:2370) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:207) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:154) - locked <bd2e1a20> (a weblogic.servlet.jsp.JspStub) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368) : Found 1 deadlock.======================================================== Deadlock auto detect in Sun JVM
  • 17. Slow down in WAS & User AP • CASE 2. Dead lock "ExecuteThread-6" (TID:0x30098180, sys_thread_t:0x39658e50, state:MW, native ID:0xf10) prio=5 at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java(Compiled Code)) at weblogic.jdbc.common.internal.ConnectionEnv.cleanup(ConnectionEnv.java(Compiled : "ExecuteThread-8" (TID:0x30098090, sys_thread_t:0x396eb890, state:MW, native ID:0x1112) prio=5 at oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java(Compiled Code)) at weblogic.jdbcbase.pool.Connection.commit(Connection.java(Compiled Code)) : sys_mon_t:0x39d75b38 infl_mon_t: 0x39d6e288: oracle.jdbc.driver.OracleConnection@310BC380/310BC388: owner "ExecuteThread-8" (0x396eb890) 1 entry  1) Waiting to enter: "ExecuteThread-10" (0x3977e2d0) "ExecuteThread-6" (0x39658e50) sys_mon_t:0x39d75bb8 infl_mon_t: 0x39d6e2a8: oracle.jdbc.driver.OracleStatement@33AA1BD0/33AA1BD8: owner "ExecuteThread-6" (0x39658e50) 1 entry  2) Waiting to enter: "ExecuteThread-8" (0x396eb890 Deadlock trace in AIX JVM
  • 18. Slow down in WAS & User AP • CASE 3. Wait for IO Response – Situation in waiting for IO response (DB,Network) – Commonly occurred caused by DB locking or slow response Threads Time Wait for IO response
  • 19. Slow down in WAS & User AP • CASE 3. Wait for IO Response "ExecuteThread: '42' for queue: 'default'" daemon prio=5 tid=0x3504b0 nid=0x34 runnable [0x9607e000..0x9607fc68] at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:85) at oracle.net.ns.Packet.receive(Unknown Source) at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.net.ns.NetInputStream.read(Unknown Source) at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:730) at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:702) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1427) at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:911) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1948) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2137) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:404) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:344) at weblogic.jdbc.pool.PreparedStatement.executeQuery(PreparedStatement.java:51) at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:56) at weblogic.jdbc.rmi.SerialPreparedStatement.executeQuery(SerialPreparedStatement.java:42) at com.XXXX 생략 at ……..
  • 20. Slow down in WAS & User AP • CASE 4. High CPU usage – When monitoring CPU usage by top,glance. WAS process consumes a lot of CPU - almost 90~100% – Find it using tools below • Sun : prstat,pstack,thread dump • AIX : ps –mp,dbx,thread dump • HP : glance,thread dump • See a document “How to find bottleneck in J2EE application “ in http://www.j2eestudy.co.kr
  • 21. Slow down in WAS & User AP • CASE 4. High CPU usage – Example in HP UX HP glance 1. Start “glance” 2. Press “G” and enter the WAS PID 3. Find the TID that consumes a lot of CPU resource 4. Get a thread dump 5. Find the thread in Thread dump that has a matched LWID with this TID 6. And find the reason and fix it
  • 22. Slow down in WAS & User AP • Summarize – Thread dump is snapshot of Java Application. – If u meet a slowdown situation, Get a thread dump. – Analysis thread dump. – And fix it..