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

running and each running process uses many threads, you will want to increase this
value.
Open Files
Problems occur when the value of kernel parameters are set too low for the number of
files allowed to be simultaneously open in a process. Be certain that your kernel is
configured so that you do not reach the limit for the number of open files for your
process. Java™ opens many files in order to read in the classes required to run your
application. A file descriptor is also used for each socket that is opened. Use HP
OpenView GlancePlus to analyze the total number of files open when running your
application.
nfiles
Maximum number of open files. This value is usually determined by the formula:
((NPROC*2)+1000)
NPROC is usually: ((MAXUSERS*5)+64)
For a MAXUSERS of 400, this works out to 5128. You can usually set it higher.
maxfiles
Soft file limit per process
maxfiles_lim
Hard file limit per process 2048 is the maximum value you can set through SAM for
maxfiles and maxfiles_lim.
Note that you can set the parameters higher by configuring the kernel using the
configuration file and then rebuilding the kernel (or by modifying stand/system and
doing a mk kernel). Since setting these parameters too low results typically in application
failure, you may want to calculate the number you need and then double it.
You might also consider ninode along with these parameters, that is as a member of
the "set". If there's no space in the appropriate inode table then you cannot open a new
file.
Timeouts
If the number of pending timeouts on the system exceeds the maximum number of
allowable pending timeouts on the system then the system will crash. This undesirable
behavior can be avoided by increasing the following kernel parameter:
ncallout
Maximum number of pending timeouts. If you are opening many sockets, many of
which are waiting on I/O, you will likely run into this limit.
Set ncallout to a value greater than the sum of:
nkthread + the number of I/O devices connected to the machine
32 Configuration for Java™ Support