Re: Limit hash table size

From: Andi Kleen
Date: Thu Feb 05 2004 - 20:59:54 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> Ken, I remain unhappy with this patch. If a big box has 500 million
> dentries or inodes in cache (is possible), those hash chains will be more
> than 200 entries long on average. It will be very slow.

How about limiting the global size of the dcache in this case ?

I cannot imagine a workload where it would make sense to ever cache
500 million dentries. It just risks to keep the whole file system
after an updatedb in memory on a big box, which is not necessarily
good use of the memory.

Limiting the number of dentries would keep the hash chains at a
reasonable length too and somewhat bound the worst case CPU
use for cache misses and search time in cache lookups.

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