All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy TARREAU <willy@w.ods.org>
To: Al Boldi <a1426z@gawab.com>
Cc: "Barry K. Nathan" <barryn@pobox.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] strict VM overcommit accounting for 2.4.32/2.4.33-pre1
Date: Fri, 30 Dec 2005 22:44:02 +0100	[thread overview]
Message-ID: <20051230214402.GA28683@w.ods.org> (raw)
In-Reply-To: <200512302351.58650.a1426z@gawab.com>

On Fri, Dec 30, 2005 at 11:51:58PM +0300, Al Boldi wrote:
> Barry K. Nathan wrote:
> > On 12/30/05, Al Boldi <a1426z@gawab.com> wrote:
> > > Thanks a lot!
> > >
> > > > +3 - (NEW) paranoid overcommit The total address space commit
> > > > +      for the system is not permitted to exceed swap. The machine
> > > > +      will never kill a process accessing pages it has mapped
> > > > +      except due to a bug (ie report it!)
> > >
> > > This one isn't in 2.6, which is critical for a stable system.
> >
> > I think you can get paranoid overcommit with either my patch or 2.6 by
> > setting /proc/sys/vm/overcommit_mode to 2 *and*
> > /proc/sys/vm/overcommit_ratio to 0, however.
> 
> Not really in 2.6.
> And even if this were made to work, what would it imply to a system running 
> w/o swap?

I can clearly reply on this one :

root@pcw:vm# swapoff -a
root@pcw:vm# free
             total       used       free     shared    buffers     cached
Mem:       1031752      84992     946760          0       3144      38564
-/+ buffers/cache:      43284     988468
Swap:            0          0          0
root@pcw:vm# echo 2 > overcommit_memory
root@pcw:vm# echo 0 > overcommit_ratio
root@pcw:vm# uname -a
bash: fork: Cannot allocate memory
root@pcw:vm# echo 10 > overcommit_ratio
root@pcw:vm# uname -a
Linux pcw 2.4.33-pre1 #1 SMP Fri Dec 30 21:52:06 CET 2005 i686 unknown
root@pcw:vm#

So as one could expect, if you're limited to allocation of
(swap_size)+0% of RAM, then you have a limit of 0 kB, so that
malloc() always fails. I'll do some crash tests with mmap, shm
and 100 ratio to see how it behaves, but at the moment it's
clearly good. Multi-process malloc cannot allocate more than
specified and that's good.

> Thanks!
> 
> --
> Al

Regards,
Willy


  reply	other threads:[~2005-12-30 21:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-30 20:06 [PATCH] strict VM overcommit accounting for 2.4.32/2.4.33-pre1 Al Boldi
2005-12-30 20:18 ` Barry K. Nathan
2005-12-30 20:51   ` Al Boldi
2005-12-30 21:44     ` Willy TARREAU [this message]
2005-12-31  0:55 ` Alan Cox
2005-12-31  4:59   ` Al Boldi
2005-12-31  7:38     ` Willy Tarreau
2005-12-31 14:02       ` Al Boldi
2005-12-31 14:18         ` Willy Tarreau
2005-12-31 14:26         ` Arjan van de Ven
2005-12-31 14:58           ` Willy Tarreau
2005-12-31 15:17             ` Arjan van de Ven
2005-12-31 17:36           ` Al Boldi
2006-01-01  9:12             ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2005-12-30  7:44 Barry K. Nathan
2005-12-30 17:48 ` Willy Tarreau
2005-12-30 18:17   ` Arjan van de Ven
2005-12-30 18:33     ` Willy Tarreau
2005-12-30 19:37       ` Barry K. Nathan
2005-12-30 20:45         ` Willy Tarreau

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=20051230214402.GA28683@w.ods.org \
    --to=willy@w.ods.org \
    --cc=a1426z@gawab.com \
    --cc=barryn@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.