Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2007 19:41:09 +0300
From:      dima <_pppp@mail.ru>
To:        Alexandre Biancalana <biancalana@gmail.com>
Cc:        freebsd-performance@freebsd.org, Mike Tancsa <mike@sentex.net>
Subject:   Re[2]: Bad performance when accessing a lot of small files
Message-ID:  <E1J5OSL-000Fl1-00._pppp-mail-ru@f156.mail.ru>
In-Reply-To: <8e10486b0712191207r5e256b84xf6cb0bbafc6cfd20@mail.gmail.com>
References:  <8e10486b0712191207r5e256b84xf6cb0bbafc6cfd20@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>The behavior that I'm observing and that want your help is when the
>>>system is accessing some directory with many small files ( directories
>>>with ~ 1 million of ~30kb files), the performance is very poor.
>>
>> Hi,
> 
> I'm using zfs, I think this change the things.. no ?
> 
> >          Have you adjusted the dirhash value ? What does
> >
> >   sysctl -a vfs.ufs | grep dirhash
> 
> # sysctl -a vfs.ufs | grep dirhash
> vfs.ufs.dirhash_docheck: 0
> vfs.ufs.dirhash_mem: 1410338
> vfs.ufs.dirhash_maxmem: 2097152
> vfs.ufs.dirhash_minsize: 2560

I agree with Mike.

Try to run this command while listing your large directory. You'll see that dirhash_mem will reach dirhash_maxmem. So, the value of dirhash_maxmem should be increased.

One more hint. Mounting filesystems with -noatime option greatly improves read performance. Apply this also, if you haven't done this yet.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1J5OSL-000Fl1-00._pppp-mail-ru>