[jcifs] question about jcifs

Michael B Allen ioplex at gmail.com
Fri Sep 4 14:50:45 MDT 2009


2009/9/3 先斌 郑 <xeon_kman at yahoo.com.cn>:
> I found it`s so slow when i use jcifs to get file from a remote server, only around 10mb,
> but it`s very fast when i use the direct url to get the same file, the speed was up to 80mb,
> i set the property jcifs.smb.client.rcv_buf_size with value 1024*1024, but
> it didn`t work, so i noticed the jcifs src code, i found the default constructor of
> SmbFileInputStream set readSize to the mini value between
> transport.rcv_buf_size and transport.server.maxBufferSize, when i debug it, i found maxBufferSize
> is only around 6 kilos, this is why so slowlly when i use the jcifs to get the file.
> i don't know too many about CIFS/SMB, so i wonder why do we have to use the server`s
> maxBufferSize on client? and how can i improve the efficiency about this?
> thank you!

Making buffer sizes larger does not equate to faster transfers. To
optimizing transfer speed you will need to do an analysis of network
communication and adjusting buffer sizes to maximize the data
transmitted in each TCP packet. In particular, make sure that every
other TCP packet does not contain a small amount of data.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list