On Tue, Nov 13, 2001 at 03:13:29PM +0000, David Malone wrote:

> > I'm trying to test and tune speed of freebsd's filesystem in many aspects.
> > I run recent FreeBSD 4.4-STABLE with new dirprefs code, read tuning(7),
> > newfs'd my FS, turned softupdates on, have UFS_DIRHASH kernel option.
> > Also, I've read DIRHASH kernel code source. It seems that efficiency of
> > DIRHASH greatly depends of kernel memory size (and some experiments
> > approve this).
> 
> You should be able to control how much memory is used by dirhash
> with the vfs.ufs.dirhash_maxmem sysctl. By default it uses up to
> 2MB and it should be possible to raise it significantly, providing
> you have enough physical memory. (By default there is about 1GB of
> kernel address space, so you are unlikely to be running into this
> limit - I don't think changing kern.vm.kmem.size will help you).

Are you shure? From LINT:

# Tune the kernel malloc area parameters.  VM_KMEM_SIZE represents the
# minimum, in bytes, and is typically (12*1024*1024) (12MB).
# VM_KMEM_SIZE_MAX represents the maximum, typically 200 megabytes.
# VM_KMEM_SIZE_SCALE can be set to adjust the auto-tuning factor, which
# typically defaults to 4 (kernel malloc area size is physical memory
# divided by the scale factor).
#
options         VM_KMEM_SIZE="(10*1024*1024)"
options         VM_KMEM_SIZE_MAX="(100*1024*1024)"
options         VM_KMEM_SIZE_SCALE="4"

It seems DIRHASH is limited with free space in the kernel malloc area.
It even cannot utilize default 2M of vfs.ufs.dirhash_maxmem when I do not
increase kern.vm.kmem.size. I think it's because of kernel malloc area
exhaustion. However, when I increase kern.vm.kmem.size upto 64M and
vfs.ufs.dirhash_maxmem upto 8M, it starts using more than 2M of
dirhash memory and speed of my tests greatly improves.

So, how can I estimate needed value of kern.vm.kmem.size?

Eugene Grosbein

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to