HP-UX Programmer's Guide for Java 2
Table Of Contents
- Table of Contents
- 1 Introduction
- 2 HotSpot Technology Tools and Commands
- 3 Configuration for Java™ Support
- 4 Performance and Tuning
- 5 Measuring System Performance
- 6 Using Threads
- 7 Using Signals
- 8 Using Java™ 2 JNI on HP-UX
- 9 Expanding Memory
- Determine your requirements
- Memory layout under HP-UX 11.0 (PA-RISC only)
- Additional memory available under HP-UX 11i (PA-RISC only)
- Allocating physical memory and swap in the Java™ heap
- Useful key command-line options for allocating memory
- Application-dependent considerations using large heap size HP-UX 11i PA-RISC
- Expanding heap size in native applications on PA-RISC HP-UX 11.11 and later releases
- Expanding heap size in native applications on Integrity HP-UX 11.23 and later releases
- Expanding heap size in HP-UX PA-RISC
- Expanding heap size in HP-UX Integrity
- 10 Diagnosing Memory Leaks
- A JDK/JRE 6.0.n and 7.0.n Usage Notes
- Using Java 2 JNI on HP-UX
- Garbage collection
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Compatibility with previous releases
- Java Cryptography Extension (JCE) policy files
- Configuring the Java Runtime Plug-In
- CLASSPATH environment variable
- Java Web Start technology usage
- Upgrading from a previous Java Web Start version
- IPv6 support
- Allocation Site Statistics and Zero Preparation -Xverbosegc
- JDK 6.0.04 flags
- GC log-rotation support
- NUMA collector enhancements
- ThreadDumpPath support
- Garbage-First garbage collector (-XX:+UseG1GC)
- jmap, jinfo, and jstack tools included in JDK 6.0.03
- Additional Java Web Start documentation
- B JDK/JRE 5.0.n Usage Notes
- Using Java 2 JNI on HP-UX
- Garbage collectors: Parallel and Concurrent Mark Sweep
- Allocating physical memory and swap in the Java heap
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Closing a socket (PA-RISC only)
- Compatibility with previous releases
- Java Cryptography Extension (JCE) policy files
- Allocation Site Statistics and Zero Preparation -Xverbosegc
- IPv6 support on Java 5.0
- GC log-rotation support in 5.0
- ThreadDumpPath support in 5.0
- Dynamically loaded libraries in 5.0
- Performance improvement for String.intern()
- Configuring the Java Runtime Plug-In
- CLASSPATH environment variable
- Java Web Start technology usage
- C SDK/RTE 1.4.2.n Usage Notes
- Removing support for unwanted architectures in the JRE
- Support for dynamic thread local storage (TLS)
- Signal Chaining functionality
- Using Java 2 JNI on HP-UX
- HotSpot JVM options
- Garbage collectors: Parallel and Concurrent mark sweep
- Allocating physical memory and swap in the Java heap
- Asian TrueType fonts and Asian locales
- Date/Time methods defaults
- Profiling
- Closing a socket when accept or read is pending (PA-RISC) - new patch information!
- Compatibility with previous releases
- Runtime Plug-In usage and configuration
- GC log-rotation support
- ThreadDumpPath support
- D Additional Resources
- Index
In 64-bit mode, users can specify larger values for this cache. When specifying large
cache values, users should also consider the overhead of cache lookup. Lookup time
increases as the size of the cache increases resulting in negative effect on performance.
This caching is disabled by default.
Additionally, the -XX:HeapDumpPath=<path/filename> option can be used to
specify the heap dump file name or a directory where the heapdump should be created.
Starting with the JDK 6.0.04 release, this option can be used with -XX:+HeapDump,
-XX:+HeapDumpOnCtrlBreak, and -XX:+HeapDumpOnly.
GC log-rotation support
Prior to JDK 6.0.05, when using GC logging options (for example, -Xverbosegc or
-Xloggc), GC data is written to a single file of unlimited size. Starting with JDK 6.0.05,
the JVM supports generation of multiple GC log files and rotates through the specified
number of files. This allows for easier archiving of GC data and helps limit the amount
of disk space consumed by the GC log. Log rotation is also supported when using
zero-preparation Xverbosegc.
To enable log rotation, use the following option together with -Xverbosegc, -Xloggc,
or zero-preparation Xverbosegc:
-XX:GCLogLimits=M,N
M is a non-negative integer for the number of GC records per file. Each GC record
corresponds to a GC event. A value of 0 specifies an unlimited number of records per
file. N is a non-negative integer for the maximum number of files. A value of 0 specifies
an unlimited number of files.
When using this option, both M and N are required. If this option is not specified, then
the default behavior is to write a single GC log file with unlimited size. When rotation
is in effect, a sequence number is appended to the the GC filename (0 through N-1).
(Examples of file names are: filename.0, filename.1, and filename.2.) With log rotation,
when the specified maximum number of files (N) is reached, logging cycles back to the
first file in the sequence (filename.0), overwriting old GC data with new data. If the
maximum number of files (N) is never reached, then no log rotation occurs.
Examples:
Rotate between two log files, each with a maximum of 100,000 GC records:
-XX:GCLogLimits=100000,2
Maintain an unlimited number of smaller files, each with a maximum of 1,000 GC
records:
-XX:GCLogLimits=1000,0
NUMA collector enhancements
Starting in JDK 6.0.06, the Parallel Scavenger garbage collector has been extended to
take advantage of the machines with NUMA (Non Uniform Memory Access)
architecture. Most modern computers are based on NUMA architecture, in which it
takes a different amount of time to access different parts of memory. Typically, every
GC log-rotation support 79