[Samba] poor samba performance with many smaller files

Peter Bulin bulin.peter at gmail.com
Tue Apr 26 20:08:41 UTC 2016

The directory is small, it contains only one file. stat() takes 15ms and if
I read 1000 files it sums to 15 seconds. So the issue is really that open
file is synchronous.

On Tue, Apr 26, 2016 at 9:57 PM, Jeremy Allison <jra at samba.org> wrote:

> On Tue, Apr 26, 2016 at 09:44:57PM +0200, Peter Bulin wrote:
> > Hi,
> > I need to to open existing readonly files. Yes you are right, not the
> open
> > call takes the time, but stat() system call.
> > I looked at aio_pthread source, the lines which needs to be removed to
> make
> > it work are just the lines which tests for O_CREAT|O_EXCL? What problems
> > can cause such solution for readonly share?
> So ignore the aio_pthread advice - that really isn't relevent.
> What's causing the problem is the lookup time for cache misses
> with a really large directory.
> See here:
> https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/largefile.html
> for details.

More information about the samba mailing list