Ten to 1 expansion of SMB requests to fcntl system calls?

Ira Cooper ira at samba.org
Fri May 24 10:15:46 MDT 2013


On Fri, May 24, 2013 at 12:05 PM, Richard Sharpe <
realrichardsharpe at gmail.com> wrote:

> On Thu, May 23, 2013 at 11:46 PM, Volker Lendecke
> <Volker.Lendecke at sernet.de> wrote:
> > On Thu, May 23, 2013 at 01:52:41PM -0700, Jeremy Allison wrote:
> >> On Wed, May 22, 2013 at 09:04:50PM -0700, Richard Sharpe wrote:
> >> > Hi folks,
> >> >
> >> > I have been running some dbench runs using the standard client.txt
> >> > file and using dtrace to measure system calls made by the smbd.
> >> >
> >> > For ~97,000 requests (SMB1 requests) I see 1,288,252 fcntl syscalls.
> >> > This seems excessive. Where might those be coming from?
> >> >
> >> > This is a FreeBSD 8.0 system.
> >>
> >> This is almost certainly the tdb locking primitives.
> >
> > True. But which tdb and what can we do about it?
>
> Do we have stats on ops on TDBs? We could print those out at exit to
> give us some idea which TDB is hit the most.
>
>
You can get this information...  When I did it, I used pfiles on the smbds
and discovered that most all of them open the tdbs on the same descriptors
all the time.  (I'd assume you can use lsof or something similar.)

>From there something like:

dtrace -n 'syscall::fcntl:entry /execname = "smbd"/ {@[arg0] = count()}'

Should give you a breakdown by fd... :)  Note, if you are feeling truly
inquistive, proving "what" is being called is also useful, so looking at
what arg1 is.

If you are feeling industrious:
http://forums.freebsd.org/showthread.php?t=32649 looks like it has docs to
help get the actual filenames out of the fds.

Good luck!

-Ira


More information about the samba-technical mailing list