O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

As we had mentioned earlier, the G1 GC uses default ergonomic values that probably would be good enough for most applications. Here is the list of the most important ones (<ergo> means that the actual value is determined ergonomically depending on the environment):

  • -XX:MaxGCPauseMillis=200 holds the value for the maximum pause time
  • -XX:GCPauseTimeInterval=<ergo> holds the maximum pause time between GC steps (not set by default, allowing G1 to perform garbage collections back to back if need be)
  • -XX:ParallelGCThreads=<ergo> holds the maximum number of threads used for parallel work during garbage collection pauses (by default, derived from the number of available threads; if the number of CPU threads available to the process ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required