Databases Reference
In-Depth Information
How it works...
The following graph displays the results of two different tests with the response times
of the exactly same application. The only difference between the results is the GC mode:
The blue line shows the default throughput mode. It has very low application response times
for most of the test (average of 100 ms), but returns a higher response time when the GC
is triggered. Note that the graph is from the application response time and not from the GC
pause time. The throughput mode tries to leave the JVM running without any interference.
Then, when needed, execute the GC as fast as possible by running it in parallel and using all
the CPUs available; on the start up, the JVM checks how many CPU cores the machine has
and starts the same number of GC threads. Although the JVM lets the application run at full
speed when the GC is not needed, it will "stop the world" when full GC is invoked.
The red line shows the pausetime GC mode behavior. The application is not sensitive to full
GC as the throughput mode, keeping the time consistent during all times. On the other hand,
the responses get a much higher average time (400 ms) in comparison to the blue line. Since
the JVM focuses on keeping the GC pausetime low, it keeps the GC running concurrent to the
application, sharing CPU cycles and increasing the response time.
Although the default throughput mode should be fine to almost all
scenarios, some application requirements can't handle the response
time variations. The graph comparison image is also an example. Test the
application and choose the GC mode that best suits your needs.
 
Search WWH ::




Custom Search