以下是CentOS上WebLogic性能優化關鍵技巧:
net.core.wmem_max
(如設置為8MB)。net.core.somaxconn
(建議512-1024)。vm.swappiness
(如10),減少交換分區使用。ulimit -n
或/etc/security/limits.conf
增加文件句柄數(建議≥65535)。weblogic.threadpool.MinPoolSize
和MaxPoolSize
。Test Connections on Reserve
)并設置合理超時(如30秒)。-Xms
)和最大堆(-Xmx
)設置為物理內存的50%-70%(建議相等以減少GC頻率)。-XX:+UseG1GC
)并調整相關參數(如-XX:MaxGCPauseMillis
)。-Dweblogic.NativeIOEnabled=true
提升套接字性能。net.ipv4.tcp_fastopen=3
)。TIME_WAIT
時間(net.ipv4.tcp_fin_timeout=30
)。top
、htop
、vmstat
。注意:所有調優需先在測試環境驗證,避免影響生產環境穩定性。
參考來源: