January 2019
M T W T F S S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

WordPress Quotes

Cherish your visions and your dreams as they are the children of your soul, the blueprints of your ultimate achievements.
Napoleon Hill

Recent Comments

January 2019
M T W T F S S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28293031  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (34)
Ansibile (19)
Apache (133)
Asterisk (2)
cassandra (2)
Centos (209)
Centos RHEL 7 (261)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (28)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (2)
Ldap (5)
Linux (189)
Linux Commands (167)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (31)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (34)
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 (60)
Uncategorized (29)
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

15 visitors online now
6 guests, 9 bots, 0 members

Hit Counter provided by dental implants orange county

Garbage Priority Garbage Collector

Garbage Priority Garbage Collector (G1 GC) Use notes

G1 GC is a new garbage collection strategy, starting with JDK7, mainly for server-side JVM, and large memory applications, the goal is to achieve similar high-throughput CMS. G1 is still the idea of ??sub-management, the main use of the idea of ??block management, through the memory is divided into no more than 2048 blocks, each size between 1M-32M, Eden, Survivor space and old generation are one Series of discontinuous logical regions.

Here do not talk about the concrete realization of G1 ideas, only record how to configure and use.

Start the G1 GC

-XX: + UseG1GC

Several parameters and default values

  • -XX:MaxGCPauseMillis=200 Maximum pause time, which is a target value, JVM will try to close to this target, the default value of 200.
  • -XX:G1HeapRegionSize=n G1 area block size, 1M-32M, must be a power of 2, G1 will be based on the size of the block plan is not more than 2048 blocks.
  • -XX:G1NewSizePercent=5 Young generation in the heap in the smallest percentage, the default value is 5%
  • -XX:G1MaxNewSizePercent=60 The maximum percentage of young generations in the heap, the default is 60%
  • -XX:ParallelGCThreads=nSets the value of the STW worker thread. Set the value of n to the number of logical processors. The value of n is the same as the number of logical processors, up to 8. If there are more than eight logical processors, set the value of n to about 5/8 of the number of logical processors. This applies to most cases unless it is a larger SPARC system, where the value of n can be about 5/16 of the number of logical processors.
  • -XX:ConcGCThreads=nSets the number of threads that are marked in parallel. Set n to 1/4 of the amount of parallel garbage collection threads (ParallelGCThreads).
  • -XX:InitiatingHeapOccupancyPercent=45 Mark the garbage threshold, the default 45%
  • -XX:G1ReservePercent=10Set the percentage of reserved memory as free space to reduce the risk of target space spillovers. The default value is 10%.

Suggest

  • Avoid using the -Xmn option or other related options such as -XX: NewRatio to explicitly set the young generation size. Fixed young generation size will cover the pause time target.
  • Pause time goals are not too small, because pause time and throughput are a contradictory indicator.

example

This is a simple configuration of tomcat startup

Export CATALINA_OPTS = “$ CATALINA_OPTS -Xms10g”
Export CATALINA_OPTS = “$ CATALINA_OPTS -Xmx10g”
Export CATALINA_OPTS = “$ CATALINA_OPTS -Xss512k”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: + DisableExplicitGC”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: + HeapDumpOnOutOfMemoryError”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: + UnlockExperimentalVMOptions”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: + UseG1GC”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: MaxGCPauseMillis = 200”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: G1NewSizePercent = 40”
Export CATALINA_OPTS = “$ CATALINA_OPTS -XX: G1MaxNewSizePercent = 80”

G1NewSizePercentAnd G1MaxNewSizePercentexperimental properties, so please through the -XX:+UnlockExperimentalVMOptionsopen test option.

Done.

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