Memory figures

2001-05-29 Thread N. Raghavendra
Hi debian-user,

Recently I added a 64 MB DIMM to a machine with 128 MB RAM,
making a total of 192 MB.  The funny thing is that if I do 'free'
on the machine it says something like

 total   used   free sharedbuffers cached
Mem:192896  98172  94724  17752  63632  15328
-/+ buffers/cache:  19212 173684
Swap:   393584  0 393584

Doing 'ps' or 'top', OTOH, indicates that no process is using
more than 0.8% of memory, and there are only 30 processes, so the
used memory should be at most 46 MB, and not 98 MB as 'free'
says. Sometimes the 'used' figure in 'free' is as high as 180 MB
even when the machine is idle. After rebooting, it is okay, i.e.,
free shows something like 15-20 MB as used memory. But it soon
returns to the above state. Further, even when free says that
most of the memory is used the machine doesn't slow down
appreciably. E.g., I compiled a kernel using kernel-package, and
it took just a few minutes.

The machine doesn't run X.

Please let me know if you have any ideas on this.

Thanks,
Raghavendra.

-- 
N. Raghavendra| GnuPG signed/encrypted mail
[EMAIL PROTECTED]| welcome.  Key ID: 03618806.
Harish-Chandra Research Institute |C75D D0AF 457E 7454 BEC2
http://www.mri.ernet.in/~raghu/   |37AD C6E1 0407 0361 8806


pgpHBtQhUNUiR.pgp
Description: PGP signature


Re: Memory figures

2001-05-29 Thread Dmitry Astapov

 NR memory should be at most 46 MB, and not 98 MB as 'free'
 NR says.
In fact, figures you provided show that only 20M are used. Find some
reading about how VM subsystem works, or just take a loot on second line of
'free' output, the one with +/- buffers in it.

Amount of used memory in the first line includes size of filesystem cache
and dirty buffers, so it is perfectly OK to have all your spare RAM used
as disk cache. 


-- 
Dmitry Astapov //ADEpt (mail-to: [EMAIL PROTECTED])