smb read/write block size
Christopher R. Hertel
crh at ubiqx.mn.org
Tue Jan 17 04:14:29 GMT 2006
Stuart,
I remember some of the discussion you cite below. There was also a related
conversation regarding buffer sizes as used by the SMB_ECHO command. The
notes wound up here: http://ubiqx.org/cifs/SMB.html#SMB.9.2
...not that any of that helps much with regard to the specific questions
you're asking.
I would take a look at a capture of the protocol negotiation phase and
see what numbers are being established at the start of the SMB session.
Hope that's at least a little bit useful.
Chris -)-----
Stuart Kendrick wrote:
> hi,
>
> i'm analyzing read/write performance to various CIFS servers. the largest
> read block size i'm seeing is 61,440 bytes and the largest write block
> size is 32,768 bytes
>
> SMB Write AndX FID: 0x0009, 61440 bytes at offset 0
> ...
> SMB Read AndX Request, FID: 0x000b, 32768 bytes at offset 0
>
>
> what drives this choice? is this something hard-wired into Microsofts
> implementations of CIFS and the rest of us have just copied it? does this
> relate to how frequently CIFS wants to commit bytes to disk? is there
> some way to increase this (registry hacks under Windows, smb.conf fiddles
> under Samba, etc.)? [i'm not looking for specific registry hacks or
> smb.conf lines here ... just a conceptual understanding of the magic
> around '61440' and '32768'.]
>
>
> i've found a thread driven by hertel, with urban, minshall, and others
> involved, which suggests that a 64K ceiling exists because
> SMB_COM_WRITE/READ_ANDX is a USHORT, i.e. can only acknowledge 64K bytes
> ... so since CIFS can't acknowledge more than 64K bytes, therefore CIFS
> can't send more than 64K bytes.
>
> ===============================================================
> http://archives.neohapsis.com/archives/microsoft/various/cifs/2002-q4/0014.html
>
> "Once again, that suggests that you could send a write of more than 64K.
> The thing is, the SMB_COM_WRITE_ANDX response does *not* have an extension
> field according to the docs:
>
> USHORT Count; Number of bytes written
>
> So the server can only report up to 64K written. There's no way to report
> that more than 64K were written unless one of the Reserved fields is
> actually the upper 16 bits of the Count."
> =============================================================
>
>
> would i be correct in pointing to the USHORT definition of
> SMB_COM_WRITE_ANDX/SMB_COM_READ_ANDX as the proximate cause for a 64K
> read/write limitation in CIFS?
>
>
> i can see room to improve CIFS performance significantly in the LAN
> environment, and dramatically in the WAN environment (long, fat pipes), if
> i can hack my clients and servers to increase their CIFS Read/Write block
> size above 61440 ==> ergo my queries.
>
> --sk
>
> stuart kendrick
> fhcrc
>
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the samba-technical
mailing list