Profile Image

What is Serial garbage collector: -XX:+UseSerialGC?

What is Serial garbage collector: -XX:+UseSerialGC? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-useserialgc

  • x-useserialgc

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



You can choose 1 of the 5 available garbage collectors, one of them is Serial GC:






The simplest GC implementation, it works with a single thread for garbage collection process. As a result, it freezes all application threads when it runs, but on the other hand it’s effective in a way that it doesn’t need to communicate between threads. Thus, it's not a good idea to use it in multi-threaded applications, like server environments. The best idea is to use it in a single processor machines, although it can be useful on multiprocessors for applications with small data sets (up to approximately 100 MB).


Default Value:


Default is Parallel GC.






Arguments related:


TODO link ParallelGCThreads, MaxGCPauseMillis , GCTimeRatio, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseParallelGC, USeParNewGC, UseG1GC, UseZGC


Related Posts



If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-useserialgc

  • x-useserialgc