Generic Term |
Replace with |
JAVA_PATH |
The parent Java installation directory (e.g. /usr/java6 or /usr/java7_64). |
PID |
The process id of the active Java process (e.g. use "ps" command to check the PID column to identify the process). |
Direct byte buffers(DBB) are allocated in native memory bypassing the Java heap. They provide the best possible performance for dealing with byte sequences by allocating memory directly on the native heap.
To trace the allocation and deallocation of direct byte buffers, use the -Xtrace option
From Java 6 SR11 onwards, trace points have been added to help diagnose memory problems associated with the use of direct byte buffers. The trace point IDs are j9jcl.335 to j9jcl.338, and have the following form:
- Trace point j9jcl.335 prints the amount of memory being allocated:
- Trace point j9jcl.336 prints when memory cannot be allocated:
To journal all of the trace points above and stack trace information to the file, dbbtrace
"-Xtrace:none,output={dbbtrace%p_#.trc,100m,5},maximal=j9jcl.335-338,trigger=tpnid{j9jcl.335-338,jstacktrace}"
For example:
java "-Xtrace:none,output={dbbtrace%p_#.trc,100m,5},maximal=j9jcl.335-338,trigger=tpnid{j9jcl.335-338,jstacktrace}" HelloWorld
produces the trace file below:
ls *.trc
dbbtrace2621880_0.trc
Monitor the process size until it grows sufficiently large. You can use the top -p PID command to monitor the virtual and physical memory usage.
top -p PID -d delay-time -n iterations
where PID is the process id, delay-time is the time between writes, and iterations is the number of writes
For instance, to monitor a java process id, 10303, every ten minutes (600 seconds) for a two days (2*24*6=288) enter:
top -p 10303 -d 600 -n 288 -b >> process_size.log
Once the process size grows to three times the application's Xmx (max java heap) value, gracefully exit the application.
In order to create a readable trace file, format it with TraceFormat. The log file, dbbtrace<PID>#.trc can be formatted with the command::
JAVA_PATH/bin/java com.ibm.jvm.TraceFormat dbbtrace<PID>_#.trc dbbtrace<PID>_#.trc.txt
to produce a readable text file.
Package the dbbtracePID_#.trc.txt and process_size.log so it can be uploaded to IBM support
tar -cf - dbbtracePID_#.trc.txtprocess_size.log | gzip -c >PMR.MM-DD-YY.tgz
where PMR is the pmr number (ex. 44722,333,000)
and MM-DD-YY is the month, day, and year
Upload the packaged data or individual files to an IBM secured server using one of upload options provided on the "MustGather: How to upload diagnostic data and testcases to IBM" web page:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1022619
Document Type: | Instruction |
Content Type: | Howto | Troubleshooting | Mustgather | Workaround | FAQ | Alert |
Hardware: | all Power | Power5 | Power6 | Power7 | Power8 |
Operating System: | all AIX Versions | AIX 6 | AIX 7 |
IBM Java: | all Java Versions | Java 5.0 | Java 6.0 | Java 6.1 | Java 7.0 | Java 7.1 | Java 8.0 |
Author(s): | First Last |
Reviewer(s): | First Last |