caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eray Ozkural <examachine@gmail.com>
To: Sylvain Le Gall <sylvain@le-gall.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Optimizing garbage collection
Date: Mon, 22 Nov 2010 20:07:09 +0200	[thread overview]
Message-ID: <AANLkTimOx6PHhx1wPfvvyBbx-kc-QCX9Ujrgra_HhPub@mail.gmail.com> (raw)
In-Reply-To: <slrniel7as.r67.sylvain@gallu.homelinux.org>

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]

On Mon, Nov 22, 2010 at 6:42 PM, Sylvain Le Gall <sylvain@le-gall.net>wrote:

> On 22-11-2010, Damien Doligez <damien.doligez@inria.fr> 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?
> >
>
> How do you tell when to stop?
> ->
>
> Maybe you can stop when you reach (the size of the L2/L3 cache of the
> processor) / number of core.
>
> Both information are quite straight to read from /proc/cpuinfo.
>


Yeah that's what I had in mind, determine a kind of sensible upper bound to
grow to. Cache size makes some sense, though I think as recently mentioned
"working set size" is relevant. If the garbage collector could deduce that
it could be used, the other suggestion is also sensible. You could also set
it to something like 1/4 of physical RAM. That kind of logic is used in some
out-of-core data mining algorithms.

The objective here is to amortize the cost of copying until the working set
size is reached, otherwise there will be disk thrashing anyway!

Best,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct

[-- Attachment #2: Type: text/html, Size: 2326 bytes --]

  reply	other threads:[~2010-11-22 18:07 UTC|newest]

Thread overview: 15+ 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
2010-11-22 16:42           ` Sylvain Le Gall
2010-11-22 18:07             ` Eray Ozkural [this message]
2010-11-22 21:14             ` [Caml-list] " 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

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=AANLkTimOx6PHhx1wPfvvyBbx-kc-QCX9Ujrgra_HhPub@mail.gmail.com \
    --to=examachine@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=sylvain@le-gall.net \
    /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).