title: Analysing JVM performance issue
body: <p>My application stops suddenly and i suspect it might be because of GC config needs some optimization.Can any one please advise on GC config optimization based on below data .Or anyone can highlight is any thing wrong in config</p>
  <p>Below is my JVM configuration</p>
  <pre><code>-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  -Djdk.tls.ephemeralDHKeySize=2048
  -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
  -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
  -Xmx21g
  -XX:+UseG1GC
  -XX:G1HeapRegionSize=24m
  -XX:MaxHeapFreeRatio=15
  -XX:MinHeapFreeRatio=5
  -XX:MaxMetaspaceSize=4g
  -XX:+HeapDumpOnOutOfMemoryError
  -verbose:gc
  -XX:+PrintGCTimeStamps
  -XX:+PrintGCDateStamps
  </code></pre>
  <p>GC Configuration of JVM</p>
  <p><a href="https://i.stack.imgur.com/IwD7n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IwD7n.png" alt="enter image description here" /></a></p>
  <p>Running JVM snapshot,</p>
  <p><a href="https://i.stack.imgur.com/yVLZb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yVLZb.png" alt="enter image description here" /></a></p>
  <p>and below are GC logs that i can see in catalina.out.</p>
  <pre><code>2021-03-09T14:17:38.146+0000: 414469.095: [GC pause (G1 Evacuation Pause) (young) 17G-&gt;4391M(21G), 0.4270906 secs]
  2021-03-09T14:17:47.284+0000: 414478.233: [GC pause (G1 Evacuation Pause) (young) 5191M-&gt;4216M(21G), 0.0419201 secs]
  2021-03-09T14:18:13.735+0000: 414504.685: [GC pause (G1 Evacuation Pause) (young) 8488M-&gt;4280M(21G), 0.2362999 secs]
  2021-03-09T14:18:17.606+0000: 414508.556: [GC pause (G1 Evacuation Pause) (young) 5192M-&gt;4216M(21G), 0.0566793 secs]
  2021-03-09T14:19:06.833+0000: 414557.782: [GC pause (G1 Evacuation Pause) (young) 16G-&gt;4468M(21G), 0.5860262 secs]
  2021-03-09T14:19:09.187+0000: 414560.137: [GC pause (G1 Evacuation Pause) (young) 5188M-&gt;4240M(21G), 0.0593960 secs]
  2021-03-09T14:19:12.975+0000: 414563.924: [GC pause (G1 Evacuation Pause) (young) 5232M-&gt;4248M(21G), 0.0568061 secs]
  2021-03-09T14:19:17.050+0000: 414567.999: [GC pause (G1 Evacuation Pause) (young) 5224M-&gt;4236M(21G), 0.0536786 secs]
  2021-03-09T14:20:00.026+0000: 414610.976: [GC pause (G1 Evacuation Pause) (young) 16G-&gt;4341M(21G), 0.2910220 secs]
  2021-03-09T14:20:03.929+0000: 414614.879: [GC pause (G1 Evacuation Pause) (young) 5253M-&gt;4248M(21G), 0.0200452 secs]
  2021-03-09T14:21:15.569+0000: 414686.518: [GC pause (G1 Evacuation Pause) (young) 16G-&gt;4384M(21G), 0.2412292 secs]
  2021-03-09T14:21:21.669+0000: 414692.619: [GC pause (G1 Evacuation Pause) (young) 5248M-&gt;4315M(21G), 0.0272150 secs]
  2021-03-09T14:21:29.186+0000: 414700.136: [GC pause (G1 Evacuation Pause) (young) 5275M-&gt;4327M(21G), 0.0342030 secs]
  2021-03-09T14:21:36.497+0000: 414707.447: [GC pause (G1 Evacuation Pause) (young) 5446M-&gt;4369M(21G), 0.0316144 secs]
  2021-03-09T14:21:47.786+0000: 414718.735: [GC pause (G1 Evacuation Pause) (young) 7545M-&gt;4505M(21G), 0.0613017 secs]
  2021-03-09T14:22:01.761+0000: 414732.710: [GC pause (G1 Evacuation Pause) (young) 8137M-&gt;4492M(21G), 0.1868154 secs]
  2021-03-09T14:22:32.992+0000: 414763.941: [GC pause (G1 Evacuation Pause) (young) 6868M-&gt;4436M(21G), 0.0370628 secs]
  2021-03-09T14:24:36.637+0000: 414887.586: [GC pause (G1 Evacuation Pause) (young) 11G-&gt;4468M(21G), 0.1404537 secs]
  2021-03-09T14:25:14.738+0000: 414925.687: [GC pause (G1 Evacuation Pause) (young) 14G-&gt;4580M(21G), 0.2439932 secs]
  2021-03-09T14:25:17.695+0000: 414928.645: [GC pause (G1 Evacuation Pause) (young) 5364M-&gt;4453M(21G), 0.0548354 secs]
  2021-03-09T14:34:47.921+0000: 415498.870: [GC pause (G1 Evacuation Pause) (young) 12G-&gt;4549M(21G), 0.3198289 secs]
  2021-03-09T14:34:49.145+0000: 415500.094: [GC pause (G1 Evacuation Pause) (young) 5429M-&gt;4437M(21G), 0.0055575 secs]
  2021-03-09T14:54:47.263+0000: 416698.212: [GC pause (G1 Evacuation Pause) (young) 14G-&gt;4459M(21G), 0.1181888 secs]
  </code></pre>