Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: dbk@pslu1.psl.wisc.edu (Don Katz)
Subject: Re: Swap space full problems
Date: Mon, 14 Feb 94 19:41:04 GMT	[thread overview]
Message-ID: <1994Feb14.194104.12484@pslu1.psl.wisc.edu> (raw)

Summary of responses:

I (dbk@pslu1.psl.wisc.edu) wrote:
: A new alpha osf/1 machine I am supporting has 64 Mb of RAM and 134 Mb
: of swap. It is running OSF/1 V1.3 REV. 111, and has been up 32 days.

: It consistently reports "swap space below 10 percent free". The
: primary user runs Matlab, often several processes at a time, each of
: which takes 15-20 Mb of virtual memory. But the processes which are
: taking the most virtual memory (as reported by ps) are /usr/lib/X11/X
: (64M) and the kernel.  

: % ps -eO vsize | grep M | sort -bnr +1
: swap space below 10 percent free
:     0  222M R <  ??  29583:20.14 [kernel idle]
:   237 63.9M S    ??   27:39.44 /usr/bin/X11/X -auth /usr/lib/X11/xdm/A:0-0002
33
: 10219 17.0M R    p1  1960:20.95 /usr/misc/matlab/bin/alpha/matlab
: 10254 12.2M S    p2    0:01.83 /usr/misc/matlab/bin/alpha/matlab
:  9848 10.6M I  + p3    0:03.56 /usr/misc/matlab/bin/alpha/matlab
:  9009 9.47M S    ??    6:33.47 /usr/bin/X11/dxterm -ls
:  8959 9.47M I    ??    1:25.27 /usr/bin/X11/dxterm -ls
:  8889 8.16M I    ??    1:09.05 /usr/bin/X11/mwm
:  8871 7.98M I    ??    0:00.31 -:0 (xdm)
:   233 7.63M I    ??    0:00.46 /usr/bin/X11/xdm -config /usr/lib/X11/xdm/xdm-
co

*****First, two different ways of terminating the X process with each logout**


From:    joerg@itap.physik.uni-stuttgart.de (Joerg Stadler)

I'd the same trouble with our machine, there is probably a memory leak
in the X-server. Just change 

/usr/lib/X11/xdm/Xservers

so that the line starting up /usr/bin/X11/X reads

:0 local /usr/bin/X11/X  -terminate

The -termiate option will restart the X-server for every session, so
it stops eating more and more memory.

From:    Dr Marco Luchini <m.luchini@ic.ac.uk>

you might want to add the line:

DisplayManager._0.terminateServer:      true

to your xdm-config to ensure the server gets killed at session exit and
the new session gets a new server.  Memory leaks shouldn't happen but
they do.  Also servers can get large if somebody views a lot of piccies.
You may also want to switch to 'lazy' swap if you run into this problem
a lot.  We do.

From:    das@mdavcr.mda.ca (Darcy Semeniuk)

Your kernel is about the right size, but your X server is way too large
(Mine is 10M right now).  You should add the following lines to your
xdm-config file:

DisplayManager._0.terminateServer:   true
DisplayManager.local_0.terminateServer:      true


This will cause your Xserver to terminate and restart every time you log
out - which stops the upward creaping memory usage.

***** The other option is to switch to lazy swap *****

From:    brown@reed.edu (C. Titus Brown)

>Your kernel is about the right size, but your X server is way too large
>(Mine is 10M right now).
[fix removed]

Yes, that will help.  The other thing to do (to get rid of the 10% full
message) is to put it into over-commitment mode.  Remove /sbin/swapdefault
(it's a link to somewhere) and reboot the machine.

This is documented somewhere in the system administrators manual.

From:    brown@mco.dec.com (Andy Brown)

(re: /sbin/swapdefault)
a) Its a link to your primary swap device 
b) Putting it into over-commit mode will not solve the problem; The "swap below
   10% free" message will disappear, but you will simply find that processes 
   start disappearing for no reason. 

    Better to cure the problem that to ignore it!:-)

From:    grant@glg.pa.dec.com (Gail L. Grant)

