OSSW(Open Source System SoftWare
2009. 6. 3. 14:47
JEUS상의 문제 분석 방법 Log의 GC 추이 및 루핑 유무 분석 1.SUN 및 HP
- -Xloggc:${LOG_HOME}/gc.log
2.IBM
- -verbose:gc -Xverbosegclog:${LOG_HOME}/gc.log
위와같이 설정하여 Full GC가 일어나는 회수를 관찰합니다.(기타 gc로그분석기를 활용)
3.루핑 로그 판별
아래와 같이 log에 루핑에 대한 흔적이 있는지 관찰한다.
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
[DEBUG] [14:58:38] ========ServiceTest WORK START============
[DEBUG] [14:58:38] ========ServiceTest WORK END============
Thread dump 분석
아래와 같이 CPU부하가 과도하게 발생시 thread dump를 통하여 해당 AP가 어떤 로직을 수행 중인지 확인할 수 있다.
3XMTHREADINFO "webtob2-hth0(58.87.33.113:9900)-w20" (TID:0x50229A08, sys_thread_t:0x41067628, state:CW, native ID:0x7782) prio=5
4XESTACKTRACE at jeus.util.Logger.directLog(Logger.java(Compiled Code))
4XESTACKTRACE at jeus.util.JeusPrintStream.println(JeusPrintStream.java(Compiled Code))
4XESTACKTRACE at com.ebstorm.jframework.util.JNDIServiceMgr.getEjbRemote(JNDIServiceMgr.java(Compiled Code))
4XESTACKTRACE at com.ebstorm.jframework.controller.RequestController.processService(RequestController.java(Compiled Code))
4XESTACKTRACE at com.ebstorm.jframework.controller.RequestController.process(RequestController.java(Compiled Code))
4XESTACKTRACE at com.ebstorm.jframework.controller.RequestController.doPost(RequestController.java(Compiled Code))
4XESTACKTRACE at javax.servlet.http.HttpServlet.service(Unknown
Source)
4XESTACKTRACE at javax.servlet.http.HttpServlet._service(Unknown Source)
4XESTACKTRACE at javax.servlet.http.HttpServlet.service(Unknown Source)
4XESTACKTRACE at jeus.servlet.engine.ServletWrapper.executeServlet(ServletWrapper.java(Compiled Code))
4XESTACKTRACE at jeus.servlet.engine.ServletWrapper.execute(ServletWrapper.java(Compiled Code))
4XESTACKTRACE at jeus.servlet.engine.WebtobRequestProcessor.run(WebtobRequestProcessor.java:179)
3XHNATIVESTACK Native Stack
NULL ------------
3XHSTACKLINE at 0xD012316C in _event_wait
3XHSTACKLINE at 0xD012E9DC in _cond_wait_local
3XHSTACKLINE at 0xD012EEB0 in _cond_wait
3XHSTACKLINE at 0xD012F874 in pthread_cond_timedwait
3XHSTACKLINE at 0xD1C86A10 in condvarTimedWaitUpTo248Days
3XHSTACKLINE at 0xD1C86BA0 in condvarTimedWait
3XHSTACKLINE at 0xD1C85988 in sysMonitorWait
3XHSTACKLINE at 0xD1B394F4 in lkMonitorEnter
3XHSTACKLINE at 0xD1CF8F08 in _jit_monitorEnterQuicker
3XHSTACKLINE at 0xD1EE9220 in JITSigSegvHandler
3XHSTACKLINE at 0x39A44404 in
CPU overhead JVM 옵션
아래와 같은 debugging 옵션을 Production에 적용하면 과도한 overhead가 생길 수 있고 기타 JVM profiling 옵션도 마찬가지입니다.
-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n
CPU overhead JEUS 옵션 1.Check-include-jsp
JSP안에 include file에 대한 jsp를 강제적으로 compile 시키는 옵션이 있는데 파일이 많으면 CPU에 과부하를 일으킬 수 있습니다.
2.Auto reload 옵션
Class reloading을 자동적으로 수행하는 옵션은 CPU에 과부하를 일으킬 수 있습니다.