From: Marius Hancu (hancu@crim.ca)
Date: 09/19/93


From: hancu@crim.ca (Marius Hancu)
Subject: Re: "Memory exhausted" problem in X solved
Date: Sun, 19 Sep 1993 13:26:07 GMT

gonyo@oswald.cs.odu.edu (John "Mr_Muppet" Gonyo) writes:

>I just recently installed Linux and am enjoying it's use very
>much!
>However, I'm having a hell of a time with getting X to run like
>I want it to.

>And for the swapping problem:
>I've got a 486-66 w/ 16mb RAM and a 5mb SWAP partition. I had a background
>script logging the /proc/meminfo every 5 seconds while I ran X and
>loaded it up with those goofy games and whatnot. Eventually, no more windows
>could be opened, and upon returning to the shell, I noticed that
>ram used was near 16mb, while swap used was 0!! It says that there is
>5megs of swap, 0 used, 5megs free! Why doesn't it use the swap device?
>(Yes, it's mounted from fstab)

Hi:

I had myself problems with opening more than 2 X windows and 1 emacs
window on a 99pl12 linux (SLS 1.03), while having 8M RAM and having
declared at partitioning time:

mkswap -c /dev/hda2 16500 #16M of swap device
swapon /dev/hda2

The problem was only solved after I read an article by Kristian Ejvind
on this same moribond comp.os.linux (I did not find anything relevant
on the new comp.os.linux.help!!).

Following his advice on a related query, I inserted the following
lines in my /etc/rc file:

mkswap -c /dev/hda2 16500
swapon -a

and

/dev/hda2 none swap defauts in the /etc/fstab file.

Now I can open more emacs and X windows and I am not getting the
complaint heard before:

"Memory exhausted" at the first command in emacs, like M-x rmail.

Would someone comment on why I had to insert these lines in those
files? I would have expected to get by just by the commands at
partitioning time. Don't they have a lasting effect?

If they don't, this should be mentioned in the FAQs (I had all of them
in front of me, including the very good Linux Installation by Matt
Welsh). By the way fellows, it seems that any fear that not enough
pty's are generated, that I had, seems to be unfounded. In another
post, someone else mentioned that (naturally!) linux automatically
generates as many pty's as it needs. This as I tried in vain to use
mknod to generate more pty's for my xterms and emacses.

Thanks to Kristian.

Marius

-- 
Marius Hancu, Parallel Architectures Group 
Centre de Recherche Informatique de Montreal (CRIM)
1801, avenue McGill College, Bureau 800, Montreal, Quebec H3A 2N4, Canada 
phone: (514) 398-5561, fax: 514-398-1244, email: hancu@crim.ca