You ask two questions:
What does changing garbage collectors in Java mean for better performance?
This is a huge topic and, like some other respondents, I highly recommend you read it. I recommend Java SE 6 HotSpot [tm] Configuring a virtual machine for garbage collection from Sun. The information below mainly comes from there. The article "turbo-charge" java recommended in another answer is older.
In short, one of the many options we have when starting the JVM is to select a garbage collector, of which there are currently three:
- Serial collector (selected with the -XX: + UseSerialGC option) - a single thread is used to work with the collection, and everyone waits for this to happen.
- Parallel collector (selected with the -XX: + UseParallelGC option) - this makes small collections (of the younger generation) in parallel, but waits for everything during the main collections.
- ( -XX: + UseConcMarkSweepGC) - .
?
. " " - , .
-, , , , , , , , .
: 1) ? 2) " " " "? , , , , , , ?
, :
- Multi - , , Concurrent ( )
- Multi -, , Parallel ( )
- - ( 100 ) , , Serial
- Single -, , Serial
- Single - , , Concurrent ( )
, VM , , , , .