caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mauricio Fernandez <mfp@acm.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Optimizing garbage collection
Date: Mon, 22 Nov 2010 17:27:27 +0100	[thread overview]
Message-ID: <20101122162727.GA1796@NANA.localdomain> (raw)
In-Reply-To: <B5DE1B36-F301-42DC-AC95-2513E35BA22F@inria.fr>

On Mon, Nov 22, 2010 at 04:10:49PM +0100, Damien Doligez wrote:
> On 2010-11-21, at 20:26, Eray Ozkural wrote:
> 
> > I've been thinking whether some kind of doubling strategy would work for the minor heap size. What do you think?
> 
> Sounds like an interesting idea, but what heuristic would you use?
> When everything is smooth, the running time decreases something like
> exponentially with the minor heap size, so you'd always want to
> increase the size.  How do you tell when to stop?  And then, if the
> program is not behaving uniformly, when do you decide to reduce
> the size?

Just dropping an idea, not sure it's worth a dime...
How about an exponential growth scheme with hysteresis?
On each minor collection, multiply the size by a if the rate of promoted words
exceeds r1, divide by b if the rate is below r2 (r1 > r2); otherwise remain
stable.

In order to account for the effect of the cache hierarchy, r1 and r2 could
also be a function of the current heap size (e.g., with r1 and r2 being higher
when approaching "magic" numbers such as the size of the L2 cache on the left
and right side respectively).

It'd also be very nice to be able to estimate the amount of time spent on
minor + major GC collection vs. the mutator.

-- 
Mauricio Fernandez  -   http://eigenclass.org


  reply	other threads:[~2010-11-22 16:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 15:51 Eray Ozkural
2010-11-19 14:54 ` [Caml-list] " Michael Ekstrand
2010-11-19 15:49   ` Eray Ozkural
2010-11-20  2:20   ` Eray Ozkural
2010-11-21 18:13     ` Alexandre Pilkiewicz
2010-11-21 19:26       ` Eray Ozkural
     [not found]       ` <577267187.967802.1290367612809.JavaMail.root@zmbs1.inria.fr>
2010-11-22 15:10         ` Damien Doligez
2010-11-22 16:27           ` Mauricio Fernandez [this message]
2010-11-22 16:42           ` Sylvain Le Gall
2010-11-22 18:07             ` [Caml-list] " Eray Ozkural
2010-11-22 21:14             ` Jon Harrop
2010-11-22 23:13               ` Eray Ozkural
2010-11-23 15:54                 ` Jon Harrop
2010-11-24 22:35                 ` Goswin von Brederlow
2010-11-22 18:38           ` [Caml-list] " John Carr
     [not found] <1832704169.1010021.1290451094930.JavaMail.root@zmbs1.inria.fr>
2010-11-23  9:48 ` Damien Doligez
2010-11-23 13:40   ` Christophe Raffalli
2010-11-23 16:43     ` Christophe Raffalli

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=20101122162727.GA1796@NANA.localdomain \
    --to=mfp@acm.org \
    --cc=caml-list@inria.fr \
    /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 NNTP newsgroup(s).