Re: dentry cache grows to really large number on 64bit machine

From: Kunal Trivedi
Date: Thu Dec 07 2006 - 02:22:19 EST


Hi,
Another piece of information...
If i do on shell.

# while 1
# ./grow_dentry
# end
(grow_dentry is C code I've posted in previous msg.)

Then dentry_cache grows really fast.

But if within 'C' code if I write while(1), then everything is okay.
(No substantial growth ).

Thanks
-Kunal

On 12/6/06, Kunal Trivedi <ktrivedilkml@xxxxxxxxx> wrote:
Hi,
I am running 2.6.18 kernel on 64 bit AMD machine. (procinfo attached
at the end of the mail). One of the things I have noticed that
dentry_cache grows really fast under certain code path.
So, far I have not seen any problems, but I would like to get some
more input on this subject. Is it okay for dentry_cache to grow that
much ?

I've run following program for an ~1.00 hour. And my slabinfo shows following.

# cat /proc/slabinfo | grep dentry
dentry_cache 5228333 5228333 224 17 1 : tunables 120
60 8 : slabdata 307549 307549 0


# cat /proc/meminfo
MemTotal: 8173080 kB
MemFree: 6787852 kB
Buffers: 42048 kB
Cached: 72616 kB
SwapCached: 0 kB
Active: 88608 kB
Inactive: 29796 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 8173080 kB
LowFree: 6787852 kB
SwapTotal: 2096472 kB
SwapFree: 2096472 kB
Dirty: 48 kB
Writeback: 0 kB
AnonPages: 3716 kB
Mapped: 3336 kB
Slab: 1251292 kB
PageTables: 192 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 10269552 kB
Committed_AS: 11500 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 1272 kB
VmallocChunk: 34359737015 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB


int
main()
{
int fd;
char fname[] = "/tmp/proc-output-XXXXXX";

fd = mkstemp(fname);
close(fd);
unlink(fname);
return 0;
}

Please advice,

Thanks
-Kunal

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