not what we have seen.  most apps ask for far more memory than they ever use.
for us, changing to lazy HAS solved the problem.  the only side effect that
we have found with this is that if a user has a runaway process, the system
hangs.  has happened two times in six months and on a demo machine where folk
are really banging on it, i think that pretty good.

i say it below, but this is MY experience/opinion, not official Digital policy.

From:    Dr Marco Luchini <m.luchini@ic.ac.uk>

The following is the "official" line wrt 'lazy' vs 'eager' swap.
As a postscript I should add that it is somwhat pessimistic.  I've been
running 3 alphas for a year like that in an active research environment
and had no probs.  Just make sure that you sit hard on people who start
a 50Mb job without checking that there is space.  Shaming them by
pointing out that they are screwing everybody else up usually works
wonders.  

Regarding Jim's comment on what process gets killed, my understanding,
borne out in practice, is that the process to ask for more swap gets
killed.  Generally this is the shell with which you've just logged in
because things were becoming slow and  were about to solve the problem.
I keep an old window always open on my server just in case.  Old shells
never get killed.

The way you turn on lazy swap is

# mv /sbin/swapdefault /sbin/swapdefault-
# reboot

To go back to eager:

# mv /sbin/swapdefault- /sbin/swapdefault
# reboot

See Chapter 7 of the system and admin guide.


Ciao,							Marco

In article <2gh6ah$gkq@quabbin.crl.dec.com>, jg@crl.dec.com (Jim Gettys) writes
:
|> Immediate swap space allocation means that the system allocates
|> swap space on disk at the time the process allocates more VM;
|> if there are any problems, that process gets notified,
|> and possibly terminated (by default).  This also means that the
|> total VM of all processes cannot exceed the available swap space.
|> 
|> "Lazy" or "deferred" allocation means that swap space is allocated
|> at the time the system actually needs to use more main memory for
|> some process (i.e. decides it has to page something out).  This
|> means that the total VM of all processes can equal the sum of
|> all available swap space + main memory.  This results in less disk
|> required to support the processes; you only need the amount of disk
|> space that is required to hold the VM being paged out.
|> 
|> The problem with "deferred" allocation is that at the time of allocation,
|> you don't know what process to penalize; the system must get memory
|> from somewhere (or would deadlock), so has to choose some process to
|> kill; and it isn't as smart as a person might be about what it chooses :-).
|> 
|> So lazy or deferred allocation is most suitable on single user systems
|> where you are the only person that would be affected; on a multiuser system
|> it is pretty unfriendly to have to terminate someone else's process for
|> reasons outside of their control.  And on production systems where you
|> want to guarantee that once a process starts, it will continue indefinately,
|> you'd better be using immediate allocation.  This is why we ship our OSF
|> with immediate allocation by default.
|> 				- Jim
|> 
|> -- 
|> Digital Equipment Corporation
|> Cambridge Research Laboratory


**** Finally, add more swap space if possible ****

From:    Brian Saunders <saunders@luther.che.wisc.edu>

Not that its very helpful, but if you have the disk space to spare, I'd add
some more swap space, if I were you.  We now have 324 MB for 64 MB RAM, and
have hardly any problems.  Yes, that is overkill, but I think maintaining
at least a 3:1 swap ratio is key on these machines.

-- 
-----------------------------------------------------------------------------
Don Katz, Ph.D                             .         Physical
                                       .- / \ -.       Sciences
University of Wisconsin - Madison   ./'  /+-+\  `\.       Laboratory   E-MAIL


             reply	other threads:[~1994-02-14 19:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-02-14 19:41 Don Katz [this message]
1994-02-15 16:13 ` Swap space full problems hooft
  -- strict thread matches above, loose matches on Subject: below --
1994-02-01 22:38 Don Katz
1994-02-02 17:26 ` Darcy Semeniuk
     [not found]   ` <2iq2od$l3f@scratchy.reed.edu>
1994-02-11 19:00     ` Andy Brown
1994-02-11 19:49       ` System Janitor
1994-02-12  0:41       ` Gail L. Grant
1994-02-16 23:04         ` Andrew Rutherford
1994-02-17 19:27           ` Harry Mantakos
1994-02-18  5:54             ` Wuxu Peng
1994-02-22 11:00               ` anthony baxter
1994-02-24  7:17             ` Andrew Rutherford
read-only archive

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