linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: "Abu M. Muttalib" <abum@aftek.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Robert Hancock <hancockr@shaw.ca>,
	chase.venters@clientec.com, kernelnewbies@nl.linux.org,
	linux-newbie@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm <linux-mm@kvack.org>
Subject: Re: Commenting out out_of_memory() function in __alloc_pages()
Date: Sun, 9 Jul 2006 15:23:52 +0200	[thread overview]
Message-ID: <20060709132352.GA23263@1wt.eu> (raw)
In-Reply-To: <BKEKJNIHLJDCFGDBOHGMCEFIDCAA.abum@aftek.com>

On Sun, Jul 09, 2006 at 06:42:23PM +0530, Abu M. Muttalib wrote:
> >It's explained in Documentation/filesystems/proc.txt. This file know far
> >ore things than me :-)
> 
> I tried with overcommit_ratio=100 and overcommit_memory=2 in that sequence.
> 
> but the applications were killed. :-(

If you set it too high, the system will never fail a malloc() and the memory
will quickly be grabbed by memory eaters, thus quickly resulting in OOM. This
is the default behaviour.

If you set it too low, the system will fail malloc() calls eventhough there
might be enough memory left, so you cannot start new processes.

Setting it to an intermediate value helps the system manage its ressources
and helps applications know that they must be smart with their memory usage.
For instance, if your application has something like a garbage collector or
can automatically reduce its buffers when memory becomes scarce, then it
will be helped by a lower overcommit_ratio. If your application does not
run as root, you might also try to play with ulimit -v before starting it.
I use this in my load balancing reverse proxy to restrain memory usage
without impacting the rest of the system.

Memory tuning in constrainted environments is like rocket science. You need
some evaluations then to make a lot of experimentations. There is no rule
which will work for everyone. But it seems to me that your application is
not very resistant in those environments. Maybe 2.4.19 was very close to
the ressource limit and now 2.6.13 has crossed the boundary. You can also
try to play with the -tiny patches (merged around 2.6.15 IIRC) to reduce
the kernel's memory usage.

> Regards,
> Abu.

Regards,
Willy

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-07-09 13:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.AmXizdwfdZtqgKFSMcRp3U0QZXI@ifi.uio.no>
2006-07-08 18:06 ` Robert Hancock
2006-07-09  4:23   ` Abu M. Muttalib
2006-07-09  5:18     ` Chase Venters
2006-07-09  6:11       ` Abu M. Muttalib
2006-07-09  7:55         ` Chase Venters
2006-07-09 11:55     ` Alan Cox
2006-07-09 11:48       ` Abu M. Muttalib
2006-07-09 12:01         ` Willy Tarreau
2006-07-09 12:13           ` Abu M. Muttalib
2006-07-09 12:15             ` Willy Tarreau
2006-07-09 13:12               ` Abu M. Muttalib
2006-07-09 13:23                 ` Willy Tarreau [this message]
2006-07-09 12:09         ` Alan Cox
2006-07-09 12:03           ` Abu M. Muttalib
2006-07-09 12:03           ` Nick Piggin
2006-07-09 14:34             ` Abu M. Muttalib
2006-07-09 15:15               ` Nick Piggin
2006-07-07  9:46 Abu M. Muttalib
2006-07-07  9:54 ` Robin Holt
2006-07-11 14:57   ` Abu M. Muttalib
2006-07-11 15:08     ` Abu M. Muttalib
2006-07-11 15:19       ` Abu M. Muttalib
2006-07-13  5:12         ` Mouhammad Tayseer Alquoatli
2006-07-11 15:35       ` Chase Venters
2006-07-24  9:44         ` Abu M. Muttalib
2006-07-07 21:21 ` Chase Venters

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=20060709132352.GA23263@1wt.eu \
    --to=w@1wt.eu \
    --cc=abum@aftek.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chase.venters@clientec.com \
    --cc=hancockr@shaw.ca \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-newbie@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox