public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Boehm, Hans" <hans.boehm@hp.com>
To: Andrew Haley <aph@redhat.com>, Erik Groeneveld <erik@cq2.nl>
Cc: "java@gcc.gnu.org" <java@gcc.gnu.org>
Subject: RE: GC leaks debugging
Date: Sat, 09 Apr 2011 01:17:00 -0000	[thread overview]
Message-ID: <238A96A773B3934685A7269CC8A8D04272F0041802@GVW0436EXB.americas.hpqcorp.net> (raw)
In-Reply-To: <4D9F13E9.7000106@redhat.com>

Finally getting around to looking at this thread:

It still looks to me like the 32-bit version had serious blacklisting issues, possibly in addition to other problems.  It looks to me like the root sets it's tracing are too large, and they contain too much essentially random data that ends up looking like pointers.  That may not be the only, or even dominant, problem.

But let's continue with the 64-bit version that doesn't share the problem, and should be fine.

What does the GC log look like for the C++ test program you posted?  How much live data is the GC finding?  That test program is pushing the envelope in a couple of different ways:

1. It potentially causes lots of fragmentation if some of those objects are not immediately reclaimed.  This garbage collector doesn't like large objects very much.  I would expect that even some copying collectors would run into trouble with this, in that copying such large objects is expensive, and they may try to avoid compacting them.  Others would probably do OK.

2. The heap expansion heuristic in the GC versions < 7 is not very robust in cases like this.  It tries to allocate a fixed fraction of the heap between collections, and grows the heap if that fails.  With large fragmentation, it may never succeed.  Version 7+ fixes this by trying to allocate a fixed fraction of live data, not the overall heap size.  That involves tracking live data, at least approximately.  Setting a hard limit on the heap size (GC_MAXIMUM_HEAP_SIZE environment variable) might be a workaround.

> From: Andrew Haley [mailto:aph@redhat.com]
> 
> > Just two questions:
> > 1. What is a reasonable number of heap sections?  I have 131 here.
> > 2. What is a reasonable number of free lists?  I have 60, which have
> > 13,000+ entries.
> 
> Paging Hans Boehm.  can you suggest ways to get the system to GC more
> frequently?  Would doing so avoid this scenario?
> 
> Andrew.
There is a static, configuration-dependent limit on the number of heap sections.  So long as you're not running out, I wouldn't worry about it.

What kind of free lists are we talking about?  If these are the large block lists printed by GC_dump(), then 13000+ entries sounds really high.  If so, could you post an appropriate excerpt of what's in these free lists?  For small object free lists, that's probably OK.

Hans

  parent reply	other threads:[~2011-04-09  1:17 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01  8:39 Erik Groeneveld
2011-04-01  8:45 ` Andrew Haley
2011-04-01  9:03   ` Erik Groeneveld
2011-04-01  9:34     ` Andrew Haley
2011-04-02  0:27       ` Boehm, Hans
2011-04-02  9:39         ` Erik Groeneveld
2011-04-03 17:15           ` Erik Groeneveld
2011-04-03 18:00             ` Erik Groeneveld
2011-04-04  8:13               ` Andrew Haley
2011-04-04  8:53                 ` Erik Groeneveld
2011-04-04  9:48                   ` Andrew Haley
2011-04-05  4:44                     ` Boehm, Hans
2011-04-05  8:58                       ` Andrew Haley
2011-04-05  6:50                     ` Erik Groeneveld
2011-04-05  9:02                       ` Andrew Haley
2011-04-05 12:02                         ` Erik Groeneveld
2011-04-05 12:55                           ` Andrew Haley
2011-04-06 14:30                             ` Erik Groeneveld
2011-04-06 18:33                               ` Andrew Haley
2011-04-06 18:39                                 ` David Daney
2011-04-07 17:43                                 ` Erik Groeneveld
2011-04-08  8:12                                   ` Erik Groeneveld
2011-04-08 13:56                                   ` Andrew Haley
2011-04-08 15:35                                     ` David Daney
2011-04-08 15:53                                       ` Erik Groeneveld
2011-04-08 15:57                                         ` Andrew Haley
2011-04-08 15:48                                     ` Erik Groeneveld
2011-04-09  1:17                                     ` Boehm, Hans [this message]
2011-04-09  8:47                                       ` Andrew Haley
2011-04-09 10:56                                       ` Erik Groeneveld
2011-04-10 11:03                                         ` Erik Groeneveld
2011-04-12 18:43                                           ` Erik Groeneveld
2011-04-13  8:11                                             ` Andrew Haley
2011-04-13 12:11                                               ` Bryce McKinlay
2011-04-13 14:27                                                 ` Andrew Haley
2011-04-14  8:36                                               ` Erik Groeneveld
2011-04-14  8:43                                                 ` Andrew Haley
2011-04-14 10:02                                                   ` Erik Groeneveld
2011-04-14 10:50                                                     ` Andrew Haley
2011-04-15  7:32                                                       ` Erik J Groeneveld
2011-04-01 17:41 ` David Daney
2011-04-02 16:21   ` Erik Groeneveld

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=238A96A773B3934685A7269CC8A8D04272F0041802@GVW0436EXB.americas.hpqcorp.net \
    --to=hans.boehm@hp.com \
    --cc=aph@redhat.com \
    --cc=erik@cq2.nl \
    --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).