question about jcifs

View: New views
2 Messages — Rating Filter:   Alert me  

question about jcifs

by 先斌 郑 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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!



好玩贺卡等你发,邮箱贺卡全新上线!

Re: question about jcifs

by Michael B Allen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/3 先斌 郑 <xeon_kman@...>:

> 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/