Reporting large Java heap allocations (was Re: RMI Activity Threads Lock GC o/p)
Y Srinivas Ramakrishna
Y.S.Ramakrishna at Sun.COM
Fri Apr 4 12:53:50 PDT 2008
By the way, i am assuming you mean a single large allocation here,
not the total heap occupancy exceeding some specified threahold.
(For the latter, recall that the JVM Management & Monitoring JMX API's do allow for
some form of reportage when the heap occupancy exceeds
a certain threshold, but I am guessing you do not have that in mind here).
----- Original Message -----
From: Y Srinivas Ramakrishna <Y.S.Ramakrishna at Sun.COM>
Date: Friday, April 4, 2008 12:45 pm
Subject: Re: Reporting large Java heap allocations (was Re: RMI Activity Threads Lock GC o/p)
To: Michael Finocchiaro <michael.finocchiaro at gmail.com>
Cc: Keith Holdaway <Keith.Holdaway at sas.com>, hotspot--runtime-dev at openjdk.java.net, "hotspot-gc-use at openjdk.java.net" <hotspot-gc-use at openjdk.java.net>
> Sorry, corrected the runtime list address below. Apologies for the
> resulting clutter.
> -- ramki
> ----- Original Message -----
> From: Y Srinivas Ramakrishna <Y.S.Ramakrishna at Sun.COM>
> Date: Friday, April 4, 2008 12:40 pm
> Subject: Reporting large Java heap allocations (was Re: RMI Activity
> Threads Lock GC o/p)
> To: Michael Finocchiaro <michael.finocchiaro at gmail.com>
> Cc: Keith Holdaway <Keith.Holdaway at sas.com>,
> "hotspot-gc-use at openjdk.java.net" <hotspot-gc-use at openjdk.java.net>, hotspot-runtime-dev at openjdk.java.net
> > Hi Fino --
> > > Yes, there is an environment variable on AIX called
> > > ALLOCATION_THRESHOLD=<size in bytes> that when set will have the
> > > send on
> > > error to stdout (or stderr not sure) when an allocation greater
> > <size
> > > in bytes> occurs. This could be useful, well at least for us, when
> > > with code that sends back way too much data. By the heap blowing
> > I
> > > mean
> > > a sudden huge jump in memory consumption from which the heap may
> > have
> > > a real
> > > hard time recovering if at all. Even better would be a flag that
> > threw
> > > a
> > > stack trace when that allocation occurs.
> > ...
> > I don't think there is a jvm (or env option) w/Hotspot that would do
> > (but i may be wrong).
> > However, I also wonder whether (with appropriate caveats, see below,
> > on appropriate
> > platforms) one might be able to elicit (an approximation to) that
> > (at
> > sufficiently large values of <size_in_bytes>) by leveraging dtrace;
> > on hotspot-runtime-dev at o.j.n might be able to help, so i have cross-posted
> > to that list.
> > -- ramki
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
More information about the hotspot-runtime-dev