[Samba] poor samba performance with many smaller files

Peter Bulin bulin.peter at gmail.com
Thu Apr 28 12:06:30 UTC 2016

I removed the O_CREAT|O_EXCL checks and added check to exclude O_DIRECTORY,
but it is not working, opening of files fails and I don't know why.
I can see in strace logs that openat syscall in vfs_aio_pthread was
successful, but it still fails and this messages are logged:

[2016/04/28 13:28:59.691782,  5, pid=5623, effective(32697, 10513),
real(32697, 0)] ../source3/smbd/open.c:2551(open_file_ntcreate)
  open_file_ntcreate: FILE_OPEN requested for file subor and file doesn't

[2016/04/28 13:28:59.693969, 10, pid=5623, effective(32697, 10513),
real(32697, 0)] ../source3/smbd/open.c:4806(create_file_unixpath)
  create_file_unixpath: NT_STATUS_OBJECT_NAME_NOT_FOUND

Any idea what is wrong?

And if stat() is the problem, could SMB_VFS_STAT be implemented in
vfs_aio_pthread module the same way SMB_VFS_OPEN is implemented?

On Wed, Apr 27, 2016 at 6:49 PM, Jeremy Allison <jra at samba.org> wrote:

> On Wed, Apr 27, 2016 at 01:02:54PM +0200, Peter Bulin wrote:
> > Hi,
> > I did use wireshark to verify that the client (window7) is not the
> problem,
> > client is sending out multiple "SMB2 Create request" packets before he
> gets
> > some answer.
> > On the server side samba is processing this requests in a synchronous
> way,
> > in order which they were send, that is what I see from strace output.
> Just to check if parallelizing the open() call helps,
> then remove the restrictions in vfs_aio_pthread that
> insist on O_CREAT|O_EXCL and test it out (wouldn't
> run in production that way without me re-evaluating
> this code). If that speeds it up then we have an
> idea.

More information about the samba mailing list