What Is Class Data Sharing?

This section describes what is Class Data Sharing (CDS) - Sharing common classes among multiple JVM processes.

What Is Class Data Sharing? Class Data Sharing (CDS) is a new feature introduced in JDK 1.5.0. CDS is designed to reduce the startup time and footprint of Java applications. The basic idea of CDS is to:

The startup time is reduced because of restoring shared archive is much faster than loading classes.

The footprint is reduced because of some data is shared by multiple JVM processes.

"java" command options related to CDS are:

"-Xshare:dump" - Regenerating the shared archive file
"-Xshare:on" - Forcing JVM to restore the shared archive file
"-Xshare:off" - Forcing JVM to not use the shared archive file

Last update: 2004.

Table of Contents

 About This Book

 Downloading and Installing JDK 1.8.0 on Windows

 Downloading and Installing JDK 1.7.0 on Windows

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 Sun's JVM - Java HotSpot VM

 JRockit JVM 28.2.7 by Oracle Corporation

 JVM Runtime Data Areas

 Memory Management and Garbage Collectors

 Garbage Collection Tests

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

CDS (Class Data Sharing)

What Is Class Data Sharing?

 Regenerating Shared Archive

 Startup Time Saving with Restoring Shared Archive

 Startup Time Saving with Multiple JVM Processes

 Footprint Saving with Restoring Shared Archive

 Viewing Shared Memory of JVM Processes

 Micro Benchmark Runner and JVM Options

 Micro Benchmark Tests on "int" Operations

 Micro Benchmark Tests on "long" Operations

 Micro Benchmark Tests in JIT Compilation Mode

 Micro Benchmark Tests on "float" and "double" Operations

 Outdated Tutorials

 References

 PDF Printing Version