Serial Garbage Collector
is the simplest GC implementation, as it basically works with a single thread. As a result, this GC implementation freezes all application threads when it runs. Hence, it is not a good idea to use it in multi-threaded applications like server environments.
However, there was an excellent talk by Twitter engineers at QCon 2012 on the performance of Serial Garbage Collector – which is a good way to understand this collector better.
The Serial GC is the garbage collector of choice for most applications that do not have small pause time requirements and run on client-style machines
To enable Serial Garbage Collector, we can use the following argument:
java -XX:+UseSerialGC -jar Application.java