On Wed, 21 Feb 2001, Alex Tabony wrote:

> If I may jump in on this...
>
> At 02:07 AM 2/20/01 -0500, you wrote:
> >The question is: Do you end up using any swap or not?
> >
> >This gets discussed frequently... at least to the point about how Linux
> >reports low numbers of free memory... but what is reported and what is
> >actual are usually two different things. If you have 2GB of RAM and you
> >don't actually use any swap, then I wouldn't worry. Linux will clean up
> >the allocation tables as needed.
>
> The question comes up, what does one do when swap is starting to be used?
>
> I ask because I am having some odd memory usage problems here. After a
> fresh reboot I am seeing about 44MB of the 256 MB total as used. As times
> goes on, the cached and buffers grow. Now again I would not be worried but
> this is what free is reporting right now:
>
>               total       used       free     shared    buffers     cached
> Mem:        257660     253556       4104      33052      81252     149412
> -/+ buffers/cache:      22892     234768
> Swap:       530104       9612     520492
>
> I have been observing the memory usage for the last few weeks, and this
> happens consistently. Over the matter of days, buffers and cache grow to
> fill and exceed the available memory (excepting a tiny amount).
>
> This machine is working as a file/print share and as a mail server with pop
> access for about 20 clients. The process list shows nothing out of the
> ordinary. CPU usage is less than <5%.
>
I have seen the small swap usage on many machines.  The code swapped out
is usualy daemons that are sleeping waiting for a connection.  I think
what happens is that when you get to the limit of physical memory, Linux
will swap out the sleeping processes.  Then when memory usage goes down,
the swapped out codes stays swapped out untill it is called for.  that
way, if memory usage goes up again, the memory is still there.  This way
the system doesn't swap the same code in and out several times without
running it.

[mikkel@slave mikkel]$ free
             total      used      free    shared   buffers  cached
Mem:         63128     58428      4700     43904     25572   15204
-/+ buffers/cache:     17652     45476
Swap:        62088      3292     58796

[mikkel@firewall mikkel]$ free
             total      used      free    shared   buffers  cached
Mem:         30984     18280     12704     12760      3304    7364
-/+ buffers/cache:      7612     23372
Swap:        33380      2092     31288

[mikkel@gatekeeper mikkel]$ free
             total      used      free    shared   buffers  cached
Mem:         62120     61060      1060     25724     13372   35176
-/+ buffers/cache:     12512     49608
Swap:        32000       968     31032

[mikkel@master mikkel]$ free
             total      used      free    shared   buffers  cached
Mem:        128204    114828     13376     33376      9700   59092
-/+ buffers/cache:     46036     82168
Swap:        72256      3704     68552


Mikkel
--

    Do not meddle in the affairs of dragons,
 for you are crunchy and taste good with ketchup.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to