[1737] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Cleaning up memory space after something goes awry

daemon@ATHENA.MIT.EDU (Ariel Mazzarelli)
Wed Oct 30 01:00:59 1996

Date: Tue, 29 Oct 1996 19:48:16 -0800
From: Ariel Mazzarelli <mazzare@primenet.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Five minutes ago, I made an excessive request to ghostscript, and after making
my hard drive hum for a couple of minutes, the box coughed

[mazzare@va tempy]$ Error: Cannot perform malloc

and ghostscript left the premises. No biggie, it's not like I have to reboot
or anything, but I noticed that the swapping continued after that (though not
really slowing things down much). Here is what the free command says,

[mazzare@va /home]$ free
             total       used       free     shared    buffers
Mem:         31084      30572        512       4108       1744
-/+ buffers:            28828       2256
Swap:        32980      32944         36

which makes me wonder about this swap thing in general. I have noticed that
the "used" column for swap is 0 after a reboot, but after a while, it acquires
a residue, usually in the 2 meg range. Sometimes it will hover at something
well over 2 megs while I am in an X session, and when I return to the login
shell most of that is gone (except for the 2 meg residue).

These phenomena, coupled with my general ignorance, brings up a few questions:

Does one want to see that "used swap" column reach 0, or do we simply not care?
I remember reading an ancient LJ article, possibly written by a distinguished
member of this very list, that explained that it was actually the "free"
column that should not be very high, as "free" was close to "wasted". OTOH,
it sure seems like the system drags its feet when that "free swap" entry
gets low. We like big buffers, I suppose.

When something goes awry, is there something less drastic than a reboot that
one may do to get rid of residual effects (e.g. excessive swapping)?

What are some of the clever things that Linux does to handle memory resources
wisely--e.g., why does the same hardware that more or less flies under Linux
behave like a constipated pig under other more famous o$'s? That "shared"
column is part of the cleverness, as apps that use the same stuff get to
share it in memory space (to the extent that that is a safe thing to do).
What are some of the other clever things being done with RAM?

Ariel


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post