Operational experience, JVM configuration, tomcat configuration,

Operational experience

1. For software with network connection, set the three most important parameters (tomcat, nginx, mysql, redis).

    a, the number of threads

    b. Number of connections

    c. Connection timeout

JVM configuration

export JAVA_OPTS="
-server
-Xms6000M
-Xmx6000M
-Xmn500M
-XX:PermSize=500M
-XX:MaxPermSize=500M
-XX:SurvivorRatio=65536
-XX:MaxTenuringThreshold=0
-Xss256K

-Xnoclassgc
-XX:+DisableExplicitGC
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+UseCMSCompactAtFullCollection
-XX:CMSFullGCsBeforeCompaction=0
-XX:+CMSClassUnloadingEnabled
-XX:-CMSParallelRemarkEnabled
-XX:CMSInitiatingOccupancyFraction=90
-XX:SoftRefLRUPolicyMSPerMB=0
-XX:+PrintClassHistogram
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintHeapAtGC
-XX:+PrintClassHistogram
-Xloggc:/home/logs/gc.log"

# for remote debug,these params can also be added to the JAVA_OPTS
port=8900
export CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"

tomcat configuration

<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol"
                URIEncoding="UTF8"
               connectionTimeout="5000"  
               maxThreads="500" 
               minSpareThreads="20"
               acceptCount="50"
               maxConnections="8192"
               redirectPort="8443" />



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325007103&siteId=291194637