Re: Slab allocator . . . cache? WTF is it?

From: Mike Fedyk
Date: Tue Dec 30 2003 - 18:51:50 EST


On Tue, Dec 30, 2003 at 02:18:58PM -0800, john moser wrote:
> I'm wondering, what IS cache? It seems to increase even when swap is not used,
> and sometimes when there's no swap partition enabled. It also seems to cause
> me to run into swap when I have ample ram available, assuming that cache is just
> some sort of cache that is copied from and mirrors another portion of ram for
> some sort of speed increase.

First of all, does it swap out and stay swapped out, or does it swap in and
out constantly?

What kernel version are you running?

The cache, or pagecache is at the core of Linux' memory management. When
you start an application (or process) it first maps the file into the cache,
and then executes it. So the cached value also counts the parts of the
files used recently. It gets much more complicated, but you're invited to
learn more about it. I'm sure someone else can give you a few URLs with
more details.

-
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/