Memory usage
Tez
binary_y2k2 at blueyonder.co.uk
Wed Mar 7 00:56:11 UTC 2007
Leonardo de Miranda Cabral wrote:
> Hi all,
>
> I have a notebook with 1GB Ram memory. I was taking a look in the memory usage
> of this notebook and guess what, with almost nothing (applications) loaded
> the memory that Kubuntu show as used with the 'free' command is 750MB.
> How????? I even stopped X (kdm), apache2, postgresql, everything... I`m
> getting crazy??!!! Why kubuntu don`t free this memory??? I went to a WinXP
> SP2 box with 512MB RAM that my father has and with a lot of application
> loaded it still hava free memory at about 200MB. For you guys help me lower
> my memory usage here a some 'free' and 'ps' outputs. [1] and [2] are outputs
> when nothing is loaded (neither X), and [3] and [4] with some default
> applications that usually starts with kde. Is this a kernel bug??? If can any
> one help me or explain me this strange memory usage...
>
> ----------------- [1] -> free -m ---------------------------------------------
> total used free shared buffers cached
> Mem: 1002 761 240 0 36 659
> -/+ buffers/cache: 65 937
> Swap: 2933 0 2933
> -----------------------------------------------------------------------------------
>
_SNIP_
Do you see that most of the RAM is used under "cached" ?
That's the file cache, where often accessed files are stored in RAM,
Take a look at my output of 'free -om':
total used free shared buffers cached
Mem: 1511 1414 97 0 24 873
Swap: 956 0 956
See how over 800MB is used as cache, it's normal for most of your RAM to
be cache, and it's actually a good thing to.
It saves the system having to access the, relatively slow, disk to read
some files.
As soon as the system needs more memory, it will shrink the cache to
free some.
If you want to see how much of the RAM is used by applications, just
take the cached amount from the used amount.
So in your case, 761 MB - 659 MB = 102 MB used
Tez
More information about the kubuntu-users
mailing list