From: Damien Doligez <damien.doligez@inria.fr>
To: OCaml <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Garbage collection and caml_adjust_gc_speed
Date: Tue, 29 Aug 2006 17:20:16 +0200 [thread overview]
Message-ID: <8B65BEE5-D101-4B39-98DD-3B68608702AC@inria.fr> (raw)
In-Reply-To: <44F3BFA7.20202@cs.umn.edu>
On 2006-08-29, at 06:16, Christopher Kauffman wrote:
> I am finishing up my first major research application written in
> OCaml. The code is a scientific application which does a moderate
> amount of floating point computations for which I have employed the
> Bigarray library and the Lacaml package.
[...]
> What concerns me is the large overhead I seem to be getting from
> the first function, 'caml_adjust_gc_speed', which I assume is
> related to the garbage collector. Over 4 million calls to this
> function seems a little much. I attempted to play with a garbage
> collection parameter, the value of control.space_overhead in the Gc
> module. According to the manual, this affects the major GC speed
> and increasing the value is supposed to cut down on the
> aggressiveness of the GC. Setting space_overhead to 99 did not
> change number of calls to 'caml_adjust_gc_speed'.
caml_adjust_gc_speed is called by caml_alloc_custom to tell it about
resources (in this case, memory) outside the heap that depend on the
allocated block.
None of the GC parameter can reduce this number. I guess your program
allocated over 4 million bigarrays.
What I find surprising is that this simple function would dominate
the run time of your program. I suspect some problem with gprof.
Could you give us more details about the computations performed by
your program?
-- Damien
next prev parent reply other threads:[~2006-08-29 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 4:16 Christopher Kauffman
2006-08-29 15:20 ` Damien Doligez [this message]
2006-08-29 18:37 ` [Caml-list] " Christopher Kauffman
2006-08-31 15:34 ` Christopher Kauffman
2006-08-31 21:08 ` [Caml-list] Garbage collection and caml_adjust_gc_speed - Problem in Bigarray Christopher Kauffman
2006-09-01 17:06 ` David MENTRE
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=8B65BEE5-D101-4B39-98DD-3B68608702AC@inria.fr \
--to=damien.doligez@inria.fr \
--cc=caml-list@yquem.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