service:was:weblogic:wltunning
문서의 이전 판입니다!
목차
WebLogic Tuning Guide on Linux
OS limit Setting
- vi /etc/security/limits.conf
* soft nproc 16384 * hard nproc 16384 * soft nofile 65536 * hard nofile 65536
- 필요에 따라서 .bash_profile 이나 .bashrc 를 수정한다.
ulimit -Hn 8192 ulimit -Sn 8192
OS Kernel Tuning
- 현재 설정을 확인해 본다.
# su - # sysctl -a
- 변경할 셋팅값을 /etc/sysctl.conf 에 입력한다.
kernel.msgmni = 1024 net.ipv4.tcp_max_syn_backlog = 8192
- 필요에 따라 다음 커널 값들을 수정(/etc/sysctl.conf)한다.(정확히 알지 못한다면 수정하지 말것.)
# weblogic + apache2 (testing) ## net.ipv4.tcp_keepalive_time = 7200 ## net.ipv4.tcp_keepalive_intvl = 75 ## net.ipv4.tcp_keepalive_probes = 9 # net.ipv4.tcp_fin_timeout = 15 net.ipv4.tcp_keepalive_time = 60 net.ipv4.tcp_keepalive_intvl = 60 net.ipv4.tcp_keepalive_probes = 1
WebLogic Setting
- JDBC Connection Pool > Connections 설정에 Test Reserved Connections 옵션을 체크한다.
: DB 연결이 끊어지고 다시 연결할때 DB 접속을 시도하는 옵션이다.
이 옵션이 체크되어 있지 않은 상태에서 DB 연결이 끊어지고 나면 DB 연결을 더 이상 하지 않는다.
- Services > JMS > Connection Factories > cgQueue 에서 Target and Deploy 에서 Independent Servers의 Target을 선택한다.
: 이 옵션을 선택하지 않으면 아래와 같은 에러가 나올 수 있다.
<2007. 3. 30. 오후 4시 24분 20초 KST> <Warning> <J2EE> <BEA-160082> <There was an error while making the initial connection to the JMS resource named weblogic.jws.jms.QueueConnectionFactory from the EJB "StatelessContainer" inside application "beflyt". The server will attempt the connection again later. The error was javax.jms.JMSException: [J2EE:160048]JNDI lookup of the JMS connection factory weblogic.jws.jms.QueueConnectionFactory failed: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jws.jms.QueueConnectionFactory' didn't find subcontext 'jws' Resolved weblogic; remaining name 'jws/jms/QueueConnectionFactory'>
WebLogic Tuning
- MEM_ARGS 옵션 변경
MEM_ARGS="-Xms1024m -Xmx1024m -XX:NewSize=367m -XX:MaxNewSize=367m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SurvivorRatio=2" JAVA_VM="-server"
- JDK 변경
- weblogic을 설치하면 기본적으로 jrockit 과 Sun JDK 가 설치되어 있다. 하나를 선택한다면 Sun JDK를 선택하는 것을 권고한다.
- OS에서 제공하는 JDK가 있다면, OS 제공하는 JDK를 사용하는 것이 성능적으로 우수할 수 있다.
- 서버 설정값 Development and Production Startup Mode Tuning Defaults
| Tuning Parameter | Development Mode Default | Production Mode Default |
|---|---|---|
| Execute Queue: ThreadCount | 15 threads | 25 threads |
| JDBC Connection Pool: MaxCapacity | 15 connections | 25 connections |
- 현재 회사에서 운영중인 서버 설정
| location | Name | values |
|---|---|---|
| JDBC Connection Pool: Connections | Initial Capacity | 25 |
| JDBC Connection Pool: Connections | Maximum Capacity | 200 |
| JDBC Connection Pool: Connections | Capacity Increment | 5 |
| Servers: Execute Queue | Thread Count | 25 |
- Thread Count 와 JDBC Connection Pool Count 는 일치시켜 주는 것이 성능상 좋다.
WebLogic + Apache2 Tuning
WebLogic Debug
- vi setDomain.sh 이나 환경설정에서 MEM_ARGS 라인에 -verbosegc 옵션을 추가한다.
# MEM_ARGS="-Xms512m -Xmx512m" (기존) # MEM_ARGS="-Xms512m -Xmx512m -verbosegc" (GC Memory Debug On)
service/was/weblogic/wltunning.1176312507.txt.gz · 마지막으로 수정됨: 저자 220.90.203.242
