Alex Kramarov wrote:>
> Hi.
>
> I have shifted from redhat 7.1 to 7.2, and have several machines running
> both versions now. I have noticed, that the memory usage patern is very
> different on machines using ext2 and ext3 - the ones using ext2 usually use
> 5-10 MB of "buff" memory, but the ones with ext3 grow to 50MB on
machines
> with 128MB, and to 250MB with on machine with 512 MB. I have conducted a
> test, and changed /etc/fstab on the 7.2 machine to mount all partitions
ext2
> instead of ext3, and the "buff" memory is back to 5 MB, as with
normal 7.1
> linux.
>
Several months ago, ext2 was changed so that directory contents
are held in the pagecache, not the buffercache. We never applied
a similar change to ext3.
Consequently, buffercache usage (as reported by top, vmstat, free, etc)
will be larger with ext3. In ext2, directory caching is lumped into the
`cached' figure, not `buffers'.
But we're really just caching the data in the same place, under a
different name. Given the 2.4.10 unification of the buffercache
with the pagecache, there's not much difference now from a caching
point of view. It's just that the kernel-internal APIs for getting
at the data are different. (And they're more unwieldy for the
buffercache case, but ext3 likes to use buffers, and is a *lot*
more complex than ext2).