-
Notifications
You must be signed in to change notification settings - Fork 181
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
SMBJ Performance #817
Comments
It highly depends on your method of testing... What types of streams are you using? Are you using the same dialect and encryption standards? |
Hi @hierynomus, i can confirm phenomenon @proxymus89 mentioned. and started simple java app smbJbuffer [12288] time [688] ms. speed [53756368] B/s size [36984380] end of smbJlocalbuffer [16777216] time [349] ms. speed [105972440] B/s size [36984380] end of localsmbj upload was about 45% slower than upload to mounted share. What shell we do to improve smbj performance? |
One thing you should always do is use Also, have you tried using |
Thank you for the hint. smbJ with Smbfiles.copytime [763] ms. speed [48472320] B/s size [36984380] smbJ with Smbfiles.copyoverall performance is approximately the same. |
I started test with all versions of smbj. Release 0.10.0 was 10% faster than 0.13.0. On pc with 10Gb network i got the following results : smbJbuffer [12288] time [319] ms. speed [115938496] B/s size [36984380] end of smbJsmbJ with Smbfiles.copytime [440] ms. speed [84055408] B/s size [36984380] smbJ with Smbfiles.copylocalbuffer [16777216] time [77] ms. speed [480316640] B/s size [36984380] end of localSo copy to mounted share is really 4 times faster than copy with smbj. |
Hallo @hierynomus, after some debugging sessions i got a feeling that encryption is a performance killer. My setup SmbConfig smbConfig = SmbConfig.builder()
|
Disabling it is simple :) You can do it in the |
I do call SmbConfig..withEncryptData(false) but it changes nothing. |
agree with @nashkevichv in those last months i've tried every possible combination (different smbj version, different dialects, different envirorments, different smbConfig options, different approach to upload, different file size), I have never achieved anywhere near the performance of Windows file explorer |
First of all, @hierynomus, thanks a lot for the SMBJ-library. As described above we can observe pure SMBJ performance comparing to performance Windows provides by default. The steps below helped me to improve SMBJ performance. SmbConfig
By default encryptData = false and signingRequired = false. 1 Gbit networkAsyncDirectTcpTransport solves the problem for 1 G/bit network. 10 Gbit networkAsyncDirectTcpTransport did not help. The transfer rate was a little bit higher ( about 140 Mbyres/s ) but far from 10Gbits/s. After some debugging sessions I found that SMBJ signs data pakages (SMB2WriteRequest). I could not find a way how to disable signing with existing SMBJ api,
After this change the trasfer rate was 650 - 750 Mbytes/s. How does Windows work?In my corporate environment after command
Windows does neither encryption nor signing. If '/REQUIREPRIVACY' is set, then Windows performs significantly slower ( ~ 200-250 Mbytes/s ). |
amazing! can u raise a PR @nashkevichv ? |
@hierynomus would you be keen on this? |
Yes, i would.
Sent with [Proton Mail](https://proton.me/) secure email.
…On Thursday, May 2nd, 2024 at 00:34, tooptoop4 ***@***.***> wrote:
***@***.***(https://github.com/hierynomus) would you be keen on this?
—
Reply to this email directly, [view it on GitHub](#817 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A77OCHFQULBSD5WRRUE3G23ZAFUY3AVCNFSM6AAAAABD5URJIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZGI2DCMZUGY).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The Session.send() will check if the server has set RequireSecuritySignature in the Negotiate Protocol Response. If server and client do not wish to sign packets, an unsigned packet will be sent. This should address hierynomus#817
I have raised a PR #824. Let me know if this helps. |
The Session.send() will check if the server has set RequireSecuritySignature in the Negotiate Protocol Response. If server and client do not wish to sign packets, an unsigned packet will be sent. This should address hierynomus#817
I noticed that using Windows file explorer I have speeds up to 4 times faster than smbj. why is smbj so slow? I tried to change all the possible parameters of smbj but to no avail. Is there something I'm missing or is it actually a limitation of the library?
The text was updated successfully, but these errors were encountered: