How to Reduce Garbage-Collection Pause Time?

Long GC Pause can have a direct impact on response time and throughput.There are two general ways

1)The garbage collection can be done using  multiple CPUs and be executed in parallel. Although the application threads remain fully suspended during this time, the garbage collection can be
done in a fraction of the time, effectively reducing the suspension time.

2)The second approach is leave the application running, and execute garbage collection
concurrently with the application execution.

These two logical solutions have led to the development of serial, parallel, and concurrent
garbage-collection strategies, which represent the foundation of all existing Java garbage-
collection implementations.

The serial collector suspends the application threads  and executes the mark-and-sweep algorithm in a single thread. It is the simplest and oldest form of garbage collection in Java and is still the default in the Oracle HotSpot JVM.

The parallel collector uses multiple threads to do its work. It can therefore decrease the GC
pause time by leveraging multiple CPUs. It is often the best choice for throughput applications.

The concurrent collector does the majority of its work concurrent with the application execution.
It has to suspend the application for only very short amounts of time. This has a big benefit for
response-time–sensitive applications, but has its own drawbacks. Such as the algorithm is more
complicated than the other two and consequently requires more CPU cycles and also requires more

fine tuning and has more configuration options than the other approaches

You may also like:-

How to Reduce Garbage-Collection Pause Time?

4 Mains causes of Long Garbage Collection Pause?

How Application Performance get impacted by Garbage Collection?

Java Performance Tuning options Java heap

Why Memory leak in Java ?

What is a Memory Leak in java?

What is Garbage collector in java and how it works?

What is Garbage Collector Compaction in Java?

What are Java heap Young, Old and Permanent Generations?

What is difference between Web Server and Application Server ?

What is the maximum ram for 32 bits and 64 bits computer?

Some Amazing fact about memory (petabyte,exabyte,zettabyte) And How much data exists on the Web?


Post a Comment