Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Low swap space on DEC 3000 Alpha
@ 1995-03-28 14:51 Peter Schmatz
  1995-03-29  5:00 ` Brian Saunders
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Schmatz @ 1995-03-28 14:51 UTC (permalink / raw)


Help needed with our DEC 3000 Alphas:

The systems running periodly out of swap space esp. after compiling
with cc , the swap space seems to be allocated and not released:

after booting swapon -s says:

Total swap allocation:
    Allocated space:        16384 pages (128MB)
    Reserved space:          7217 pages ( 44%)
    Available space:         9167 pages ( 55%)

Swap partition /dev/rz3b:
    Allocated space:        16384 pages (128MB)
    In-use space:            5245 pages ( 32%)
    Free space:             11139 pages ( 67%)

after compiling (or 2-3 days uptime):

Total swap allocation:
    Allocated space:        16384 pages (128MB)
    Reserved space:         12935 pages ( 78%)
    Available space:         3449 pages ( 21%)

Swap partition /dev/rz3b:
    Allocated space:        16384 pages (128MB)
    In-use space:           11121 pages ( 67%)
    Free space:              5263 pages ( 32%)

and I found no large or misbehaving process, only a rebooting helps

BTW uname -a says : OSF1 fafix V2.1 250 alpha

Any help welcome

Peter

---
----------
Fraunhofer-Institute for Industrial Engineering Germany
Fraunhofer-Institut fuer Arbeitswirtschaft und Organisation

Peter Schmatz         -----       Peter.Schmatz@iao.fhg.de 
                                  Peter.Schmatz@sfb374.uni-stuttgart.de
PZS/743                           Tel ++49 711 970 2178
                                 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-03-28 14:51 Low swap space on DEC 3000 Alpha Peter Schmatz
@ 1995-03-29  5:00 ` Brian Saunders
  1995-03-30  5:00   ` Dan Pop
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brian Saunders @ 1995-03-29  5:00 UTC (permalink / raw)


In article <3l97pi$4ms@news.belwue.de>, schmatz@mix.caed.iao.fhg.de wrote:

[classic swap space problem deleted]

How much physical memory do you have?  32 MB?  64 MB?  Either way, I'd be
willing to bet you are in eager swap mode, and not lazy swap mode.  Try
removing the /sbin/swapdefault file, rebooting, and then monitor your swap
space periodically.  If it stays low, you are fine.

Eager swap reserves swap space at process startup; lazy only uses the swap
space as needed.  Lazy has the nasty effect of indiscriminately canceling
jobs when it can't find enough swap space, but this rarely happens on most
systems (we've never seen it happen with 2x physical memory, but we don't
run large jobs often either).

I wonder why lazy swap can't simply cancel the offending process, but I'm
sure I'm missing something here.

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-03-29  5:00 ` Brian Saunders
@ 1995-03-30  5:00   ` Dan Pop
  1995-04-01  5:00   ` cherkus
  1995-04-02  5:00   ` Daniel S. Riley
  2 siblings, 0 replies; 7+ messages in thread
From: Dan Pop @ 1995-03-30  5:00 UTC (permalink / raw)


In <saunders-2903952328570001@caspar.che.wisc.edu> saunders@castor.che.wisc.edu (Brian Saunders) writes:

>In article <3l97pi$4ms@news.belwue.de>, schmatz@mix.caed.iao.fhg.de wrote:
>
>[classic swap space problem deleted]
>
>How much physical memory do you have?  32 MB?  64 MB?  Either way, I'd be
>willing to bet you are in eager swap mode, and not lazy swap mode.  Try
>removing the /sbin/swapdefault file, rebooting, and then monitor your swap
>space periodically.  If it stays low, you are fine.

One additional hint:  dxconsole on my OSF/1 2.1 box looks like it has a
huge memory leak (aggravated by the fact that I receive a huge number
of bogus messages).  Monitor its size and if it keeps increasing, use
xconsole instead.
>
>I wonder why lazy swap can't simply cancel the offending process, but I'm
>sure I'm missing something here.

You're missing Linux, which does exactly what you expect: the offending
process receives a KILL signal.

Dan
--
Dan Pop
CERN, CN Division
Email: danpop@cernapo.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-03-29  5:00 ` Brian Saunders
  1995-03-30  5:00   ` Dan Pop
@ 1995-04-01  5:00   ` cherkus
  1995-04-01  5:00     ` Brian Saunders
  1995-04-02  5:00   ` Daniel S. Riley
  2 siblings, 1 reply; 7+ messages in thread
