Performance Issue with jcifs-1.2.19 and higher

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

Performance Issue with jcifs-1.2.19 and higher

by rosed :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm seeing a pretty big performance hit when using jcifs-1.2.19 or higher with the ListFiles example.  Here are three test runs using 1.2.18, 1.2.19 and 1.2.21:

D:\JCIFS\jcifs_1.2.18\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.18.jar;. ListFiles smb://rosed:test@dr670/snf/
 test/ users/
2 files in 6094ms

D:\JCIFS\jcifs_1.2.19\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.19.jar;. ListFiles smb://rosed:test@dr670/snf/
 test/ users/
2 files in 14391ms

D:\JCIFS\jcifs_1.2.21\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.21.jar;. ListFiles smb://rosed:test@dr670/snf/
1: new Socket: java.net.DatagramSocket@13a328f
0: socket closed: java.net.DatagramSocket@13a328f
1: new Socket: java.net.DatagramSocket@a01335
0: socket closed: java.net.DatagramSocket@a01335
1: new Socket: Socket[addr=/157.184.70.36,port=445,localport=4543]
 test/ users/
2 files in 14360ms

As you can see 1.2.19 and 1.2.21 are taking over twice as long to return the list of files from a Windows share.

Here are the results using the FQDN:

D:\JCIFS\jcifs_1.2.21\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.18.jar;. ListFiles smb://rosed:test@dr670.mw.prtdev.lexk.com/snf/
 test/ users/
2 files in 78ms

D:\JCIFS\jcifs_1.2.21\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.19.jar;. ListFiles smb://rosed:test@dr670.mw.prtdev.lex.com/snf/
 test/ users/
2 files in 8375ms

D:\JCIFS\jcifs_1.2.21\examples>java -classpath D:\eclipse\workspace\Test\thi
rdParty\jcifs\jcifs-1.2.21.jar;. ListFiles smb://rosed:test@dr670.mw.prtdev.lex.com/snf/
1: new Socket: java.net.DatagramSocket@1113708
0: socket closed: java.net.DatagramSocket@1113708
1: new Socket: Socket[addr=/157.184.70.36,port=445,localport=4804]
 test/ users/
2 files in 8343ms

In this case 1.2.19 and 1.2.21 are taking over 100 times longer.

Thanks,
Danny

Re: Performance Issue with jcifs-1.2.19 and higher

by Michael B Allen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, May 29, 2008 at 4:25 PM, rosed <rosed@...> wrote:
>
> I'm seeing a pretty big performance hit when using jcifs-1.2.19 or higher
> with the ListFiles example.  Here are three test runs using 1.2.18, 1.2.19
> and 1.2.21:
>
> D:\JCIFS\jcifs_1.2.18\examples>java -classpath D:\eclipse\workspace\Test\thi
> rdParty\jcifs\jcifs-1.2.18.jar;. ListFiles smb://rosed:test@dr670/snf/
>  test/ users/
> 2 files in 6094ms

This is almost certainly a name service lookup problem. I don't see a
properties file anyware in your command line so unless you modified
ListFiles.java I'd say you need to set WINS or tweak DNS to be more
forgiving about using unqualified hostnames. See our website. I think
there's an entire page about setting name service properties.

Mike

--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/

Re: Performance Issue with jcifs-1.2.19 and higher

by Michael B Allen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/29/08, Michael B Allen <ioplex@...> wrote:

> On Thu, May 29, 2008 at 4:25 PM, rosed <rosed@...> wrote:
>  >
>  > I'm seeing a pretty big performance hit when using jcifs-1.2.19 or higher
>  > with the ListFiles example.  Here are three test runs using 1.2.18, 1.2.19
>  > and 1.2.21:
>  >
>  > D:\JCIFS\jcifs_1.2.18\examples>java -classpath D:\eclipse\workspace\Test\thi
>  > rdParty\jcifs\jcifs-1.2.18.jar;. ListFiles smb://rosed:test@dr670/snf/
>  >  test/ users/
>  > 2 files in 6094ms
>
>
> This is almost certainly a name service lookup problem. I don't see a
>  properties file anyware in your command line so unless you modified
>  ListFiles.java I'd say you need to set WINS or tweak DNS to be more
>  forgiving about using unqualified hostnames. See our website. I think
>  there's an entire page about setting name service properties.

I've just noticed that with the DFS changes as of late, if you don't
have a domain environment, the failed trusted domains lookup code will
delay everything by ~6 seconds. Presumably virtually everyone is in a
domain environment but if by chance you're not (e.g. just testing
something on the local machine) this delay is pretty annoying. So I've
added a property which if set to true:

   jcifs.smb.client.dfs.disabled = true

will disable domain based DFS. The default value is false (DFS is
fully enabled).

Mike

--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
LightInTheBox - Buy quality products at wholesale price