From: "Vedran Furač" <vedran.furac@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
rientjes@google.com, minchan.kim@gmail.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH v3] oom-kill: add lowmem usage aware oom kill handling
Date: Sat, 30 Jan 2010 13:33:49 +0100 [thread overview]
Message-ID: <4B64272D.8020509@gmail.com> (raw)
In-Reply-To: <20100129110321.564cb866@lxorguk.ukuu.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2557 bytes --]
Alan Cox wrote:
>> off by default. Problem is that it breaks java and some other stuff that
>> allocates much more memory than it needs. Very quickly Committed_AS hits
>> CommitLimit and one cannot allocate any more while there is plenty of
>> memory still unused.
>
> So how about you go and have a complain at the people who are causing
> your problem, rather than the kernel.
That would pass completely unnoticed and ignored as long as overcommit
is enabled by default.
>>> theoretical limit, but you generally need more swap (it's one of the
>>> reasons why things like BSD historically have a '3 * memory' rule).
>> Say I have 8GB of memory and there's always some free, why would I need
>> swap?
>
> So that all the applications that allocate tons of address space and
> don't use it can swap when you hit that corner case, and as a result you
> don't need to go OOM. You should only get an OOM when you run out of
> memory + swap.
Yes, but unfortunately using swap makes machine crawl with huge disk IO
every time you access some application you haven't been using for a few
hours. So recently more and more people are disabling it completely with
positive experience.
>>> So sounds to me like a problem between the keyboard and screen (coupled
>> Unfortunately it is not. Give me ssh access to your computer (leave
>> overcommit on) and I'll kill your X with anything running on it.
>
> If you have overcommit on then you can cause stuff to get killed. Thats
> what the option enables.
s/stuff/wrong stuff/
> It's really very simple: overcommit off you must have enough RAM and swap
> to hold all allocations requested. Overcommit on - you don't need this
> but if you do use more than is available on the system something has to
> go.
>
> It's kind of like banking overcommit off is proper banking, overcommit
> on is modern western banking.
Hehe, yes and you know the consequences.
If you look at malloc(3) you would see this:
"This means that when malloc() returns non-NULL there is no guarantee
that the memory really is available. This is a really bad bug."
So, if you don't want to change the OOM algorithm why not fixing this
bug then? And after that change the proc(5) manpage entry for
/proc/sys/vm/overcommit_memory into something like:
0: heuristic overcommit (enable this if you have memory problems with
some buggy software)
1: always overcommit, never check
2: always check, never overcommit (this is the default)
Regards,
Vedran
--
http://vedranf.net | a8e7a7783ca0d460fee090cc584adc12
[-- Attachment #2: vedran_furac.vcf --]
[-- Type: text/x-vcard, Size: 220 bytes --]
begin:vcard
fn;quoted-printable:Vedran Fura=C4=8D
n;quoted-printable:Fura=C4=8D;Vedran
adr:;;;;;;Croatia
email;internet:vedran.furac@gmail.com
x-mozilla-html:FALSE
url:http://vedranf.net
version:2.1
end:vcard
next prev parent reply other threads:[~2010-01-30 12:33 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 5:59 [PATCH] oom-kill: add lowmem usage aware oom kill handling KAMEZAWA Hiroyuki
2010-01-21 5:59 ` KAMEZAWA Hiroyuki
2010-01-21 15:18 ` Minchan Kim
2010-01-21 15:18 ` Minchan Kim
2010-01-21 23:48 ` KAMEZAWA Hiroyuki
2010-01-21 23:48 ` KAMEZAWA Hiroyuki
2010-01-22 0:40 ` Minchan Kim
2010-01-22 0:40 ` Minchan Kim
2010-01-22 1:06 ` KAMEZAWA Hiroyuki
2010-01-22 1:06 ` KAMEZAWA Hiroyuki
2010-01-21 15:29 ` Balbir Singh
2010-01-21 15:29 ` Balbir Singh
2010-01-21 23:54 ` KAMEZAWA Hiroyuki
2010-01-21 23:54 ` KAMEZAWA Hiroyuki
2010-01-22 6:23 ` [PATCH v2] " KAMEZAWA Hiroyuki
2010-01-22 6:23 ` KAMEZAWA Hiroyuki
2010-01-22 14:00 ` Minchan Kim
2010-01-22 14:00 ` Minchan Kim
2010-01-22 15:16 ` KAMEZAWA Hiroyuki
2010-01-22 15:16 ` KAMEZAWA Hiroyuki
2010-01-22 15:41 ` Minchan Kim
2010-01-22 15:41 ` Minchan Kim
2010-01-25 6:15 ` [PATCH v3] " KAMEZAWA Hiroyuki
2010-01-25 6:15 ` KAMEZAWA Hiroyuki
2010-01-26 23:12 ` Andrew Morton
2010-01-26 23:12 ` Andrew Morton
2010-01-26 23:53 ` KAMEZAWA Hiroyuki
2010-01-26 23:53 ` KAMEZAWA Hiroyuki
2010-01-27 0:19 ` Andrew Morton
2010-01-27 0:19 ` Andrew Morton
2010-01-27 0:58 ` KAMEZAWA Hiroyuki
2010-01-27 0:58 ` KAMEZAWA Hiroyuki
2010-01-27 6:30 ` [PATCH v4 0/2] " KAMEZAWA Hiroyuki
2010-01-27 6:30 ` KAMEZAWA Hiroyuki
2010-01-27 6:32 ` [PATCH v4 1/2] sysctl clean up vm related variable declarations KAMEZAWA Hiroyuki
2010-01-27 6:32 ` KAMEZAWA Hiroyuki
2010-01-28 8:54 ` David Rientjes
2010-01-28 8:54 ` David Rientjes
2010-01-28 10:30 ` KAMEZAWA Hiroyuki
2010-01-28 10:30 ` KAMEZAWA Hiroyuki
2010-01-27 6:33 ` [PATCH v4 2/2] oom-kill: add lowmem usage aware oom kill handling v4 KAMEZAWA Hiroyuki
2010-01-27 6:33 ` KAMEZAWA Hiroyuki
2010-01-28 0:12 ` [PATCH v4 0/2] oom-kill: add lowmem usage aware oom kill handling KAMEZAWA Hiroyuki
2010-01-28 0:12 ` KAMEZAWA Hiroyuki
2010-01-27 23:56 ` [PATCH v3] " David Rientjes
2010-01-27 23:56 ` David Rientjes
2010-01-28 0:16 ` Alan Cox
2010-01-28 0:16 ` Alan Cox
2010-01-28 0:26 ` KAMEZAWA Hiroyuki
2010-01-28 0:26 ` KAMEZAWA Hiroyuki
2010-01-28 0:59 ` David Rientjes
2010-01-28 0:59 ` David Rientjes
2010-01-29 0:25 ` Vedran Furač
2010-01-29 0:25 ` Vedran Furač
2010-01-29 0:35 ` Alan Cox
2010-01-29 0:35 ` Alan Cox
2010-01-29 0:57 ` Vedran Furač
2010-01-29 0:57 ` Vedran Furač
2010-01-29 11:03 ` Alan Cox
2010-01-29 11:03 ` Alan Cox
2010-01-30 12:33 ` Vedran Furač [this message]
2010-01-30 12:59 ` Alan Cox
2010-01-30 12:59 ` Alan Cox
2010-01-30 17:30 ` Vedran Furač
2010-01-30 17:45 ` Alan Cox
2010-01-30 17:45 ` Alan Cox
2010-01-30 18:17 ` Vedran Furač
2010-01-27 23:46 ` David Rientjes
2010-01-27 23:46 ` David Rientjes
2010-01-26 23:16 ` Andrew Morton
2010-01-26 23:16 ` Andrew Morton
2010-01-26 23:44 ` KAMEZAWA Hiroyuki
2010-01-26 23:44 ` KAMEZAWA Hiroyuki
2010-01-27 23:40 ` David Rientjes
2010-01-27 23:40 ` David Rientjes
-- strict thread matches above, loose matches on Subject: below --
2010-01-29 16:11 KAMEZAWA Hiroyuki
2010-01-29 16:11 ` KAMEZAWA Hiroyuki
2010-01-29 16:21 ` Alan Cox
2010-01-29 16:21 ` Alan Cox
2010-01-29 16:25 ` KAMEZAWA Hiroyuki
2010-01-29 16:25 ` KAMEZAWA Hiroyuki
2010-01-29 16:30 ` Alan Cox
2010-01-29 16:30 ` Alan Cox
2010-01-29 16:41 ` KAMEZAWA Hiroyuki
2010-01-29 16:41 ` KAMEZAWA Hiroyuki
2010-01-29 21:07 ` David Rientjes
2010-01-29 21:07 ` David Rientjes
2010-01-30 12:46 ` Vedran Furač
2010-01-30 22:53 ` David Rientjes
2010-01-30 22:53 ` David Rientjes
2010-01-31 20:29 ` Vedran Furač
2010-02-01 10:33 ` David Rientjes
2010-02-01 10:33 ` David Rientjes
2010-02-01 0:01 ` KAMEZAWA Hiroyuki
2010-02-01 0:01 ` KAMEZAWA Hiroyuki
2010-02-01 10:28 ` David Rientjes
2010-02-01 10:28 ` David Rientjes
2010-01-29 21:11 ` David Rientjes
2010-01-29 21:11 ` David Rientjes
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=4B64272D.8020509@gmail.com \
--to=vedran.furac@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=rientjes@google.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 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.