<div class="gmail_quote">On Wed, Aug 18, 2010 at 10:55 AM, Michael B Allen <span dir="ltr"><<a href="mailto:ioplex@gmail.com">ioplex@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">On Wed, Aug 18, 2010 at 2:53 AM, Marasim <<a href="mailto:marasim@gmail.com">marasim@gmail.com</a>> wrote:<br>> Michael B Allen <ioplex <at> <a href="http://gmail.com/" target="_blank">gmail.com</a>> writes:<br>
>><br>>> Hi Marasim,<br>>><br>>> If you have a retry loop, why do you care if JCIFS has to reopen the pipe?<br>>><br>>> If a connection is idle for longer than jcifs.smb.client.soTimeout<br>
>> milliseconds, it will be closed to conserve resources. This is by<br>>> design.<br>>><br>>> Mike<br>><br>> Hi Mike,<br>><br>> Thanks again for your reply.<br>><br>> I do have to care, because it is affecting the performance of my application<br>
> (closing and reopening connections become expensive when a large number of hosts<br>> are involved that I use to connect using JCIFS).<br>><br>> So looks like I should be able to set a higher value for<br>> jcifs.smb.client.soTimeout to test if that helps the performance.<br>
<br></div></div>Hi Marasim,<br><br>Actually that could have the opposite effect. If you really have that<br>many connections open, all of those sockets use a lot of memory. JCIFS<br>closes those connections specifically to free that memory. If you<br>
increase soTimeout to keep idle connections open, you may pressure VM<br>memory and performance could actually decrease.<br><br>It all depends on how frequently you're using the connection. If it's<br>every consistently 60 or 120 seconds (like a network monitor agent),<br>
then increasing the soTimeout might be better than the default of 35<br>because you know the connection is going to be used again very soon.<br>If it's every 5 minutes or longer or the timing is unpredictable, then<br>
I would use the default soTimeout. Try both ways and measure.<br>
<div>
<div></div>
<div class="h5"><br>Mike<br><br>--<br>Michael B Allen<br>Java Active Directory Integration<br><a href="http://www.ioplex.com/" target="_blank">http://www.ioplex.com/</a><br></div></div></blockquote></div>
<div> </div>
<div> </div>
<div>
<div>Hi Mike,</div>
<div> </div></div>
<div>Thanks for your help. Changing the timeout did help in my case, I need to do more testing though to make sure it is stable :)</div>
<div> </div>
<div>Marasim</div>