caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom <tom.primozic@gmail.com>
To: "Jon Harrop" <jon@ffconsultancy.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Fork-friendly GC
Date: Mon, 2 Jul 2007 19:46:39 +0200	[thread overview]
Message-ID: <c1490a380707021046y214ad63cna6796413ccf1676@mail.gmail.com> (raw)
In-Reply-To: <200706261500.56979.jon@ffconsultancy.com>

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

Well, I believe that Fork-friendly GC is the same as Paging-friendly GC -
i.e., after a fork(), the memory is not copied into two different processes
until it is modified. So, even if a process allocates and modifies only a
small percentage of memory, the allocations might trigger the GC, which
means that all the memory is going to be swept and modified - and thus
copied.

The problem is, of course, that this is very process and/or programm
specific - it makes sense for the 24 Apache child processes to do GC, but it
is a waste of time for a forked BASH script processes that is going to
exec() after just a few lines.

The best solution I see here is to abandon the fork()-ing alltogether -
either things are run in the same process, only different threads, or
completely new processes are started (though one can only do that on Windows
platform, not on *NIX - AFAIK).

 - Tom

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

  reply	other threads:[~2007-07-02 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26 14:00 Jon Harrop
2007-07-02 17:46 ` Tom [this message]
2007-07-03  1:42   ` [Caml-list] " David Thomas

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=c1490a380707021046y214ad63cna6796413ccf1676@mail.gmail.com \
    --to=tom.primozic@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jon@ffconsultancy.com \
    /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).