NOTE

2.1 GC Tuning

Historical notes on GC tuning goals, observing GC behavior, and tuning parameters or code.

Garbage Collection / RuntimeCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. GC Tuning Steps

1.1. Determine the Goal of GC Tuning

  • CPU utilization: to what extent does the collection algorithm slow down the program? Sometimes this is described as the percentage of CPU time occupied by collection versus other CPU time.
  • GC pause time: how long will the collector pause the program? In current GC, pauses that may be caused by both STW and Mark Assist need to be considered.
  • GC pause frequency: how frequently does the collector cause pauses? In current GC, pauses that may be caused by both STW and Mark Assist need to be considered.
  • GC scalability: how does the garbage collector perform as heap memory grows? Most programs may not necessarily care about this issue.

1.2. Observe GC

1.3. Tuning

1.3.1. Tune Parameters

1.3.2. Tune Code

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub