Luke Kenneth Casson Leighton lkcl at
Thu Sep 20 10:46:01 GMT 2001

VCs is the number of threads that the client asks the server
to allocate for its use.

the reason for doing threads, server-side, is sothat you
can do blocking locks without disrupting other SMBs
being processed.

so, if you have VCs=50 you can have up to 49 blocking
lock requests outstanding and still be able to
process other SMBs.

this is why if you specify VCs=1, as soon as you get
a blocking lock request, the server hangs.

smbd implements single-process per client, regardless
of VC number.

what it does is EMULATE blocking locks through polling,
queueing the SMB request with a delay for further
retries of the entire request!

if smbd was a threaded server, it would be a lot cleaner
and simpler code :)

but threads are not portable so are not used in smbd.

multiplexing is the number of overlapping SMBs you
can have - a bit like pipelining in processors.

except they can be replied to out-of-sequence, i believe.

again: think of a multi-threaded server where SMBs
are handed over, round-robin, to each thread.

each thread goes off, does its thing, maybe does each
one quicker, gets the response back to the connection-handling
thread, and they're all jumbled up and out-of-sequence
[and you don't care]

the multiplex id is used to reorder the SMBs back at the
*client* end.

_not_ having a threaded server explains why smbd's apparent
performance is affected so badly by certain kinds of test
clients - especially multithreaded test clients.

the multithreading of the client is supposed to be
'mirrored' by the server.

so, whilst smbd got double the throughput of nt on one of
these tests, it got a _fraction_ of the number of transactions
that NT did (like, 0.1%).


On Fri, Sep 14, 2001 at 03:44:08PM -0400, Michael B. Allen wrote:
> On Fri, Sep 14, 2001 at 09:21:14AM -0400, Tim Krein wrote:
> > I'm having a problem with a WinNT SMB client asking for vcnum=1 after our
> > server sets MaxNumberVcs=1.  My understanding is that if there is only one
> > virtual circuit allowed between client and server, then the vcnum should be
> > 0.  I'm receiving an additional Session Setup & X with vcnum=1.  This would
> > seem to violate the negotiated protocol.  I reject the request, and the
> > client does not attempt to accomplish its operation in any other way.
> > Should I take this to mean that the WinNT client is ignoring my
> > MaxNumberVcs?  How do I get it to "play nice?"  Does anyone know how to
> > configure WinNT so that it doesn't use additional virtual circuits?  We
> > have support for additional sockets from the same client, but not for
> > multiple virtual circuits within the same socket.
> I don't think vcs and multiplexing are the same thing. Here's a little
> fact -- when testing the jCIFS client at Interop, it was discovered that
> Win2K would kick off smbclient if used while jCIFS had a connection
> open. It was determined that jCIFS should be setting vcNumber to 1 (I
> was setting to 0 because I thought it was a legacy field) or Win2K would
> see vcNumber=0 connection from that host (by ip rather than calling name)
> and kick off any others.
> Unfortunately this fields is pretty much not documented at all. But
> I don't think it has anything to do with multiplexing. For that,
> do MaxMpxCount=1.
> Mike
> ----------------------------------------------------------------
> Users Guide
> contains important info including how to unsubscribe.  Save time, search
> the archives at

More information about the samba-technical mailing list