Dave Merrill
12/01/2023, 1:10 PMMike Greider
12/01/2023, 2:59 PMseancorfield
seancorfield
seancorfield
-XX:-OmitStackTraceInFastThrow -- stops the JVM "optimizing away" the stack trace for repeated exceptions (so we get better logging on failures)
• -XX:+HeapDumpOnOutOfMemoryError -- if the JVM runs out of memory, this creates a heap dump file which is sometimes useful for debugging the OoM
• -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -- selects the GC algorithm that we have found works best and optimizes for interactive throughput
But, frankly, if you don't really understand what the JVM options are/do, you shouldn't change the defaults. It's very easy to create sub-par performance, or even prevent the JVM from starting up at all, especially on older JVMs (we just upgraded to JDK 21 in production -- I really should review the G1/Z1/etc collectors but the above still seems to work really well for us).Jim Priest
12/01/2023, 7:24 PMDave Merrill
12/01/2023, 8:19 PMJim Priest
12/01/2023, 8:29 PMseancorfield
seancorfield
Dave Merrill
12/01/2023, 9:36 PMDave Merrill
12/01/2023, 9:46 PMseancorfield
seancorfield
mx (max heap) and/or the GC pause (which we've adjusted down from the default of 200).paolo79
12/06/2023, 6:20 PMseancorfield
seancorfield