• New Feature
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • DSO:L1
  • gbevin
  • Reporter: gbevin
  • September 06, 2007
  • 0
  • Watchers: 0
  • July 27, 2012
  • October 01, 2007

Description

Verify if we can’t use the IBM JDK platform management beans to create a version of the memory manager pool monitor for the IBM JDK. More info here: http://www-128.ibm.com/developerworks/java/library/j-mxbeans/

Comments

Erh-Yuan Tsai 2007-09-06

Committed 5463 to enable using IBM jdk memory management.

A simple test program showed that ibm jdk using “Java heap” as name for old generation, Sun uses “PS Old Gen”. Test code:

 List<GarbageCollectorMXBean> gcmbeans = ManagementFactory.getGarbageCollectorMXBeans();
 for( GarbageCollectorMXBean gcmbean : gcmbeans )
 {        System.out.println( "\nName: " + gcmbean.getName() );
   System.out.println( "Collection count: " + gcmbean.getCollectionCount() );
   System.out.println( "Collection time: " + gcmbean.getCollectionTime() );
   System.out.println( "Memory Pools: " );
   String[] memoryPoolNames = gcmbean.getMemoryPoolNames();
   for( int i=0; i<memoryPoolNames.length; i++ )
   {          System.out.println( "\t" + memoryPoolNames[ i ] );
   }
 }

Sun:

Name: PS Scavenge Collection count: 21 Collection time: 5 Memory Pools: PS Eden Space PS Survivor Space

Name: PS MarkSweep Collection count: 0 Collection time: 0 Memory Pools: PS Eden Space PS Survivor Space PS Old Gen PS Perm Gen


IBM:

Name: J9 GC Collection count: 2 Collection time: 7 Memory Pools: Java heap


1) IBM-jdk, for ManagementFactory.getGarbageCollectorMXBeans(), it returns only one pool. I guess, returns only one interested ( behaving different from Sun). If test with ManagementFactory.getMemoryPoolMXBeans(); It lists all.

Name: class storage Usage: init = 0(0K) used = 1625032(1586K) committed = 1968416(1922K) max = -1(undefined) Collection Usage: null Peak Usage: init = 0(0K) used = 1625032(1586K) committed = 1968416(1922K) max = -1(undefined) Type: Non-heap memory Memory Manager Names: J9 non-heap manager

Name: JIT code cache Usage: init = 0(0K) used = 0(0K) committed = 524288(512K) max = -1(undefined) Collection Usage: null Peak Usage: init = 0(0K) used = 0(0K) committed = 0(0K) max = -1(undefined) Type: Non-heap memory Memory Manager Names: J9 non-heap manager

Name: JIT data cache Usage: init = 0(0K) used = 24140(23K) committed = 524288(512K) max = -1(undefined) Collection Usage: null Peak Usage: init = 0(0K) used = 24140(23K) committed = 524288(512K) max = -1(undefined) Type: Non-heap memory Memory Manager Names: J9 non-heap manager

Name: miscellaneous non-heap storage Usage: init = 0(0K) used = 326036(318K) committed = 458752(448K) max = -1(undefined) Collection Usage: null Peak Usage: init = 0(0K) used = 346764(338K) committed = 458752(448K) max = -1(undefined) Type: Non-heap memory Memory Manager Names: J9 non-heap manager

Name: Java heap Usage: init = 67108864(65536K) used = 42254416(41264K) committed = 67108864(65536K) max = 67108864(65536K) Collection Usage: init = 67108864(65536K) used = 470568(459K) committed = 67108864(65536K) max = 67108864(65536K) Peak Usage: init = 67108864(65536K) used = 63753728(62259K) committed = 67108864(65536K) max = 67108864(65536K) Type: Heap memory Memory Manager Names: J9 GC

2) Tried different options, -server, -XX:+AggressiveOpts, -XX:+AggressiveOpts, -XX:-UseParallelGC. All returns “Java heap”.

Geert Bevin 2007-09-25

Can this be closed? Has EY’s commit been tested and accepted?