public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ben Keppler" <bkeppler@tridentms.com>
To: "David Daney" <ddaney@caviumnetworks.com>
Cc: <java@gcc.gnu.org>
Subject: RE: FW: Garbage collection issues in GCJ
Date: Mon, 17 Jan 2011 18:57:00 -0000	[thread overview]
Message-ID: <3C7F46E08E936B478463BFFA776CDAD30168E8CA@tmsmail.domain2.local> (raw)
In-Reply-To: <4D347D2D.4010101@caviumnetworks.com>

Hi David,

Thanks for your response.  We have been unable to find documentation
detailing how to change the GC configuration including knobs for setting
the max heap size.  Could you direct us to documentation on how to do
that?  Also, are there alternatives to making a native call to
_Jv_SetGCFreeSpaceDivisor() (e.g. set an environment variable or compile
with a symbol defined in the appropriate way)?  It would be preferable
if we didn't have to implement a tight coupling to GCJ in that fashion.

Thanks for your help.

Ben Keppler, Software Engineer
E-mail: bkeppler@tridentms.com * Voice: 828.684.7474 * Fax:
8282.684.7874

-----Original Message-----
From: David Daney [mailto:ddaney@caviumnetworks.com] 
Sent: Monday, January 17, 2011 12:32 PM
To: Ben Keppler
Cc: java@gcc.gnu.org
Subject: Re: FW: Garbage collection issues in GCJ

On 01/17/2011 05:08 AM, Ben Keppler wrote:

> We are using gcj for a time sensitive application.  One of the
> requirements of the application is that messages be transmitted
> within a 60ms timeframe.  Unfortunately, the Boehm GC used in gcj is
> not generational and thus every collection is of the "stop the
> world" variety.  We are observing (using "GC_PRINT_STATS") regular
> collections that stop the world for periods in the 400ms range.
> This is a problem for us.
>
> The comments I have found on the "incremental" setting for the
> Boehm GC indicate that it doesn't work with gcj, so that would not
> appear to be an option.  My question is, are there other GC options
> (perhaps a generational garbage collector) available for gcj?  My
> research has revealed none other than TinyGC, an option that would
> exacerbate rather than relieve our problems.  Alternatively, are
> there settings on the Boehm GC that might relieve our problems?  I
> would appreciate any information you could provide.

1) GCJ's libjava is not really suited for realtime applications.

2) Setting the GCFreeSpaceDivisor (by calling
_Jv_SetGCFreeSpaceDivisor()) to a low value (try 5) may result in
shorter, but more frequent, GC intervals.  Limiting the total heap
size will also reduce the amount of work done by the GC during each
collection.

David Daney

  reply	other threads:[~2011-01-17 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 13:09 Ben Keppler
2011-01-17 17:32 ` David Daney
2011-01-17 18:57   ` Ben Keppler [this message]
2011-01-22 21:53     ` Florian Weimer
2011-01-23 19:12       ` Boehm, Hans
2011-01-24 17:45       ` David Daney
2011-01-24 17:59         ` Ben Keppler
2011-01-24 18:45           ` Hans Boehm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C7F46E08E936B478463BFFA776CDAD30168E8CA@tmsmail.domain2.local \
    --to=bkeppler@tridentms.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).