Skip to main content

Posts

Showing posts from May, 2020

How to select GC for java application

Which garbage collection(GC) algorithm suite for the application If you don't have any strict pause-time requirements, first run your application and allow the VM to select a collector. If necessary, adjust the heap size to improve performance. If the performance still doesn't meet your performance, then use the specific collector and try. Performance is dependent on the size of the heap, the amount of live data maintained by the application, and the number and speed of available processors. If the recommended collector doesn't achieve the desired performance, then first attempt to adjust the heap and generation sizes to meet the desired goals. If performance is still inadequate, then try a different collector: Use the concurrent collector to reduce pause-time, and use the parallel collector to increase overall throughput on multiprocessor hardware. Available Collector in Oracle JDK -XX:+UseSerialGC -XX:+UseParallelGC -XX:+UseG1GC -XX:+UseCon