[comp.sys.sun] "Not enough memory" on Sun 386i/250 under SunOS 4.0.1

shenkin@cunixc.cc.columbia.edu (Peter S. Shenkin) (03/07/89)

I have a Sun 386i/250 (8Mb main memory, 327 Mb hard disk).  Since
upgrading to SunOS 4.0.1, I can't get large programs ("size" > ~6 Mbytes)
to load; the message is "Not enough memory."  This is a standalone
workstation, and the only things running, aside from miscellaneous
daemons, are a shelltool and sunview.  I did not have the problem under
SunOS 4.0.

These are fortran programs, and to check things out I tried the following,
to no avail:

	1.  Re-compiled and linked the program
	2.  Re-booted the machine (it knows about all 8 Mbytes)
	3.  Doubled the size of the swap-space, from 16.3 to 32.6 Mbytes,
	    and made sure this took place using format> partition> print.
	    (See FLAME below on repartitioning operation... grrr!)
	4.  Made sure there are no quotas on the system
	5.  Wrote a series of fortran programs containing the line
		INTEGER I( x )
	    When x gets large enough so that the "size" of the program
	    exceeds about 6 Mbytes, the "Not enough memory" message
	    appears when an attempt is made to execute it.
	6.  Asked several UNIX gurus.  They're stumped too.

If you have any insight into what might be causing this, or what I should
try next, please send me email, or reply to this newsgroup, though that
takes longer, and I will in any case post a followup telling what worked.

Thanks,
	Peter S. Shenkin:    shenkin@cunixc.cc.columbia.edu
	Department of Chemistry, Barnard College.

FLAME:  (Re: repartitioning the system disk)

Unless I'm missing something, the instructions in Sun386i Advanced
Administration, Section 7.2-3, are simply wrong.  These indicate that
after increasing /dev/rootb (swap area) at the expense of /dev/rooth
(/files), the system should boot uneventfully from tape.  In fact, the
boot fails in ypserv, with some message to the effect that yp can't find
something.  (Sorry, I neglected to write the message down.)

Turns out that the system needs files somewhere deep within /files/cluster
to boot.  The workaround was to mount and restore /files in single user
mode.  Multi-user then comes up uneventfully.

pat@decwrl.dec.com (Pat Lashley) (03/16/89)

In article <8902231707.AA12812@columbia.edu> shenkin@cunixc.cc.columbia.edu (Peter S. Shenkin) writes:
>	3.  Doubled the size of the swap-space, from 16.3 to 32.6 Mbytes,
>	    and made sure this took place using format> partition> print.
>	    (See FLAME below on repartitioning operation... grrr!)

Um, you really didn't have to do this.  I tend to run -LOTS- of windows.
Some of them have big applications in them (i.e. GNU emacs with ispell,
compile, etc.).  When I realized that I was short on swap space, here is
what I did (as root) (my system name is `serendip'):

	cd /files/swap
	mkfile 16m serendip
	swapon /files/swap/serendip

The final line may be placed in your rc.local so that you don't have to do
it again.  Make sure that you don't use the `-n' flag to mkfile.

If client swap files can be normal NFS mounted files, why can't you use
one locally (at least as an expansion device).

-Pat

--- Reply to address below - DO NOT auto-route or trust address in header --- 
PMLashley	sun!cohesive!kla!pat		cohesive!kla!pat@sun.com
KLA Instruments	POBox 58016, 3901 Burton Drive
		Santa Clara, CA 95052		+1 408 988 6100

shenkin@cunixc.cc.columbia.edu (Peter S. Shenkin) (03/30/89)

> I have a Sun 386i/250 (8Mb main memory, 327 Mb hard disk).  Since upgrading 
> to SunOS 4.0.1, I can't get large programs ("size" > ~6 Mbytes) to load;  
> the message is "Not enough memory."  ...
> ...  I did not have the problem under SunOS 4.0.

I have resolved this problem, as follows.  Apparently, under SunOS 4.0.1,
Roadrunners are shipped with a 4096 kbyte limit on datasize hard-wired
into /bin/csh.  The statement "unlimit datasize" in .cshrc fixes things.
This limit did not exist in the version of /bin/csh shipped with 4.0, as I
verified by restoring it and checking.  Nor could I find any notice of it
in the Sun literature.  Then again, I had a beta version of 4.0, so I
don't know for sure what was shipped with the final release.

> FLAME:  (Re: repartitioning the system disk)
> Unless I'm missing something, the instructions in Sun386i Advanced 
> Administration, Section 7.2-3, are simply wrong.  These indicate that after 
> increasing /dev/rootb (swap area) at the expense of /dev/rooth (/files), 
> the system should boot uneventfully from tape.  In fact, the boot fails....

Alan Evans (evans@cunixc.cc.columbia.edu) replied:

  Your boot problem was the following:

  Your machine as a standalone wants to be a YP server and client and
  when it tries to start ypserv in rc.local, it can't because the YP
  database is in /var/yp which, since /export/var/localhost is mounted on
  /var, which doesn't exist until the /dev/sd2h partition is restored. For
  that matter, /tmp is in /dev/sd2h as well in your configuration. Nothing
  in the clusters is actually needed to boot, even on a networked machine.

(Incidentally, this verifies that the instructions are, in fact, wrong,
since the machine they refer to is configured the same way.  My initial
analysis of the problem -- the idea that something in .../clusters was
needed -- was also wrong!)

Peter S. Shenkin:    shenkin@cunixc.cc.columbia.edu
Department of Chemistry, Barnard College.