[Samba] Slow FIND_FIRST2 response

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Jul 30 13:05:03 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.

Can you do an

strace -ttT -o smbd.strace -p <smbd-pid>

of the smbd serving the client while it's doing that? You
can find out the smbd pid with the smbstatus command. Please
upload the smbd.strace somewhere for inspection.


Volker Lendecke

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba mailing list