Tomcat performance optimization and Tomcat 7 Performance Optimization
First of all, of course, you have to install APR, the process can refer to: http://www.cnblogs.com/hackyo/p/6792349.html
// In tomcat/bin/catalina. sh. In windows, change the export to set and remove the double quotation mark (") after the value is export JAVA_OPTS ="-server-Xms1000M-Xmx1000M-Xss512k-XX: + AggressiveOpts-XX: + UseBiasedLocking-XX: + DisableExplicitGC-XX: MaxTenuringThreshold = 15-XX: + UseConcMarkSweepGC-XX: + UseParNewGC-XX: + CMSParallelRemarkEnabled-XX: + prepare-XX: largePageSizeInBytes = 128 m-XX: + UseFastAccessorMethods-XX: + UseCMSInitiatingOccupancyOnly-Djava. awt. headless = true "// in tomcat/conf/server. xml configuration port. If APR is not configured, SET protocol to HTTP/1.1 <Connector port = "80" protocol = "org. apache. coyote. required "maxHttpHeaderSize =" 8192 "maxThreads =" 1000 "minSpareThreads =" 100 "maxSpareThreads =" 1000 "minProcessors =" 100 "maxProcessors =" 1000 "Limit =" false "compression =" on "compressionMinSize =" 1024 "noCompressionUserAgents =" gozilla, traviata "compressableMimeType =" text/html, text/xml, text/javascript, text/css, text/plain "connectionTimeout =" 25000 "URIEncoding =" UTF-8 "acceptCount =" 1000 "redirectPort =" 443 "disableUploadTimeout =" true "/> // configure the SSL port using the APR case) <Connector port = "443" protocol = "org. apache. coyote. required "maxHttpHeaderSize =" 8192 "maxThreads =" 1000 "minSpareThreads =" 100 "maxSpareThreads =" 1000 "minProcessors =" 100 "maxProcessors =" 1000 "Limit =" false "compression =" on "compressionMinSize =" 1024 "noCompressionUserAgents =" gozilla, traviata "compressableMimeType =" text/html, text/xml, text/javascript, text/css, text/plain "connectionTimeout =" 25000 "URIEncoding =" UTF-8 "acceptCount =" 1000 "disableUploadTimeout =" true "SSLEnabled =" true "> <UpgradeProtocol className =" org. apache. coyote. http2.Http2Protocol "/> <SSLHostConfig> <Certificate certificateKeyFile =" conf/cert. key "certificateFile =" conf/cert. crt "certificateChainFile =" conf/root. crt "type =" RSA "/> </SSLHostConfig> </Connector> // configure the SSL port (without using APR) <Connector port = "443" protocol = "HTTP/1.1" maxHttpHeaderSize = "8192" maxThreads = "1000" minSpareThreads = "100" maxSpareThreads = "1000" minProcessors = "100" maxProcessors = "1000" enableLookups = "false" compression = "on" compressionMinSize = "1024" noCompressionUserAgents = "gozilla, traviata "compressableMimeType =" text/html, text/xml, text/javascript, text/css, text/plain "connectionTimeout =" 25000 "URIEncoding =" UTF-8 "acceptCount =" 1000 "disableUploadTimeout =" true "SSLEnabled =" true "> <SSLHostConfig> <Certificate partition =" conf/ cert. jks "certificateKeystorePassword =" Certificate password "certificateKeyAlias =" Certificate alias "type =" RSA "/> </SSLHostConfig> </Connector>