[jcifs] threaded network crawler code examples (transport problem)

Christopher R. Hertel crh at ubiqx.mn.org
Tue Jul 29 07:13:05 EST 2003


On Mon, Jul 28, 2003 at 04:44:15PM -0400, Michael B Allen wrote:
:
> As I have explained on at least two occations the maxMpxCount is *static*.
> It is initialized to 1 and it is not increased until the client
> successfully negotiates with the first server. This is not correct but
> after the first negotiation the client will handle requests concurrently.
> So the net effect after a long crawling operation is  ... well nothing.

For my part, I just want to understand the issue.  It seems that clearing 
the air on this would be a benefit to everyone.  If nothing else, once I 
understand it I should be able to explain it in terms that should, I hope, 
put a stake in its evil heart.

So... If I understand you, the maxMpxCount static value is upped to match
the maxMpxCount of the first server, is that right?  Is that the first
server with which it correctly negotiates?

> What Dan is doing with his modified version of jCIFS is removing the
> maxMpxCount constraint altogether. This violates the CIFS spec and it will
> permit the creation of an unlimited number of threads which would likely
> result in doing little more than wasting large amounts of resources
> because when you add more threads at some point performance *decreases*.

The term "session" was used in the earlier message.  That term is overused
in this area of CIFS, so it would not surprise me if I've got something
confused.

MaxMpxCount, as I understand it, should limit the number of multiplexed
requests (and, therefore, threads) per transport connection to a given
server.  If you remove the MaxMpxCount entirely then you could overrun the
server by sending more requests at one time than it is prepared to handle.  
Typically, though, servers serialize the requests and handle them anyway.  
The MID and PID values would result in the response getting back to the
correct thread.

Also, if you set up multiple transport-level sessions between the client 
and the server, and have one thread per, then you've got a kludge on your 
hands but it would work.

I gotta read Dan's code...

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the jcifs mailing list