From: cherkus @ 1995-04-01  5:00 UTC (permalink / raw)


Brian Saunders wrote in article <saunders-2903952328570001@caspar.che.wisc.edu>:
>I wonder why lazy swap can't simply cancel the offending process, but I'm
>sure I'm missing something here.

Define 'offending process'.  One scenario is that someone runs a
computation for days.  This computation is not memory intensive.  When
it completes, it wants to get memory to display its results.  In your
scenario, this offending process will get killed and its results will
be lost, even though it has been a good citizen for days.

Another scenario involves the Xserver.  It's been running fine then a
user decides to read a document that needs a different font.  The OS
decides the Xserver is an 'offending process' and kills it, which kills
all opened windows on the system, and all kinds of work is lost.

Other systems have solved this in a number of ways, but it rapidly
becomes very similar to the entire system running in eager mode
because every memory hog does whatever it takes to become protected.
If this is enough of a problem, it would seem that you should easily
be able to afford enough disk space to protect the contents of
main memory.  A 1GB disk is a lot cheaper than 1GB of main memory.

--
Dave Cherkus ----- UniMaster, Inc. ----- Contract Software Development
Specialties: UNIX TCP/IP X OSF/1 AlphaAXP AIX RS/6000 Performance ISDN 
Email: cherkus@UniMaster.COM  Tel: (603) 888-8308  Fax: (603) 888-8308
if (cpu.type == PENTIUM && cpu.step < 8)   { panic("Intel Inside!"); }




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-04-01  5:00   ` cherkus
@ 1995-04-01  5:00     ` Brian Saunders
  1995-04-01  5:00       ` Preston F. Crow
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Saunders @ 1995-04-01  5:00 UTC (permalink / raw)


In article <D6DBMu.3GK@mv.mv.com>, cherkus@fastball.unimaster.com wrote:

> Define 'offending process'.  One scenario is that someone runs a
> computation for days.  This computation is not memory intensive.  When
> it completes, it wants to get memory to display its results.  In your
> scenario, this offending process will get killed and its results will
> be lost, even though it has been a good citizen for days.

In most cases this is not necessary.  If people do a decent job of
checkpointing their work, and they should for a longer-running job, you
should only lose a few hours for a critical job.  I have litte sympathy
for people who lose 2-day jobs that could be restarted with less than a
megabyte of information.  I do see your point, but the fact is that 99.9%
of the time, a job which blows away the swap space is doing so because of
programmer error.  You simply will not see too many situations where the
"wafer-thin mint" syndrome occurs.

> Another scenario involves the Xserver.  It's been running fine then a
> user decides to read a document that needs a different font.  The OS
> decides the Xserver is an 'offending process' and kills it, which kills
> all opened windows on the system, and all kinds of work is lost.

OK, but what if we designate a few jobs as "unkillable"?

> Other systems have solved this in a number of ways, but it rapidly
> becomes very similar to the entire system running in eager mode
> because every memory hog does whatever it takes to become protected.
> If this is enough of a problem, it would seem that you should easily
> be able to afford enough disk space to protect the contents of
> main memory.  A 1GB disk is a lot cheaper than 1GB of main memory.

You could also adjust the variables in the kernel so that one can not run
a job that is larger than a particular percentage of your swap space.

You answered my question, more or less, but you haven't explained to me
how OSF/1 chooses which jobs to kill when there is a swap error.  It would
seem a random scheme (which is what is hinted) would be as dangerous, if
not more, than killing the offending process.  So, there must be some
procedure, so why isn't it discussed in at least one of the manuals, like
Performance Tuning?

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-04-01  5:00     ` Brian Saunders
@ 1995-04-01  5:00       ` Preston F. Crow
  0 siblings, 0 replies; 7+ messages in thread
From: Preston F. Crow @ 1995-04-01  5:00 UTC (permalink / raw)


saunders@castor.che.wisc.edu (Brian Saunders) writes:
>cherkus@fastball.unimaster.com wrote:

>> Another scenario involves the Xserver.  It's been running fine then a
>> user decides to read a document that needs a different font.  The OS
>> decides the Xserver is an 'offending process' and kills it, which kills
>> all opened windows on the system, and all kinds of work is lost.

>OK, but what if we designate a few jobs as "unkillable"?

>You answered my question, more or less, but you haven't explained to me
>how OSF/1 chooses which jobs to kill when there is a swap error.  It would
>seem a random scheme (which is what is hinted) would be as dangerous, if
>not more, than killing the offending process.  So, there must be some
>procedure, so why isn't it discussed in at least one of the manuals, like
>Performance Tuning?

If the offending process happens to be something providing an
operating service (e.g., one of many deamons), then it probably
shouldn't be killed.  In this case, randomly selecting user processes
is probably a better idea.  It might also be a good idea to always
kill child processes before the parent process.  It might be a good
idea to avoid killing any process that is running as root.  It might
be a good idea to avoid killing the X server.  It might be a good idea
to kill the X server first (after all, X is infamous for eating up memory,
and killing the server and other interactive jobs will free up memory
for those multi-day jobs).

But the question remains, what did DEC/OSF think was a good idea?

--PC
--
Windows:  I'm not a real operating system, but I play one on a PC.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Low swap space on DEC 3000 Alpha
  1995-03-29  5:00 ` Brian Saunders
  1995-03-30  5:00   ` Dan Pop
  1995-04-01  5:00   ` cherkus
