June 2020
M T W T F S S
« Mar    
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

WordPress Quotes

Be Content with what you have; rejoice in the way things are. When you realize there is nothing lacking, the whole world belongs to you.
Lao Tzu
June 2020
M T W T F S S
« Mar    
1234567
891011121314
15161718192021
22232425262728
2930  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (40)
Ansibile (19)
Apache (135)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (270)
centos8 (3)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (2)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (7)
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)
SCALEIO (1)
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)
Ubuntu (1)
Uncategorized (30)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

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

Who's Online

0 visitors online now
0 guests, 0 bots, 0 members

Hit Counter provided by dental implants orange county

TOMCAT TUNING

  1. tuning rules Doesn’t compensate for bad, slow or poorly written applications
  2. If you allocate memory more than 3g, preferably divided into multiple tomcat young generation can not be set too much, minor gc will stop the world.
  3. Three factors negatively impact Tomcat’s performance more than any others – network delays, remote client latency, and application architecture.

    Two of these factors – network delays and remote client latency – are for the most part unavoidable, although using a web server in front of Tomcat to serve static content will free up more power for dynamic content.

    Remote client latency can be mitigated by compressing content with Apache mod_zip or Tomcat’s compression filter.

  4. ulimit-n 8192

  5. logging

    logging is ok, but it will:

    • Catch-all logger goes to stdout and file
    • No overflow protection
    • Synchronized logging

    In linux turn off console handler.so we can:

     Remove logging to stdout-no rotation.modify logging.properties, and remove ConsoleHandler as follows: . Handlers = 1catalina.org.apache.juli.FileHandler 
  6. Our tuning options

    • Threads

      MaxThread – Max number of concurrent requests, can be set to 400, if the cpu load is very low added value, if the load is high, decrease it.

    • Keep alive requests

      HTTP KeepAlive is a good thing, but Wasted server resources, thread idle while others waiting to be serviced. Https handshake is very expensive, you can use the keepalive MaxKeepAliveRequests – max number of requests to serve before closing, can not be set too large, too large thread the idle too much, but can not provide the service in highly concurrent environments, to close off KeepAlive is set to 0. spring tc server recommended setting is 15.

    • TCP Backlog (acceptCount)

      Represents nr of additional connections the OS should accept on your behalf, Useful when Tomcat can’t accept connections fast enough, Typical ranges 50-300. Peak period declined more servers to increase this value.

    • connectionTimeout

      His following meanings:

      • Values from 2000-60000
      • Represents the SO_TIMEOUT value
      • Essentially, max time between TCP packets during a blocking read or write
      • Critical to a stable system
      • Also used for keep alive timeout ConnectionTimeOut – max time to keep thread open default 20s this value is too high for a web server in terms of reasonable setting, according to the application scenario. The recommended value is 3000, Increase if Working with slow clients (dial up) or Using a layer 7 load balancer with connection limit / pool and keep alive on.
  7. Different connectors

    • BIO-Blocking Java connector, default
    • The APR-Uses native C code for IO Overall very good, especially ssl, try using this model
    • NIO-Non blocking Java connectors
  8. Dynamic content

    No way in tomcat level cache, can use jsp cache to cache content like blocking mode of the Tomcat has to deliver it, Worker thread is not the released The until all content has been delivered, Changing the connector wont change behavior

  9. Static content

    • The tomcat providing Size based cache, default 10mb, for BIO-Tomcat has to deliver it blocking mode
    • NIO / APR, Tomcat can use SEND_FILE, Release worker thread, deliver the content using a background thread when the client is ready to receive, Increases concurrency
  10. Do not use the AJP protocol

  11. JVM TUNING

    Key parameters for JVM tuning

    • Memory

      Total heap: -Xms/-Xmx

      Used to define size of Java heap Aim to set as low as possible Setting too high can cause wasted memory and long GC cycles 
    • Control of the new generation:-XX: Xmn

      Size eden + the New gen displayed in the survivor space. With The jmap-heap different. Increasing the young generation will reduce the size of the old generation. Value impact on system performance, Sun official recommended configuration for the entire heap of 3/8, do not use jdk1.4 previous parameter XX: XX NewSize: NewRatio , according to the case of the test, 3/8 is still relatively large, set at about 30% more appropriate. Setting too high or too low leads to inefficient GC. Too big, minor gc will stop the world, too small, too often.

    • Garbage collection

       -XX: MaxGCPauseMillis This parameter can not do not use very dangerous set too short to gc spend a lot of effort to reach their goals, resulting in decreased throughput. -XX: + UseConcMarkSweepGC -XX: + CMSIncrementalMode -XX: + CMSIncrementalPacing -XX: CMSIncrementalDutyCycleMin = 0 -XX: CMSIncrementalDutyCycle = 10 -XX: + UseParNewGC -XX: + CMSPermGenSweepingEnabled 

      Note that last this CMSPermGenSweepingEnabled, in jdk1.6 after cms collector can be achieve permgen recycling, especially for groovy such dynamically generated class and the program loaded.

  12. gc log:

    -Verbosegc-XX: + PrintGCTimeStamps-XX: + PrintGCDetails-Xloggc: gc.log

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
Refresh

*

Protected by WP Anti Spam