Re: cache eating memory in 2.0.18??

Hubert Mantel (mantel@suse.de)
Sun, 8 Sep 1996 14:05:23 +0200 (MET DST)


Hello,

On Sun, 8 Sep 1996, Linus Torvalds wrote:

> On 7 Sep 1996 ulmo@q.net wrote:
> >
> > cache (instead of buff) seems to be eating memory now in 2.0.18.
> >
> > It doesn't seem to happen as horribly as with buff bloat though.
> >
> > Is this behavoir correct?:
>
> Without knowing exactly how the machine depends, I'd say that it is
> indeed correct, and nothing to worry about.

I do worry about. On a machine with only 8 MB and no swap, memory is
getting very, very tight.

I did lots of tests the last days. It seems that the size of the cache
never falls beyond 1 MB. So if I try to install on a machine with 8 MB
using a compressed ramdisk, it will fail if I use a kernel version
2.0.13-2.0.18 (I tested every version of these until now).

Using 2.0.0 everything is fine. When using 2.0.0 I can see, that the cache
memory gets as small as only 24 K. The machine is getting very very slow,
but it runs.

With newer kernels, I'm missing at least 1 MB of memory. Is this a feature
in order to improve performance when enough memory is available?

> One thing that makes the "cache" number look large is that the cache is very
> tightly shared with process pages, and essentially any code pages in memory
> will generally be in the cache too. So it's not uncommon to have quite large
> numbers for cache if you're running lots of programs: it doesn't necessarily
> mean that the actual filesystem cache is very large, it can just mean that
> there are lots of unmodified code pages in memory..

With my tests, I only run exactly one program (and a shell to execute
"free").
I wonder why there is used cache at all because the only existing file
system is the ramdisk?

> Linus

Hubert mantel@suse.de