tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Insufficient eager swap - crashes program?
@ 1998-11-19 21:11 Judith Reed
  0 siblings, 0 replies; only message in thread
From: Judith Reed @ 1998-11-19 21:11 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks to all who responded with info - 
alan@nabeth.cxo.dec.com
speno@isc.upenn.edu
gwb@liver.csc.umd.edu
sean@stat.Duke.EDU
shurtlef@latrade.com

Alan came thru first with the info below that insufficient swap would 
cause a malloc to fail, and presumeably if the program can't handle that
failure it could then crash.

Others talked about kernel params. I'm framing a follow-up question on
kernel params - seems to be a black art as to how to set them! 

Informative pieces of responses follow. Thanks again!
-- 
Judith Reed
jreed@appliedtheory.com
==========================================================================
	Insufficient page/swap space is one of the reasons
	that malloc (and company) will return NULL and set
	the errno value to ENOMEM.  Running into the process
	data size limit will also do it.  Think 1 GB happens
	to be the default system maximum for the data size
	limit (128 MB being the process default limit).  There
	may be other system virtual memory parameters that
	will limit the size.
==========================================================================
Eager swap must preallocate (on disk) all of the virtual space that it needs
for every syscall (printf, etc). 
	:
From the man page on swapon:

  There are two strategies for swap space allocation: immediate mode and
  deferred or over-commitment mode.  The two strategies differ in the point
  in time at which swap space is allocated.  If immediate mode is used, swap
  space is allocated when modifiable virtual address space is created.  If
  deferred mode is used, swap space is not allocated until the system needs
  to write a modified virtual page to swap space.  Immediate mode is the
  default swap space allocation strategy.
==========================================================================
[my query]
> We have a server that is a dedicated search engine. Of late, the primary
> process on it has taken to dying when its virtual size reaches 1024MB, which
> is the size of physical memory. It makes a core file, and I've been told the
> error in the core file says it is dying on a:
>
> "check for null return from  malloc - essentially the system saying it won't
>                 give the process any more memory"
>
> according to the lead programmer. The odd thing about this system is
> that it has 767MB of swap, with that 1GB memory (don't ask me why, unknown).
>
> It is running eager swap, and the system is DU40d on a 4100.
>
> Does it seem likely that malloc would fail once the process's virtual size
> reaches memory size, given that there is insufficient swap to swap the whole
> process out, were that necessary?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-11-19 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-19 21:11 SUMMARY: Insufficient eager swap - crashes program? Judith Reed

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