On Thu, 2003-06-05 at 19:55, Gordon Messmer wrote:
> Skip Morrow wrote:
> > I will post the output from free later.  I rebooted recently, so the
> > usage is not quite up there yet.  However, I think that your free output
> > is rather alarming too.  You should not have 500 megs used, unless you
> > are say, running a server with many, many concurrent connections.
> 
> You're not getting it yet...  Of my 500MB used, almost 100 MB was disk 
> buffers, and 250MB are cached files.  This memory is used by the kernel 
> to store recently used data from the disk because:
> 1) nothing else is using it
> 2) disk access is millions of times slower than RAM access.
> 
> Wasting that RAM by leaving nothing in it would only hurt your 
> computer's performance.  All modern operating systems make use of spare 
> RAM to cache files from disk.  This is perfectly normal.
> 
> > You
> > are allready using swap space too.
> 
> Sure, 16 MB.  It's not significant.  For the most part, it's probably 
> initilization code in kernel drivers, the init process, or long-running 
> daemons.  It's code that's used once and never used again.
> 
> Swap use, by itself, is not a problem either.  It's OK to swap out a 
> chunk of code that is never used.  Swap only becomes a problem when 
> active processes are swapped out, because those must later be swapped 
> back in.  The process of swapping active applications in and out of disk 
> is extrememly slow.
> 
> > Reboot your computer and see how
> > much memory is used right away.  As for the caches, I thought that those
> > were referring to the CPU caches.
> 
> They refer to disk caches.
> 
> > If the numbers refer to bytes (vice
> > kilobytes), mine totals to 640K.  If the are KB, then maybe you are on
> > to something.
> 
> So you're saying that you have 640MB of memory being used for cache... 
> Is there a reason you're worried about this?  Were there performance 
> problems after the system had been running for a day?  Were you seeing a 
> lot of disk activity due to swap?   It doesn't sound like it.  ;)
> 
> > Fwiw, the man page isn't very clear on it.
> 
>  From 'man free':
>         -k, --kb
>                Display output in kilobytes (KB).  This is the default.
> 
> 
> > Thanks for replying though.  Know of any good linux memory tools out
> > there?
> 
> Lots of them.
> 
> free and top from the command line.
> 
> Both KDE and GNOME have a "system monitor" under the "System Tools" in 
> the Red Hat menu.
> 
> meminfo is a memory leak detector intended for developers.  Valgrind is 
> another.
> 
> Depends on what you want from a "memory tool".
> 
Wow.  Thanks for the help.  That clears things up a lot.  I guess what
got me going was the gnome cpu monitor app for the taskbar was showing a
very high percentage of RAM use, so that got me looking around.  So, I
would say then that the app should display "application RAM" instead of
RAM caching of hard disk data. I know how caching works, and I agree
that it is a Good Thing.

I have used free and top quite a lot while tracking this down (look at
the subject line of this thread :) )  Since they report the same thing,
I didn't find it useful (in fact, due to my misunderstanding, it
convinced me of what I falsely believe to be a memory leak).  I guess
the question I still have is the use of swap space.  When I first boot
up, free (and top) report that I have all of my swap space available and
that none of it has been used.  Once I start using up more RAM,
presumably from caching HD data, I then start using some swap space.  I
guess I would have figured that the OS would realize that "hey, I
haven't used that cache data for a very long time.  Why don't I just
take some of that RAM back instead of opening up some swap space?"

Gordon, thank you for your excellent help, and playing tag with me all
day here.  I'll stop rebooting my computer twice a day and find other
things to worry about :)

Skip


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to