Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Memory usage and Swap space
@ 1993-06-09 21:44 Louis Moresi (ignotum per ignotius)
  1993-06-09 23:16 ` Eric D Osborne
  0 siblings, 1 reply; 2+ messages in thread
From: Louis Moresi (ignotum per ignotius) @ 1993-06-09 21:44 UTC (permalink / raw)



A question relating to our alpha 3000/400:

Can anyone explain to me why every single job from the
simplest shell upwards requires a huge 10Mbytes for its
VSZ. The X server uses a whopping great 50Mbytes (30+ 
real) and I'm pretty much out of swap space before I 
even start. Is there a cure other than purchasing a
couple of Gbytes for swap ?

Louis


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

* Re: Memory usage and Swap space
  1993-06-09 21:44 Memory usage and Swap space Louis Moresi (ignotum per ignotius)
@ 1993-06-09 23:16 ` Eric D Osborne
  0 siblings, 0 replies; 2+ messages in thread
From: Eric D Osborne @ 1993-06-09 23:16 UTC (permalink / raw)


The virtual process sizes on DEC OSF/1 reflect the sizes of the shared
libraries that are linked into the executables.  The virtual sizes don't
have any direct bearing on the actual memory or swap consumption, though,
since the bulk of the pages in use are shared.  Static initialized data in
shared libraries DOES count against the RSS (a much more accurate view of
the actual memory consumption of a given process), but only IF the machine is
in "eager" swap mode.

Eager swap is the classical BSD behaviour.  It essentially requires vm objects
to be backed up with page space on allocation, whether or not the object will
ever be used.  This is inefficient in some regards.  Consider, for example, a
case in which you put 1GB of ram into a machine in order to insure that you
NEVER page.  With eager swap, you have to allocate a huge (but almost
certainly unused) swap space.

DEC OSF/1 also allows the use of "lazy" swap evaluation.  This is done by 
removing /sbin/swapdefault (a symlink to the primary swap device) and
rebooting.  In this mode, page space is allocated on actual demand as opposed
to when the virtual object is created.  This means that for situations like
the above, the virtual memory becomes effectively the size of ram plus the
page space - a much more effective utilization of resources.  The down side to
lazy evaluation is that you can over-commit page space.  In that scenario
(like the machine I'm on - a 3000/500 with 256MB of memory, but 127 MB of
swap) I can allocate memory until I run out, then things start to page. 
The thing is, I can have more things allocated than I have page space
for.  If that happens, some processes will likely die an unpleasant death. 

Both methods have their points, both good and bad.  Eager swap generates more
deterministic behavior, but is somewhat less resource efficient.  I'd tend to
recommend it for, say, a database server in a commercial application.  Lazy
swap is great for code development, or for stuff doing sparse arrays, and
other applications where large VM objects get allocated but only smally pieces
actually get touched.  The nice thing is that DEC OSF/1 does both - I think it
is the only UNIX implementation from a major vendor that does that ;-)

Your mileage will vary, and the method that is best depends on your
application.  It is very easy to change, though, by deleting or restoring 
the symlink and rebooting.

Eric Osborne
edo@hill.enet.dec.com

*************************** std_disclaimer.h *******************************
The opinions expressed above are those of Eric D. Osborne, and do not
necessarily represent those of Digital Equipment Corporation.  The opinions
expressed are offered without any warranty as to fitness for a particular
purpose, either express or implied.  In other words, don't take my word for
anything I said above, I may only think I know what I was talking about.
****************************************************************************




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

end of thread, other threads:[~1993-06-09 23:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-06-09 21:44 Memory usage and Swap space Louis Moresi (ignotum per ignotius)
1993-06-09 23:16 ` Eric D Osborne

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