Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Mar 2005 16:32:09 +0100
From:      Dennis Berger <db@nipsi.de>
To:        freebsd-performance@freebsd.org
Subject:   vfs.ufs.dirhash_maxmem is a bit low
Message-ID:  <20050315153209.GA8863@nipsi.home.net>

next in thread | raw e-mail | index | archive | help
hi all,
I recently had the problem to change a line in about 2.5 million files.
In about 1530 subdirectories.
i started this command.

find . \( -not -name restoresym\* -and -not -name \*.log -and -not -name \*.gif \) -type f -print0 | xargs -0 sed -i '' 's/\/wurstbrot\//\/kaesebrot\//'

on another shell i watched with gstat how it works after several minutes
i noticed a terrible breakdown. no read/write anymore. After watching with
top i notice 25% system usage. (it's a 4 processor mashine)
I tracked down the error to the vfs.ufs.dirhash. I guess the system
is running out of memory for the hashtable so everything is getting terrible
slow.
I raised vfs.ufs.dirhash_maxmem to 30 mb. after that everything was fine again.

My request can we add white kernel message for the behavier of running out of hashmemory? Like it is for running out of open files.
A message will appear on /dev/console indicating that the dirhash is too low.
Or pointing out in tuning(9) that it should raised of servers with lots of files.
Or raised the default from 2MB to 10MB or something.

any comments?

ragards,

-Dennis



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050315153209.GA8863>