Memory Usage by X

Ross Vandegrift ross at kallisti.us
Sun Dec 10 07:27:12 PST 2006


On Sat, Dec 09, 2006 at 09:34:06PM +0000, Paulo J. Matos wrote:
> Probably it can't get more because the rest is
> distributed by the other apps. Worse, all mem and swap seem to be in
> use:
> $ free -m
>             total       used       free     shared    buffers     cached
> Mem:          1011        993         18          0          4         57
> -/+ buffers/cache:        931         79
> Swap:          494        494          0
> 
> Why is this? Is there any known leak in 7.1? Is this normal?

This is an age old point of confusion - Unix-like systems don't
generally like leving memory free.  Free memory is wasted money - if
you have the memory, you might as well do something useful with it.

One obvious thing you can do with it is cache disk reads and write to
speed up the system.  You have 1GiB of memory and free is showing that
your kernel has used 931MiB of that for buffer cache.  Your memory is
not used because of X11 at all.  The kernel is caching data from disk.

Moreover, the swap is probably consumed because the kernel has chosen
to swap out applications that you weren't using.  By doing this, it
could make more room for caching disk access.

This is all confirmed by your explanation that you left some large
compilation jobs running over night.  This means all of your user
applications were idle, and so swapped to disk, and that gcc was
eading lots and lots of different files that the kernel was caching.

You're seeing totally normal behavior that's just keeping your system
running better!

-- 
Ross Vandegrift
ross at kallisti.us

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37



More information about the xorg mailing list