Skip to content

TGC allocation stats per thread - #19070

Merged
dmitripivkine merged 1 commit into
eclipse-openj9:masterfrom
amicic:tgc_allocation_per_thread
Mar 6, 2024
Merged

TGC allocation stats per thread#19070
dmitripivkine merged 1 commit into
eclipse-openj9:masterfrom
amicic:tgc_allocation_per_thread

Conversation

@amicic

@amicic amicic commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

Report core TLH/allocation-cache stats per thread via -Xtgc:allocation. We already report cumulative stats, but it could be useful to know what are the hungry threads, and how their TLH's change size.

The new stats are hooked to mutator cache flushing at GC start, before they are cleared by the flush.

@amicic

amicic commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

An example of both stats:

<exclusive-start id="26" timestamp="2024-03-05T07:50:06.909" intervalms="4035.290">
  <response-info timems="16.214" idlems="16.214" threads="0" lastid="00000000007A4F00" lastname="ForkJoinPool-3-worker-5" />
</exclusive-start>
<af-start id="27" threadId="00000000007A5920" totalBytesRequested="24" timestamp="2024-03-05T07:50:06.910" intervalms="4035.297" type="nursery" />
----- Per Thread Allocation Statistics Mar 05 07:50:06 2024 ----
   JVM thread ID |                                                                             name | refresh/remaining cache size | TLH fresh count/bytes | TLH discards
000000000078E000 |                                                    Heartbeat: Leader.heartbeat.1 |           8192          3808 |        1         4096 |            0
0000000000791C00 |                     Heartbeat: Group1.TxInjector.CompositeTxInjector.heartbeat.1 |          12288          7016 |        1         8192 |            0
0000000000795800 |                     Heartbeat: Group1.TxInjector.CompositeTxInjector.heartbeat.2 |           8192          3832 |        1         4096 |            0
0000000000799500 |                           Heartbeat: Group1.Backend.CompositeBackend.heartbeat.1 |           8192          3136 |        1         4096 |            0
000000000079D100 |                           Heartbeat: Group1.Backend.CompositeBackend.heartbeat.2 |           8192          3616 |        1         4096 |            0
00000000007A1300 |                                                          ForkJoinPool-3-worker-3 |         131072         63656 |     1388    181314064 |        19248
00000000007A4F00 |                                                          ForkJoinPool-3-worker-5 |         131072             0 |     1823    238387200 |        17536
00000000007AC800 |                                                          ForkJoinPool-3-worker-9 |         131072         66152 |     1917    250707968 |        18632
00000000007A1F00 |                  Group1.TxInjector.CompositeTxInjector.I.driver.service.1.quartz |          12288          3056 |        1         8192 |            0
00000000007A2B00 |                    Group1.TxInjector.CompositeTxInjector.I.driver.probe.1.quartz |          12288          3008 |        1         8192 |            0
00000000007A3700 |                 Group1.TxInjector.CompositeTxInjector.I.driver.saturate.1.quartz |          12288          3152 |        1         8192 |            0
00000000007E8100 |                   Group1.TxInjector.CompositeTxInjector.I.driver.tokens.1.quartz |          12288          3152 |        1         8192 |            0
00000000007FCD00 |                                                    Heartbeat: Leader.heartbeat.2 |           8192          3744 |        1         4096 |            0
<cycle-start id="28" type="scavenge" contextid="0" timestamp="2024-03-05T07:50:06.910" intervalms="4035.224" />
----- Cumulative Allocation Statistics ----
TLH Refresh Count Total:               5184
TLH Refresh Count Fresh:               5138
TLH Refresh Count Reused:                46
TLH Refresh Bytes Total:          670415256
TLH Refresh Bytes Fresh:          670470672
TLH Discarded Bytes:                  55416
TLH Refresh Bytes Reused:            353744
TLH Requested Bytes:              676556800
TLH Max Abandoned List Length:            3
Normal Allocated Count:                 118
Normal Allocated Bytes:            41340944
<gc-start id="29" type="scavenge" contextid="28" timestamp="2024-03-05T07:50:06.911">
  <mem-info id="30" free="1872460360" total="4294967296" percent="43">
    <mem type="nursery" free="0" total="2147483648" percent="0">
      <mem type="allocate" free="0" total="1073741824" percent="0" />
      <mem type="survivor" free="0" total="1073741824" percent="0" />
    </mem>
    <mem type="tenure" free="1872460360" total="2147483648" percent="87">
      <mem type="soa" free="1765085768" total="2040109056" percent="86" />
      <mem type="loa" free="107374592" total="107374592" percent="100" />
    </mem>
    <remembered-set count="15094" />
  </mem-info>
</gc-start>
<allocation-stats totalBytes="711756200" discardedBytes="55416" >
  <allocated-bytes non-tlh="41340944" tlh="670415256" />
  <largest-consumer threadName="ForkJoinPool-3-worker-9" threadId="00000000007AC800" bytes="266047216" />
</allocation-stats>

@amicic
amicic requested a review from dmitripivkine March 5, 2024 14:35
@amicic amicic added the comp:gc label Mar 5, 2024
Report core TLH/allocation-cache stats per thread via -Xtgc:allocation.
We already report cumulative stats, but it could be useful to know what
are the hungry threads, and how their TLH's change size.

The new stats are hooked to mutator cache flushing at GC start, before
they are cleared by the flush.

Signed-off-by: Aleksandar Micic <Aleksandar_Micic@ca.ibm.com>
@amicic
amicic force-pushed the tgc_allocation_per_thread branch from 17c8496 to 6fc0ce8 Compare March 5, 2024 15:42
@dmitripivkine

Copy link
Copy Markdown
Contributor

Jenkins test sanity xLinux jdk21

@dmitripivkine

Copy link
Copy Markdown
Contributor

Jenkins compile win jdk11

@dmitripivkine
dmitripivkine merged commit e652398 into eclipse-openj9:master Mar 6, 2024
@pshipton

pshipton commented Mar 7, 2024

Copy link
Copy Markdown
Member

Should we have a doc update for this?
https://eclipse.dev/openj9/docs/xtgc/

@amicic

amicic commented Mar 8, 2024

Copy link
Copy Markdown
Contributor Author

Should we have a doc update for this? https://eclipse.dev/openj9/docs/xtgc/

eclipse-openj9/openj9-docs#1295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants