Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Red Hat Enterprise WS 3 update 5 memory cache problem?

Red Hat Enterprise WS 3 update 5 memory cache problem?

2005-08-04       - By John Haxby

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Comot KL wrote:

>Thanks for the reply. May be I explain it wrong. But
>anyway, below is my free -m without any prgrams
>running
>
>
>ml02{pm}% free -m
>             total       used       free     shared  
>buffers     cached
>Mem:         15499      15467         32          0  
>     44      13735
>-/+ buffers/cache:       1688      13811
>Swap:         2047          0       2047
>ml02{pm}%
>
>How am I going to get back my memory?
>  
>
No, you're not explaining it wrong.   What you think you want is perhaps
something like this:

            total       used       free     shared    buffers     cached
Mem:         15499      15467      13767          0         44          0


That's not perhaps unreasonable, but what are you going to do with that
free memory?   All it's doing now is heating up the room.   Sure when
you run programs they'll use some of that free memory and put it back
when it's finished.

What happens, though, when those programs want to access files?  
Suppose you run "date" (not a large program, I'll grant you).  Date (on
my system) open (and presumably reads a bit) eight files and looks for a
further 25.  There's nothing in the cache, so if you look at the disk
light you'll see it flicker when you run the date command, every time
you run the date command.

Perhaps a different example of something I do on a regular basis will
illustrate the use of the cache:   I frequently do "find -type f -name
'*.[ch]' | xargs grep foo" at the root of a tree where there are some
300M of files.   The first time I run that command it takes an about
25s; the second time it takes 2s, then 1.5s.   Actually, when I tried it
just now, it took 1.5s so I got those numbers from running the same
find|grep in a different source tree about the same size.   I've got
enough memory to hold both source trees in memory at once.

Now what happens when I do a build?   Well, I don't have quite enough
memory to hold all the source files, all the object files and all the
working space for the compiler, make, etc.

Is the machine any slower because the free memory isn't there?   No.  
Is it quicker becuase a lot of stuff is cached?   You bet it is -- it's
enormously quicker.

Unlike some operating systems, Linux *uses* all the memory available.  
Anything that has no immediate pressing need is used to store stuff that
was recently read from the disk.   It makes a *huge* difference.   The
only time you should have a large amount on the free list is shortly
after booting (when not much has happened) and just after a large
program has exited.   You really want the amount of memory reported as
free to be low.

jch

--
Taroon-list mailing list
Taroon-list@(protected)
http://www.redhat.com/mailman/listinfo/taroon-list

Earn $52 per hosting referral at Lunarpages.