RAM space vs swap space

Shawn T. Rutledge rutledge@cx47646-a.phnx1.az.home.com
Wed, 1 Mar 2000 23:18:32 -0700


On Wed, Mar 01, 2000 at 10:27:50PM -0700, Rick Rosinski wrote:
> Here is a report of my  memory useage
> 
> Total =127768.
> Used = 124772.
> Free = 2996.
> Shared = 59380.
> Buffers = 7572.
> Cache = 48760.
> -/+ Buffers/Cache: used 68440   Free 59328.
> Swap Total = 136544.
> Swap Used = 2248.
> Swap Free = 134296.

Linux swaps code that is not in use, so that it can use as much memory 
as possible for the cache, buffers etc.  That makes disk access quicker
(the more cache, the greater the chance what you want off the disk will
already be in memory).  But when you run apps, the cache will also shrink
as necessary to make room for them.  This is a good thing - the performance
degrades gracefully without sacrificing maximum performance when you have
a lot of memory free.  So there is nothing to worry about.  Using 2 megs 
out of 134 megs of swap is pretty darn good actually.  Fire up gimp, load 
a big image and then see how much cache you've got left.  I bet you'll 
see the cache got smaller to make room for what the application demanded.
(And the swap may also grow, as more stuff you aren't using right that
minute also gets swapped out.)

Shared memory is also a good thing; it means how much of the memory is 
taken up by shared libraries.  Shared libraries can be used by multiple
applications at once.  Much more memory would be taken up if all your
apps were statically linked; for instance (since you run KDE) the parts
of QT that each app uses would be separately loaded.  Shared libraries
mean all the QT apps are sharing one copy of the entire QT library.

-- 
  _______                                     http://www.bigfoot.com/~ecloud
 (_  | |_)  ecloud@bigfoot.com   finger rutledge@cx47646-a.phnx1.az.home.com
 __) | | \__________________________________________________________________
   Join the ProcessTree Network: For-pay Internet distributed processing.
                http://www.ProcessTree.com/?sponsor=5903