RE: Correctly determine amount of "free memory"
From: David Schwartz
Date: Mon Dec 06 2004 - 13:28:19 EST
> Assuming that I define "free memory" as maximum memory that can be
> allocated without causing swapping, is there a way I can give the best
> "free memory" amount estimate?
That's not really a meaningful question. In fact, technically, no matter
how much memory you allocate you won't change the amount of swapping because
allocation has no affect on the working set size.
> I've tried to play with /proc/meminfo values with some progress, but I'd
> like to get a qualified answer from people working with VM bits and
> bytes.
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. First, a
system might swap even though it's under a perfectly normal (or even low)
load. Second, there are bad memory situations a system can get in even if
it's not swapping, for example, a system with no buffer cache for file I/O
wouldn't be swapping, but it wouldn't perform well either.
DS
-
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/