Wildfly9配置优化笔记

  1. 1.   关闭console的日志输出,standalone.xml中去掉

<!--
            <console-handler name="CONSOLE">
                <level name="INFO"/>
                <formatter>
                    <named-formatter name="COLOR-PATTERN"/>
                </formatter>
            </console-handler>
-->


<root-logger>
                <level name="INFO"/>
                <handlers>
                                                            <!--
                    <handler name="CONSOLE"/>
                                                            -->
                    <handler name="FILE"/>
                </handlers>
  </root-logger>


  1. 2.   把日志输出到File改为autoflush=”false”standalone.xml中修改

 

<periodic-rotating-file-handler name="FILE" autoflush="
false
">


  1. 3.   优化IO worker , standalone.xml中修改

<subsystem xmlns="urn:jboss:domain:io:1.1">
            <worker name="default" io-threads="8" task-max-threads="64" />
            <buffer-pool name="default"/>
   </subsystem>


优化io-threads= CPU core * 2 

优化task-max-threads=CPU core * 16

  1. 4.   buffer pool standalone.xml中修改

<subsystem xmlns="urn:jboss:domain:io:1.1">
         <worker name="default" io-threads="8" task-max-threads="64" />
            <buffer-pool name="default" buffer-size="16384"/>
   </subsystem>


优化为Linux默认大小16K

5.   oracle modules包放到

{Wildfly安装路径} /modules/system/layers/base下面。

6.   JVM优化

if [ "x$JAVA_OPTS" = "x" ]; then
      JAVA_OPTS="-Xmx6000M –Xms6000M -Xmn1000M -XX:PermSize=1000M -XX:MaxPermSize=1000M -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Djava.net.preferIPv4Stack=true"
      JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
      JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$JBOSS_HOME/standalone/log"
else
      echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi


 

你可能感兴趣的:(Wildfly9配置优化笔记)