[Samba] Slow FIND_FIRST2 response
abartlet at samba.org
Thu Aug 1 20:10:03 MDT 2013
On Tue, 2013-07-30 at 12:56 -0400, Ryan Bair wrote:
> I'm running Samba 4.0.7 on CentOS 6.4 running double duty as DC and file
> OS X clients are taking a _long_ time to list long directories. One
> directory with 10K entries is taking 3-4 minutes to display the entries in
> I captured a few seconds worth of packets and noticed that it's doing three
> requests per file:
> 1. NTCreateAndX - just opens the file
> 2. Close
> 3. FIND_FIRST2 - to look for the resource fork
> The first two happen extremely fast, the 3rd one is the kicker. Samba is
> taking about 0.025 seconds to return a response to the client (usually no
> such file status). Multiple that by 10K requests and you have a few minutes
> on your hands.
> I'm guessing the problem is that Samba must honor case-insensitivity for
> the lookup which is likely an expensive operation. Is there anyway to speed
> this up?
Do you use resource forks on your share at all?
If not, if the client can use streams for the xattrs (I think it can)
then using xattrs to back these not-actually-used resource forks may
well be much faster, as this is based on the file handle.
vfs objects = streams_xattr
(if you use resource forks, then they may not fit, in which case perhaps
try vfs objects = streams_depot, which uses a magic directory, but is
less tidy and less efficient).
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz
More information about the samba