mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
       [not found] <42F8720D.4060300@picsearch.com>
@ 2005-08-09  9:33 ` Thomas Habets
  2005-08-09 13:44   ` Alan Cox
  2005-08-10  8:13   ` Denis Vlasenko
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Habets @ 2005-08-09  9:33 UTC (permalink / raw)
  To: Xavier Roche; +Cc: linux-kernel, vinays

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

Attached (sorry, couldn't get it to not word-wrap inline) is a patch to remove 
incorrect documentation regarding overcommit.

On Tuesday 09 August 2005 11:06, you wrote:
> vinay wrote:
> > I have a problem with linux kernel's Out Of Memory (OOM) killer.

You're not alone.

> This condition should not occur without using overcommit. Are you sure
> you are not using overcommit ? (cat /proc/sys/vm/overcommit_memory)
>
> To dasable it:
> echo 0 > /proc/sys/vm/overcommit_memory

The documentation seems forked on this point, and from what I can see from the 
source (mm/mmap.c and include/linux/mman.h) 
Documentation/filesystems/proc.txt is wrong and Documentation/sysctl/vm.txt 
is right.

#define OVERCOMMIT_NEVER		2

> Overcommit is quite dangerous on production systems, because it leads to
> oom kills on heavy loads (at least, this is what I experienced).

... and it's on by default. bleh.



---------
typedef struct me_s {
  char name[]      = { "Thomas Habets" };
  char email[]     = { "thomas@habets.pp.se" };
  char kernel[]    = { "Linux" };
  char *pgpKey[]   = { "http://www.habets.pp.se/pubkey.txt" };
  char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854" };
  char coolcmd[]   = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;

[-- Attachment #2: overcommit_doc.patch --]
[-- Type: text/x-diff, Size: 1803 bytes --]

diff -uprN linux-2.6.12.4.orig/CREDITS linux-2.6.12.4/CREDITS
--- linux-2.6.12.4.orig/CREDITS 2005-08-05 09:04:37.000000000 +0200
+++ linux-2.6.12.4/CREDITS      2005-08-09 11:21:53.000000000 +0200
@@ -1267,6 +1267,12 @@ E: ehaase@inf.fu-berlin.de
 W: http://www.inf.fu-berlin.de/~ehaase
 D: Driver for the Commodore A2232 serial board
 
+N: Thomas Habets
+E: thomas@habets.pp.se
+W: http://www.habets.pp.se/
+D: Reader of code, slayer of wrongful documentation
+P: 1024D/AD48E854 A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854
+
 N: Bruno Haible
 E: haible@ma2s2.mathematik.uni-karlsruhe.de
 D: SysV FS, shm swapping, memory management fixes
diff -uprN linux-2.6.12.4.orig/Documentation/filesystems/proc.txt linux-2.6.12.4/Documentation/filesystems/proc.txt
--- linux-2.6.12.4.orig/Documentation/filesystems/proc.txt      2005-08-05 09:04:37.000000000 +0200
+++ linux-2.6.12.4/Documentation/filesystems/proc.txt   2005-08-09 11:16:13.000000000 +0200
@@ -1240,16 +1240,7 @@ swap-intensive.
 overcommit_memory
 -----------------
 
-This file  contains  one  value.  The following algorithm is used to decide if
-there's enough  memory:  if  the  value of overcommit_memory is positive, then
-there's always  enough  memory. This is a useful feature, since programs often
-malloc() huge  amounts  of  memory 'just in case', while they only use a small
-part of  it.  Leaving  this value at 0 will lead to the failure of such a huge
-malloc(), when in fact the system has enough memory for the program to run.
-
-On the  other  hand,  enabling this feature can cause you to run out of memory
-and thrash the system to death, so large and/or important servers will want to
-set this value to 0.
+See Documentation/sysctl/vm.txt.
 
 nr_hugepages and hugetlb_shm_group
 ----------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-09  9:33 ` [PATCH] Kernels Out Of Memoy(OOM) killer Problem ? Thomas Habets