@ 1995-04-02  5:00   ` Daniel S. Riley
  2 siblings, 0 replies; 7+ messages in thread
From: Daniel S. Riley @ 1995-04-02  5:00 UTC (permalink / raw)



In article <saunders-0104951630320001@caspar.che.wisc.edu>,
saunders@castor.che.wisc.edu (Brian Saunders) writes:
saunders> You answered my question, more or less, but you haven't
saunders> explained to me how OSF/1 chooses which jobs to kill when
saunders> there is a swap error.  It would seem a random scheme (which
saunders> is what is hinted) would be as dangerous, if not more, than
saunders> killing the offending process.

I would expect that what is killed *is* the "offending process", but
the notion of what is the offending process differs between eager and
lazy mode.

In "eager" mode, the offending process will always be one that is
requesting additional virtual memory, since all current allocations
have backing store pre-allocated.

In "lazy" mode, I would guess that it would be the next process to
fault on an unallocated page while the system is out of VM.  The fault
could be on a page in an address space that was allocated long ago or
on a copy-on-write page, so while this selection is not random as far
as the OS is concerned, it might as well be for all the user (or
system administrator) can tell.

It could also conceivably be the process that owns the next page the
OS tries page out while out of VM, but that seems like a poorer and
less likely choice to me--but I suppose it all depends on when the OS
realizes it is completely out of VM and what the recovery path is at
that point.

You might think this should be fixable by having the OS kill any
process requesting address space after the total free drops below some
threshold, but the existence of sparsely populated address spaces and
COW pages complicates things--it isn't obvious to me that there is a
100% solution that isn't identical to "eager" mode.

-- 
Dan Riley                          Internet:  dsr@lns598.lns.cornell.edu
Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)
	      "Distance means nothing/To me." -Kate Bush



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1995-04-02  5:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-28 14:51 Low swap space on DEC 3000 Alpha Peter Schmatz
1995-03-29  5:00 ` Brian Saunders
1995-03-30  5:00   ` Dan Pop
1995-04-01  5:00   ` cherkus
1995-04-01  5:00     ` Brian Saunders
1995-04-01  5:00       ` Preston F. Crow
1995-04-02  5:00   ` Daniel S. Riley

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