Skip to content

User Guide

wxiang edited this page Nov 19, 2021 · 7 revisions

Introduction

TencentKona-8 supports following features

  • Default CDS Archive for launch time speedup.
  • Java Flight Recorder for collecting diagnostic and profiling data of java application.
  • Optimized Work Stealing Threads
  • Parallel Full GC for G1
  • G1GC optimization

Default CDS Archive

Default CDS Archive is enabled by default. User can disable it by following flag

java -Xshare:off 

Java Flight Recorder (JFR)

JFR is disabled by default. To use it, please refer to following steps

Steps to Use Java Flight Recorder:

  • Start up application with flag
java -XX:+FlightRecorder
  • When application is running, use following command to start recording:
  jcmd <your_pid> JFR.start name=<record_name> filename=<dump_file_name>.jfr 
  • Use following command to stop recording:
  jcmd <your_pid> JFR.stop

JFR Data Handling

Please use java mission control (jmc version > 7.0) for data analyze.

More Information

Please refer to Oracle's document for more detailed usage of JFR.

Optimized Work Stealing Threads

OWST is enabled by default, User can disable it by following flag

java -XX:-UseOWSTTaskTerminator

Application Class-Data Sharing

Support Class-Data Sharing for application class loader

Determining the classes to archive

java -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=hello.lst -cp hello.jar HelloWorld

Creating the AppCDS archive

java -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=hello.lst -XX:SharedArchiveFile=hello.jsa -cp hello.jar

Using the AppCDS archive

java -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=hello.jsa -cp hello.jar HelloWorld

For more information, please refer to https://openjdk.java.net/jeps/310

Asynchronous GC logging

From JDK-8229517: Support for optional asynchronous/buffered logging.

Disabled by default. User can disable it by following flag

java -XX:+UseAsyncGCLog