Combination and log sample of different GC garbage collector

Source: Internet
Author: User

The different JVM parameters used in the old age, the younger generation combination of the following figure.

Give a few examples. 1-XX:+USESERIALGC

Enable serial GC with serial+serial old mode, client mode defaults

2-XX:+USEPARNEWGC

Using the parnew+serial old collector combination is not recommended

2018-04-27t13:19:26.996+0800:3.282: [GC 3.282: [parnew:3276k->743k (92160K), 0.0054274 secs]3.287: [tenured: 361200k->709k (409600K), 0.0113318 secs] 364476k->709k (501760K), [perm:3102k->3102k (21248K)], 0.0168826 secs ] [times:user=0.08 sys=0.00, real=0.02 secs] 
3-XX:+USECONCMARKSWEEPGC

The

uses the parnew+cms+serial old combination for concurrent collection, giving priority to PARNEW+CMS and using an alternative serial old collection when the user thread is low on memory.

2018-04-27t13:23:35.961+0800:1.102: [GC 1.102: [parnew:2780k->744k (78144K), 0.0033055 secs]1.106: [cms:120400k- >713k (173632K), 0.0143163 secs] 123180k->713k (251776K), [CMS perm:3103k->3101k (21248K)], 0.0177658 secs] [ times:user=0.01 sys=0.00, real=0.02 secs] 2018-04-27t13:23:35.994+0800:1.135: [GC [1 cms-initial-mark:121113k (173632K )] 121113K (251840K), 0.0001263 secs] [times:user=0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:35.994+0800:1.135: [CM S-concurrent-mark-start] 2018-04-27t13:23:35.998+0800:1.139: [cms-concurrent-mark:0.003/0.004 secs] [times:user= 0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:35.998+0800:1.139: [Cms-concurrent-preclean-start] 2018-04-27T13 : 23:35.999+0800:1.140: [cms-concurrent-preclean:0.001/0.001 secs] [times:user=0.00 sys=0.00, real=0.00 secs] 2018-04- 27t13:23:35.999+0800:1.140: [Cms-concurrent-abortable-preclean-start] 2018-04-27t13:23:36.995+0800:2.136: [GC 2.136: [parnew:2783k->190k (78208K), 0.0017561 secs]2.137: [cms2018-04-27t13:23:36.996+0800:2.137: [cms-concurrent-abortable-preclean:0.009/0.997 secs] [times:user=0.02 sys= 0.00, real=1.00 secs] (Concurrent mode failure): 121113k->628k (173632K), 0.0136789 secs] 123896k->628k (251840K), [ CMS perm:3104k->3104k (21248K)], 0.0155741 secs] [times:user=0.02 sys=0.00, real=0.02 secs] dddd 2018-04-27t13:23:38 .035+0800:3.176: [GC 3.176: [parnew:0k->0k (78208K), 0.0015648 secs]3.178: [cms:121028k->628k (173632K), 0.0126110 secs] 121028k->628k (251840K), [CMS perm:3104k->3104k (21248K)], 0.0143089 secs] [times:user=0.01 sys=0. real=0.01 secs] 2018-04-27t13:23:38.072+0800:3.213: [GC [1 cms-initial-mark:121028k (173632K)] 121028K (251840K), 0. 0001420 secs] [times:user=0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:38.072+0800:3.213: [ Cms-concurrent-mark-start] 2018-04-27t13:23:38.077+0800:3.218: [cms-concurrent-mark:0.004/0.004 secs] [times:user= 0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:38.077+0800:3.218: [Cms-concurrent-preclean-start] 2018-04-27t13:23:38.078+0800:3.219: [cms-concurrent-preclean:0.001/0.001 secs] [ times:user=0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:38.078+0800:3.219: [Gc[yg occupancy:0 K (78208 k)]3.219: [R  Escan (parallel), 0.0009488 secs]3.220: [Weak refs processing, 0.0000088 secs]3.220: [Scrub string table, 0.0000773 secs] [1 cms-remark:121028k (173632K)] 121028K (251840K), 0.0011589 secs] [times:user=0.00 sys=0.00, real=0.00 secs] 2018-04-2 7T13:23:38.079+0800:3.220: [Cms-concurrent-sweep-start] 2018-04-27t13:23:38.080+0800:3.221: [CMS-concurrent-sweep : 0.000/0.000 secs] [times:user=0.00 sys=0.00, real=0.00 secs] 2018-04-27t13:23:38.080+0800:3.221: [CMS-concurrent-res Et-start] 2018-04-27t13:23:38.081+0800:3.222: [cms-concurrent-reset:0.001/0.001 secs] [times:user=0.00 sys=0.00,  real=0.00 secs]
4-XX:+USEPARALLELGC

Open this parameter using the parallel scavenge & parallel old collector (server mode defaults).
Below is the JDK5 version

[GC [Psyounggen:883k->498k (3584K)] 241683k->241322k (276672K), 0.0024777 secs]
[GC [Psyounggen:498k->498k (3584K)] 241322k->241338k (276672K), 0.0027416 secs]
[Full GC [psyounggen:498k->0k (3584K)] [psoldgen:240840k->371k (17344K)] 241338k->371k (20928K) [Pspermgen: 3284K->3284K (21248K)], 0.0347810 secs]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.