lkml.org 
[lkml]   [1997]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: fork: out of memory
From
Date
David Whysong <dwhysong@physics.ucsb.edu> writes:

> On Sun, 23 Nov 1997, David E. Fox wrote:
>
> > With 2.1.65 I've noticed a couple 'fork: out of memory'
> > messages that I think are spurious. At least there was
> > plenty of free memory left at the times I got these
> > messages. The last time I got it it came from cron's
> > run-parts script (I am on a Red Hat 4.2 system) and
> > it was mailed to root.
> >
> > I also got an awk help display on the screen.
> >
> > Anyone else seen this?
>
> All the time. I think the memory management needs some work...
>
> Here is an interesting example... I'm running on a dual P-133 with 32 megs
> RAM and 117 megs swap, if you have more RAM you might have to do things
> differently. Download a bunch of large .jpg files (I use stuff from
> www.stsci.edu, you can get some nice HST images from the directory
> /pubinfo/Pictures.html). Load 'em all at once:
>
> $ for x in *
> > do xli $x &
> > done
>
> Things grind along for a while, and then everything just stops. The mouse
> will move, but I can't bring windows into focus or do anything. Then
> switch to a text console, login, and try to do something. In some
> situations, I can't even login -- I get a "fork: out of memory" error when
> it tries to bring up the shell. Sometimes I can log in.
>
> If you then free up some RAM by doing a "dd if=/dev/hda of=/dev/null
> bs=15000k count=1" and switch back to X, the images will finish loading.
>
> I did try "echo '128 256 512' > /proc/sys/vm/freepages" and it may have
> helped a little, but the problem did not go away. Kernel 2.1.65, pretty
> normal config.
>
> Dave
>

Apply this patch as a workaround:

diff -urbBN --exclude-from=exclude linux/mm/slab.c /usr/src/linux/mm/slab.c
--- linux/mm/slab.c Thu Aug 14 05:03:22 1997
+++ /usr/src/linux/mm/slab.c Fri Nov 14 07:44:44 1997
@@ -308,12 +308,12 @@
#define SLAB_MAX_GFP_ORDER 5 /* 32 pages */

/* the 'prefered' minimum num of objs per slab - maybe less for large objs */
-#define SLAB_MIN_OBJS_PER_SLAB 4
+#define SLAB_MIN_OBJS_PER_SLAB 1

/* If the num of objs per slab is <= SLAB_MIN_OBJS_PER_SLAB,
* then the page order must be less than this before trying the next order.
*/
-#define SLAB_BREAK_GFP_ORDER 2
+#define SLAB_BREAK_GFP_ORDER 1

/* Macros for storing/retrieving the cachep and or slab from the
* global 'mem_map'. With off-slab bufctls, these are used to find the
--
Posted by Zlatko Calusic E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
I don't need a disclaimer. I OWN the company.
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.109 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site