RE: Correctly determine amount of "free memory"

From: Gregory Giguashvili
Date: Mon Dec 06 2004 - 14:07:02 EST


> That's not really a meaningful question.
Sorry, I did my best :)

> The qualified answer is that /proc/meminfo gives you the available
information and what number
> you want depends upon what you plan to do with it. Swapping is not
necessarily the right metric
> for two reasons.
I plan to commit the largest chunk of memory in the quickest way. This
operation may be slowed down by swapping - that's why I don't want to
get there. If swapping is not the right metric, what is then?

According to my humble experiments with 2.4 and 2.6 kernels, some cashed
memory reported in /proc/meminfo is reused and some is swapped. The real
problem here is that I couldn't find the right way to "predict" how much
cached memory will be discarded before starting to swap when system is
low on available RAM.

Thanks
Giga
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/