Re: Question about memory usage in 2.4 vs 2.2

Andreas Dilger (adilger@turbolinux.com)
Wed, 21 Mar 2001 02:51:49 -0700 (MST)


Zou Min writes:
> Then how to interpret slabinfo in 2.2.16 box?
> e.g. grep cache /proc/slabinfo
>
> kmem_cache 32 42
> skbuff_head_cache 2676 2730
> dentry_cache 15626 16988
> files_cache 103 108
> uid_cache 10 127
> slab_cache 85 126
>
> what does those numbers mean?

First number is in-use objects in that cache, second number is
currently-allocated objects in that cache.

> Furthermore, are those cache info above reported as part of the total
> cache in /proc/meminfo ?

Don't know.

> Lastly, which cache can be reclaimed, and which can't?

Slab cache will shrink if there are whole pages which are empty (it may
be that they have to be at the end of the cache). It is hard to tell
from the above numbers if any of the caches could shrink, because it
depends on the number of objects per page, and if there are any whole
pages without allocated objects.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/