<div>Hi Guys,</div><div> </div><div>We have noticed that on Windows 7 we expirence low trasfer rate for read/write operations and using wireshark we found that the reason was in buffer size. jcifs used 4K buffer even when we set snd/rcv buffer sizes and windows client used 64K. The reason of low 4K buffer was that it is default value for MaxBufferSize on windows samba server.</div><div> </div><div>For normal SMB_COM_READ and SMB_COM_WRITE requests, the maximum buffer size is always equal to MaxBufferSize. But if CAP_LARGE_READX<span>  </span>or CAP_LARGE_WRITEX <span> </span>capability is enabled on the SMB Negotiate Server Response,he maximum buffer size <span> </span>used<span>  </span>is<span>  </span>61440 (60K) <span> </span>for large read( SMB_COM_ READ_ANDX ) <span> </span>and 65535 (64K) for large write (SMB_COM_WRITE_ANDX) , regardless of MaxBufferSize.</div><div> </div><div>More info can be found here: </div><div>    http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx</div><div> </div><div>With old LargeReadWrite.patch we had an issue with checking large/read write capability on linux samba server 3.5.4 so code for this check was modified a bit. </div><div> </div><div>Below you can find some result for smb server with enabled large read/write:</div><div>jcifs-1.3.16                    ~2.5 M/s</div><div>jcifs-1.3.16 with patch    ~9M/s</div><div>Native client read/write   ~9.5M/s</div><div>Modified patch for 1.3.16 is attached.</div><div> </div><div>Best Regards,</div><div>Dmytro Polivenok</div>