caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rich@annexia.org>
To: orbitz@ezabel.com
Cc: david.baelde@ens-lyon.org, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Understanding usage by the runtime
Date: Sun, 8 Jan 2012 23:02:38 +0000	[thread overview]
Message-ID: <20120108230238.GB23941@annexia.org> (raw)
In-Reply-To: <B60C8CD8-5F88-476B-8F67-5FEB5165B271@ezabel.com>

On Sun, Jan 08, 2012 at 05:50:40PM -0500, orbitz@ezabel.com wrote:
> Isn't the goal of compaction to keep all of these blocks of memory
> as close as possible?  I should have noted the fragmentation of my
> heap after compaction, but it seems unlikely that my < 1meg of actual
> data could be fragmented across 400megs worth of chunks.

I might not have been clear: memory can only be given back to the OS
at the C / malloc allocator level.  OCaml compaction has nothing to do
with this because C allocations (and data structures used by malloc
itself) cannot ever be moved.

However you can get a clearer picture if you look at /proc/<pid>/maps
or smaps and also if you have a debugging malloc implementation.

> > Here's the news: the OS doesn't need you to give back
> > memory.  Because of virtual memory and swap, the OS will quite happily
> > take back your memory whenever it wants without asking you. 
>
> For most cases this is true, however in my case (which is not the
> usual case), my OS has no swap.  We actually prefer things to fail
> than to be swapped because we are doing computations could take months
> if we get into a swapping situation.  I'm no linux expert so our
> solution is to not have swap and to keep our VMs light when it comes
> to I/O.  Perhaps this is a poor solution but it does change things for
> us.

Sure, this is a perfectly valid case, we have many customers who use
RHEL like this.

Rich.

-- 
Richard Jones
Red Hat

  reply	other threads:[~2012-01-08 23:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30 23:45 orbitz
2011-12-31  9:11 ` David Baelde
2011-12-31 15:33   ` orbitz
2012-01-01 12:44     ` Richard W.M. Jones
2012-01-04 18:03       ` Damien Doligez
2012-01-04 18:48         ` Adrien
2012-01-04 19:37           ` John Carr
2012-01-07  5:43       ` orbitz
2012-01-08 18:45         ` Richard W.M. Jones
2012-01-08 19:00           ` Richard W.M. Jones
2012-01-08 22:33             ` Török Edwin
2012-01-09 14:31               ` Richard W.M. Jones
2012-01-09 21:07                 ` Richard W.M. Jones
2012-01-08 22:50           ` orbitz
2012-01-08 23:02             ` Richard W.M. Jones [this message]
2012-01-08 23:26               ` orbitz

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=20120108230238.GB23941@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=david.baelde@ens-lyon.org \
    --cc=orbitz@ezabel.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).