hierynomus / smbj

Server Message Block (SMB2, SMB3) implementation in Java
Other
713 stars 180 forks source link

performance needs #703

Closed tangxuGoGoGo closed 2 years ago

tangxuGoGoGo commented 2 years ago

If after I create a DiskShare object, multiple threads use this object to construct a large number of File or other file operation requests, will it have a performance impact?

hierynomus commented 2 years ago

I cannot tell based on what you're asking, what have you tried/measured?

tangxuGoGoGo commented 2 years ago

I didn't do a measurement, just thinking about whether it would be more efficient to create multiple diskShares when doing multithreading to upload multiple files. I hope you can give advice

hierynomus commented 2 years ago

I think that depends on too many variables to give an answer to. i.e. your bandwidh, server's bandwidth, server's implementation, per connection tcp settings.

It is anyway faster to use either a single DiskShare, or a pool of pre-connected shares, than connecting and authenticating for each request.

tangxuGoGoGo commented 2 years ago

OK, the feasibility of multithreaded connections has been verified. Everything works fine except for the window10 smb share limit of 20 connections. Thank you very much for your reply!