@ 2005-08-09 13:44   ` Alan Cox
  2005-08-09 14:55     ` Thomas Habets
  2005-08-10  8:13   ` Denis Vlasenko
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-08-09 13:44 UTC (permalink / raw)
  To: Thomas Habets; +Cc: Xavier Roche, linux-kernel, vinays

0 - overcommit except if something is obviously silly
1 - overcommit always (some scientific workloads)
2 - don't overcommit (databases etc)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-09 13:44   ` Alan Cox
@ 2005-08-09 14:55     ` Thomas Habets
  2005-08-09 16:39       ` Alan Cox
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Habets @ 2005-08-09 14:55 UTC (permalink / raw)
  To: Alan Cox; +Cc: Xavier Roche, linux-kernel, vinays

Once upon a midnight dreary, Alan Cox pondered, weak and weary:
> 0 - overcommit except if something is obviously silly
> 1 - overcommit always (some scientific workloads)
> 2 - don't overcommit (databases etc)

Exactly. Which is what the code and D/sysctl/vm.txt say, and why the 
description in D/filesystems/proc.txt is a lying POS that needs to be 
*shining blue led in everyones eyes* Exterminated before more people are 
sucked into its world of lies.

---------
typedef struct me_s {
  char name[]      = { "Thomas Habets" };
  char email[]     = { "thomas@habets.pp.se" };
  char kernel[]    = { "Linux" };
  char *pgpKey[]   = { "http://www.habets.pp.se/pubkey.txt" };
  char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854" };
  char coolcmd[]   = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-09 14:55     ` Thomas Habets
@ 2005-08-09 16:39       ` Alan Cox
  2005-08-09 17:14         ` Thomas Habets
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-08-09 16:39 UTC (permalink / raw)
  To: Thomas Habets; +Cc: Xavier Roche, linux-kernel, vinays

On Maw, 2005-08-09 at 16:55 +0200, Thomas Habets wrote:
> Once upon a midnight dreary, Alan Cox pondered, weak and weary:
> > 0 - overcommit except if something is obviously silly
> > 1 - overcommit always (some scientific workloads)
> > 2 - don't overcommit (databases etc)
> 
> Exactly. Which is what the code and D/sysctl/vm.txt say, and why the 
> description in D/filesystems/proc.txt is a lying POS that needs to be 
> *shining blue led in everyones eyes* Exterminated before more people are 
> sucked into its world of lies.

Please submit a patch to fix it


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-09 16:39       ` Alan Cox
@ 2005-08-09 17:14         ` Thomas Habets
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Habets @ 2005-08-09 17:14 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, trivial, torvalds

Summary: Patch removes incorrect documentation. Correct documentation
already exists in tree.

Once upon a midnight dreary, Alan Cox pondered, weak and weary:
> > > 0 - overcommit except if something is obviously silly
> > > 1 - overcommit always (some scientific workloads)
> > > 2 - don't overcommit (databases etc)
> > Exactly. Which is what the code and D/sysctl/vm.txt say, and why the
> > description in D/filesystems/proc.txt is a lying POS that needs to be
> > *shining blue led in everyones eyes* Exterminated before more people are
> > sucked into its world of lies.
> Please submit a patch to fix it

...
Kind of what I did (and changed the subject line to include PATCH). Albeit as an attachment.
This time I fought with my mail client and won. See below sig.

I found no maintainer for the documentation, did I forget to CC someone?

---------
typedef struct me_s {
  char name[]      = { "Thomas Habets" };
  char email[]     = { "thomas@habets.pp.se" };
  char kernel[]    = { "Linux" };
  char *pgpKey[]   = { "http://www.habets.pp.se/pubkey.txt" };
  char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854" };
  char coolcmd[]   = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;


diff -uprN linux-2.6.12.4.orig/CREDITS linux-2.6.12.4/CREDITS
--- linux-2.6.12.4.orig/CREDITS 2005-08-05 09:04:37.000000000 +0200
+++ linux-2.6.12.4/CREDITS      2005-08-09 11:21:53.000000000 +0200
@@ -1267,6 +1267,12 @@ E: ehaase@inf.fu-berlin.de
 W: http://www.inf.fu-berlin.de/~ehaase
 D: Driver for the Commodore A2232 serial board
 
+N: Thomas Habets
+E: thomas@habets.pp.se
+W: http://www.habets.pp.se/
+D: Reader of code, slayer of wrongful documentation
+P: 1024D/AD48E854 A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854
+
 N: Bruno Haible
 E: haible@ma2s2.mathematik.uni-karlsruhe.de
 D: SysV FS, shm swapping, memory management fixes
diff -uprN linux-2.6.12.4.orig/Documentation/filesystems/proc.txt linux-2.6.12.4/Documentation/filesystems/proc.txt
--- linux-2.6.12.4.orig/Documentation/filesystems/proc.txt      2005-08-05 09:04:37.000000000 +0200
+++ linux-2.6.12.4/Documentation/filesystems/proc.txt   2005-08-09 11:16:13.000000000 +0200
@@ -1240,16 +1240,7 @@ swap-intensive.
 overcommit_memory
 -----------------
 
-This file  contains  one  value.  The following algorithm is used to decide if
-there's enough  memory:  if  the  value of overcommit_memory is positive, then
-there's always  enough  memory. This is a useful feature, since programs often
-malloc() huge  amounts  of  memory 'just in case', while they only use a small
-part of  it.  Leaving  this value at 0 will lead to the failure of such a huge
-malloc(), when in fact the system has enough memory for the program to run.
-
-On the  other  hand,  enabling this feature can cause you to run out of memory
-and thrash the system to death, so large and/or important servers will want to
-set this value to 0.
+See Documentation/sysctl/vm.txt.
 
 nr_hugepages and hugetlb_shm_group
 ----------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-09  9:33 ` [PATCH] Kernels Out Of Memoy(OOM) killer Problem ? Thomas Habets
  2005-08-09 13:44   ` Alan Cox
@ 2005-08-10  8:13   ` Denis Vlasenko
  2005-08-10  8:31     ` Thomas Habets
  1 sibling, 1 reply; 7+ messages in thread
From: Denis Vlasenko @ 2005-08-10  8:13 UTC (permalink / raw)
  To: Thomas Habets, Xavier Roche; +Cc: linux-kernel, vinays

On Tuesday 09 August 2005 12:33, Thomas Habets wrote:
> ---------
> typedef struct me_s {
>   char name[]      = { "Thomas Habets" };
>   char email[]     = { "thomas@habets.pp.se" };
>   char kernel[]    = { "Linux" };
>   char *pgpKey[]   = { "http://www.habets.pp.se/pubkey.txt" };
>   char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854" };
>   char coolcmd[]   = { "echo '. ./_&. ./_'>_;. ./_" };
> } me_t;

Your sig is very very buggy (if interpreted as C code).
--
vda 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Kernels Out Of Memoy(OOM) killer Problem ?
  2005-08-10  8:13   ` Denis Vlasenko
@ 2005-08-10  8:31     ` Thomas Habets
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Habets @ 2005-08-10  8:31 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

Once upon a midnight dreary, Denis Vlasenko pondered, weak and weary:
> Your sig is very very buggy (if interpreted as C code).

*You're* buggy! [1]

The command in the sig fixes the code.

---------
typedef struct me_s {
  char name[]      = { "Thomas Habets" };
  char email[]     = { "thomas@habets.pp.se" };
  char kernel[]    = { "Linux" };
  char *pgpKey[]   = { "http://www.habets.pp.se/pubkey.txt" };
  char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE  0945 286A E90A AD48 E854" };
  char coolcmd[]   = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;

[1]    :-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-10  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <42F8720D.4060300@picsearch.com>
2005-08-09  9:33 ` [PATCH] Kernels Out Of Memoy(OOM) killer Problem ? Thomas Habets
2005-08-09 13:44   ` Alan Cox
2005-08-09 14:55     ` Thomas Habets
2005-08-09 16:39       ` Alan Cox
2005-08-09 17:14         ` Thomas Habets
2005-08-10  8:13   ` Denis Vlasenko
2005-08-10  8:31     ` Thomas Habets

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome