[Samba] Slow FIND_FIRST2 response

Jeremy Allison jra at samba.org
Wed Jul 31 17:13:09 MDT 2013

On Tue, Jul 30, 2013 at 12:56:18PM -0400, Ryan Bair wrote:
> I'm running Samba 4.0.7 on CentOS 6.4 running double duty as DC and file
> server.
> 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
> Finder.
> 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?

Only by giving me a case-insensitive file system on CentOS 6.4 :-).

Otherwise, look at this:


The hard part is this:

"First, you need to canonicalize all the files in the directory to have one case, upper or lower,
take your pick"


More information about the samba mailing list