caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: Being aware of memory overuse
Date: Wed, 10 Feb 2010 17:47:03 +0000 (UTC)	[thread overview]
Message-ID: <slrnhn5s8p.ckm.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <654922.88817.qm@web111503.mail.gq1.yahoo.com>

On 10-02-2010, Dario Teixeira <darioteixeira@yahoo.com> wrote:
> Hi,
>
>> I always wanted to have kernel spport for this. Some way for aplication
>> to tell the kernel about freeable memory and for the kernel to request
>> some memory to be freeed instead of swapping it out.
>
> If I recall correctly, there was an Lwn.net article reporting a lkml
> (the Linux kernel mailing list) discussion on that subject.  One of
> the proposals was for the kernel to send processes a signal (SIGFREE?)
> requesting they free up memory (by running a major GC, for example)
> whenever memory was running low.  In theory this could in some cases
> avoid the invocation of the draconian OOM killer.
>
> Question: just how effective such a feature would be in the Ocaml case?
>
>

I forgot to tell about other paths I have followed: setrlimit/getrlimit.
There are limits like RLIMIT_DATA, RLIMIT_RSS et al (CPU...). setrlimit
limits memory by generating ENOMEM when limits are reached and getrlimit
should give information about the current level of use of these limits.
Unfortunately, the memory consumption I get with getrlimit is not
accurate (in fact not updated).

I have OCaml bindings for this, I should published in a near future. 

Regards,
Sylvain Le Gall


  reply	other threads:[~2010-02-10 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 10:34 David Rajchenbach-Teller
2010-02-06 13:34 ` Sylvain Le Gall
2010-02-10  8:45   ` [Caml-list] " Goswin von Brederlow
2010-02-10 13:43     ` Dario Teixeira
2010-02-10 17:47       ` Sylvain Le Gall [this message]
2010-02-10 21:31       ` Goswin von Brederlow

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=slrnhn5s8p.ckm.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --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).