Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6739920
Votes 1
Synopsis java 6u4~ use larger C heap if there are many threads
Category java:classes_net
Reported Against b12
Release Fixed 6u14(b04), 7(b38) (Bug ID:2167322)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 6468954 , 6747415
Submit Date 21-AUG-2008
Description
On RHEL 4.6 64-bit 4G mem, two instances of jakarta-jmeter with 6000 threads worked fine on 6u3 64-bit.
But after upgrading to 6u6, java processes soon cause memory thrashing and become very slow.

By monitoring virtual and resident size of java processes, 6u4 and later use larger memory.  In a case,
6u7 uses 600MB or larger C heap.

By checking malloc related path on gdb, it turned out the most memory allocations come from 
ObjectMonitor allocation.

On 6u4, per-thread ObjectMonitor freelist was introdued (_omFreeList).  In some test, I saw more than
800 ObjectMonitors in average on 6u7.  ObjectMonitor size is 168 bytes on 64-bit JVM for Linux.

6000*800*168=806400000

6u3 can run the same app with 100m to 200m C heap, but 6u4 and later require much larger C heap.

C heap usage levels off at some point, but we cannot know how much memory is really needed to
a specific run of application.  Currently there is no clear limit for the ObjectMonitors on
omFreeList.  

To suppress the excessive C heap use, we need a switch to turn off the per-thread ObjectMonitor
free list or a  customer  mechanism to control the memory usage (Or simply a better implementation).
Posted Date : 2008-08-21 15:08:38.0
Work Around
N/A
Evaluation
calling (uncontended) monitors from socket native code causes unnecessary monitor inflation.
Posted Date : 2008-09-09 09:43:10.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang