-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small readSize in SmbFileInputStream.java results in very low read speed from SMB share. #11
Comments
This seems to be because JCIFS does not support CAP_LARGE_READX. For example, my Windows computer returned 4356 for "MaxBufferSize" and 65536 for "MaxRawSize" when negotiating. In the constructor, maxBufferSize is 4356 and smaller, so readSize is set to 4286.
In readDirect, readSize (4286) is used as the maxCount for SmbComReadAndX.
Acocrding to MSDN, if the client sets CAP_LARGE_READX, the server can return more than the "MaxBufferSize" up to 65,535 bytes, which significantly increases the read speed. |
Hello, HubKing. Does one need to do something except increasing In my case, Download speed is fixed near 12-14 MBps/s. Some other apps show speed around 100 MBps/s (as it should be). I've also tried to set properties in main application class'
Any help is appreciated, thanks |
Try applying the patch in https://github.com/kohsuke/jcifs/blob/master/patches/LargeReadWrite.patch, it made a big difference for me. |
Hi SteveGreatApe, |
On my two Android devices, reading a file from an SMB share was very slow. The speed was about 0.3MB/s (the devices' Wi-Fi connection speed was 150Mbps). I checked the SMB packets on the Windows comptuer, and the read size was 4286.
A famous app called "Solid Explorer" is using this library, but showed faster copy speed (5MB/s). When I checked the SMB packets, its read size was set to 32768. The developers of Solid Explorer was using a modified version of JCIFS, and they had set a bigger read size.
When modified JCIFS just to set a bigger read size in , I could also achieve 5MB/s without modifying my app. I am not sure if this is a specific case of my devices or my Wi-Fi router, but please check if you could modify the library to use bigger read size when necessary.
The text was updated successfully, but these errors were encountered: