June 2019
« May    


WordPress Quotes

Happiness depends more on the inward disposition of mind than on outward circumstances.
Benjamin Franklin
June 2019
« May    

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (36)
Ansibile (19)
Apache (134)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (267)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (1)
horoscope (23)
Hyper-V (10)
IIS (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (6)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

19 visitors online now
4 guests, 15 bots, 0 members

Hit Counter provided by dental implants orange county

Tomcat commonly used in the tuning

Tomcat commonly used in the tuning

In the usual use of Apache, Nginx or other related to the provision of Web services software has a corresponding performance module tuning changes, and in Tomcat also has a corresponding performance tuning modified configuration, here is simply to say more commonly used Several Tomcat in the performance tuning configuration parameters in the Tomcat tuning parameters can be divided into two parts: 1, in the Tomcat binary folder bin directory catalina.sh or catalina.bat add modify configuration tomcat Use the operating parameters; 2, in the Tom folder conf folder configuration changes server.xml in the container.

One, tomcat use the operating parameters catalina.sh tuning

Modify the catalina.sh script, add the modified JAVA_OPTS variable Parameters:
JAVA_OPTS = “$ JAVA_OPTS -Xms3072m -Xmx3072m -Xmn1536m \
-XX: PermSize = 384m -XX: MaxPermSize = 384m -XX: + UseConcMarkSweepGC \
-XX: + UseCMSCompactAtFullCollection -XX : CMSMaxAbortablePrecleanTime = 500 \
-XX: + CMSClassUnloadingEnabled -XX: + CMSClassUnloadingEnabled -Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager ”

-server: tomcat default is a java -client model to run, the server means that your tomcat is the real production mode in the operation of the better performance
-Xms-Xmx: JVM memory settings, JVM initial The allocated heap memory is specified by -Xms and defaults to 1/64 of the physical memory. The maximum allocated heap memory for the JVM is specified by -Xmx, which is 1/4 of the physical memory by default. When the default free heap memory is less than 40%, the JVM will increase the heap until the maximum limit of -Xmx. When the
free heap memory is greater than 70%, the JVM will reduce the heap until the minimum limit of -Xms. It is recommended to set the maximum and minimum Conducive to the JVM garbage collection mechanism
-Xmn: set the new generation, the size of the heap = new generation size + older generation size + lasting generation size. This value has a significant impact on system performance. Sun’s official recommendation for the entire heap 3/8
-XX: Whenever the JDK version is upgraded, your JVM will use the latest addition of the optimization technology –
XX: PermSize: set non-heap memory initial Value, the default is the physical memory of the 1/64
-XX: MaxPermSize: set the eternal generation memory initial size, that is, the maximum non-heap memory size, the default is the physical memory 1 /
4XX: + UseConcMarkSweepGC: CMS gc, this feature Only jdk1.5 that follow-up version has the function, it uses the gc estimate trigger and heap occupancy trigger
-XX: + UseCMSCompactAtFullCollection: in the case of the use of concurrent gc, to prevent memoryfragmention, the live object to organize the memory fragments to reduce
-XX: + UseParNewGC: on the new generation of multi-threaded parallel recovery, so close fast-
XX: + CMSClassUnloadingEnabled: CMS collector will not be the default generation of garbage collection
-XX: CMSMaxAbortablePrecleanTime: CMS GC needs to go through more steps to complete a GC action, in the case of minor GC more frequent, it is likely to cause the CMS GC has not yet completed, resulting in concurrent mode failure, you can-xX: CMSMaxAbortablePrecleanTime set Small values ??to ensure that CMS GC completes object recovery as soon as possible and avoids concurrent mode failure, especially in versions of JDK 5.0 +, 6.0+ on CMS-concurrent-abortable-preclean-start and CMS-concurrent-abortable -preclean These two steps may take a long time, resulting in the recovery of the old generation of objects for a long time before being recovered, this is a Sun JDK CMS GC bug

Second, Tomcat server.xml configuration file

The common configuration performance tuning configuration in Tomcat is as follows:

connectionTimeout: timeout time in milliseconds, the default value is 60000, that is, 60 seconds
maxThreads: tomcat: the maximum number of threads starting, the default value of 200
minSpareThreads: Tomcat initialization to create the number of threads. Default value 4
maxProcessors: Tomcat runtime to create the maximum number of threads, the default value of 75, generally based on the actual production environment to modify
acceptCount: tomcat started when the maximum number of threads to accept the number of queued requests, the default value of 100, web server allows the maximum number of connections is also subject to the operating system kernel parameter settings, usually Windows is about 2000, Linux is about 1000, usually the same as the value set
maxThreads enableLookups: whether the anti-check domain name, the default value is true. In order to improve the processing power, should be set to false
compression: compressed transmission, the value on / off / force, the default value off
redirectPort: SSL redirect port, the default 8443

In short, in the usual need to modify the actual production conditions, Tomcat reasonable performance tuning, Tomcat will be the overall performance will be greatly improved.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




Blue Captcha Image


Protected by WP Anti Spam