Re: I think I have a memory leak in 2.3.x

Jay Thorne (jay@result.com)
Mon, 28 Jun 1999 07:27:57 -0700


"Stephen C. Tweedie" wrote:
>
> Hi,
>
> On Thu, 24 Jun 1999 11:09:42 -0400 (EDT), Chuck Lever <cel@monkey.org>
> said:
>
> > since i don't have the history that you and others here might have, can
> > you tell me why the inode cache is implemented so that it uses raw pages
> > and never shrinks? is it simply older than the slab cache
> > implementation?
>
> The original inode cache is ancient. The slab only arrived in 2.1. The
> inode.c was pretty much rewritten in 2.1 too, but the underlying data
> structures predate slab by a long, long way.
>
> > would there be any advantage to a re-implementation?
>
> Potentially.
>
> --Stephen

I've been thinking about this more. Shrinking the inode cache, while it
would be nice for "orthogonality" is not that important. The reason why it
got out of hand on my system is that I set my inode cache far too large for
my memory size. My fault, not the code.

I have not looked at the code, but from empirical evidence, the inode cache
can take a fair amount of memory per inode. I set my inode-max at 40690.
Over time, the cache grew to nearly 10 megs. That was annoying since I only
have 64megs. But the real answer is (Doctor Doctor, it hurts when I do
this: So, don't do that).

If I can figure out what the amount of memory used per inode, then I'll
submit some detailed doc updates to caution people about using too much. End
of required changes.

-- 
Jay Thorne  The Net Result System Services jay@result.com   
Http://net.result.com
Zoom 505 Effect page http://net.result.com/~jay 
Zoom 5xx series Patch Database: http://net.result.com/~jay/db.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/