Increasing ufs.dirhash_maxmem by default

Kirk McKusick mckusick at mckusick.com
Sun Oct 10 12:51:19 UTC 2010


> To: freebsd-fs at freebsd.org
> From: Ivan Voras <ivoras at freebsd.org>
> Date: Sat, 09 Oct 2010 21:51:47 +0200
> Subject: Increasing ufs.dirhash_maxmem by default
> 
> hi,
> 
> Several people have worked on dirhash in the past so I'm posting here 
> instead of individually pinging them.
> 
> The default dirhash_maxmem is currently set as 2 MB, which while may be 
> sufficient some time ago it certainly isn't now. I've had to increase it 
> on practically all non-trivial servers and even high-end desktops, and 
> there are occasional reports on the lists that suggest it's a fairly 
> common thing.
> 
> What I'd like to do is either:
> 
> 1) Simply increase the default to e.g. 32 MB (trivial change) or
> 2) Make it a function of hibufspace (e.g. 1/32th of it, capped at 64 MB) 
> which is itself autotuned. This would happen in ufsdirhash_init().
> 
> The current incarnation of dirhash has a vm_lowmem handler so it doesn't 
> look like it could starve a system if overtuned.
> 
> Ideas? Objections?

I am a strong proponent of auto tuning. Otherwise, one is constantly
needing to fix defaults as we are discussing here. You suggestion #2
above seems reasonable except that I would not put an upper limit on
it as that just gets us back to the previous problem after a few years.
Given that dirhash has a vm_lowmem handler, and we are only considering
a small percentage of the memory, I do not think that an upper bound
is really needed.

	~Kirk


More information about the freebsd-fs mailing list