简体   繁体   中英

Full gc in CMS garbage collector

I am using cms gc in java application.I got confused when i saw following line in GC logs.those are

  • 2017-02-21T00:55:45.882+0000: 2.686: [Full GC2017-02-21T00:55:45.882+0000: 2.687: [CMS: 0K->7878K(1398144K), 0.0691810 secs] 111848K->7878K(2027264K), [CMS Perm : 9947K->9942K(16384K)], 0.0693460 secs] [Times: user=0.06 sys=0.02, real=0.07 secs]
  • 2017-02-21T08:27:14.733+0000: 27091.537: [GC [1 CMS-initial-mark: 699151K(1398144K)] 716604K(2027264K), 0.0117710 secs] [Times: user=0.01 sys=0.00, real=0.02 secs]
  • 2017-02-21T08:27:14.745+0000: 27091.549: [CMS-concurrent-mark-start]
  • 2017-02-21T08:27:14.784+0000: 27091.588: [CMS-concurrent-mark: 0.039/0.039 secs] [Times: user=0.21 sys=0.01, real=0.03 secs]
  • 2017-02-21T08:27:14.784+0000: 27091.588: [CMS-concurrent-preclean-start]
  • 2017-02-21T08:27:14.787+0000: 27091.591: [CMS-concurrent-preclean: 0.003/0.003 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
  • 2017-02-21T08:27:14.787+0000: 27091.592: [CMS-concurrent-abortable-preclean-start] CMS: abort preclean due to time 2017-02-21T08:27:19.863+0000: 27096.668: [CMS-concurrent-abortable-preclean: 5.070/5.076 secs] [Times: user=6.44 sys=0.35, real=5.07 secs]
  • 2017-02-21T08:27:19.864+0000: 27096.668: [GC[YG occupancy: 217654 K (629120 K)]2017-02-21T08:27:19.864+0000: 27096.668: [Rescan (parallel) , 0.0268070 secs]2017-02-21T08:27:19.891+0000: 27096.695: [weak refs processing, 0.0005040 secs]2017-02-21T08:27:19.891+0000: 27096.696: [scrub string table, 0.0005510 secs] [1 CMS-remark: 699151K(1398144K)] 916806K(2027264K), 0.0281100 secs] [Times: user=0.42 sys=0.00, real=0.03 secs]
  • 2017-02-21T08:27:19.892+0000: 27096.696: [CMS-concurrent-sweep-start]
  • 2017-02-21T08:27:21.014+0000: 27097.818: [CMS-concurrent-sweep: 1.121/1.122 secs] [Times: user=1.48 sys=0.08, real=1.13 secs]
  • 2017-02-21T08:27:21.014+0000: 27097.818: [CMS-concurrent-reset-start]

Here major gc(mark-remark) is doing only cleaning old memory,no compaction and Full gc is doing cleaning and compact tenured memory right ??

Then, i saw one articles says that Full gc means cleaning both young and old generation.but,Log shows only old memory and heap memory details only.

thanks(sorry if any grammer mistake)

In CMS Full GC moves all live objects to old space. Young space would always be empty after Full GC.

Other GC behave differently. Ie ParallOldGC would fill young space if live object population is larger than old space capacity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM