Tech Support > Operating Systems > Windows NT > Limit on the number of concurrent NET USE attempts?
Limit on the number of concurrent NET USE attempts?
Posted by Taed Wynnell on December 3rd, 2004


I was trying to parallelize some scripts that I run, and discovered that
there seems to be some limit to the number of concurrent NET USE commands
that can be running, and that number is around 10 or so.

For example, if I do this to try to login SERIALLY to 20 machines,
everything works fine:
for /l %i in (10,1,30) do net use \\machine-%i\c$ /user:user password

However, if I do it in PARALLEL, the result is that NONE of the NET USE
commands succeed! Even if there is a limit, I would have expected that the
first XX would succeed, but no others.
for /l %i in (10,1,30) do start /low cmd /c net use \\machine-%i\c$
/user:user password

But it isn't a network problem or anything like that because if I get the 20
NET USEs to be successful in serial, I can then copy files or whatever from
the 20 machines in parallel. So, it isn't the way I'm doing the
"parallelism" that's causing the problem.

Does anyone have any idea what is actually the limiting resource and what
the number might be?


Posted by Sundaram Narayanan[MSFT] on December 3rd, 2004


If you run this script with a cmd /k instead of cmd /c what error message
does net use put up.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subjected to the terms specified at
http://www.microsoft.com/info/cpyright.htm.



"Taed Wynnell" <taedn@REMOVETHIS.vertical.com> wrote in message
news:OG5G2zY2EHA.3392@TK2MSFTNGP10.phx.gbl...


Posted by Taed Wynnell on December 8th, 2004


"Sundaram Narayanan[MSFT]" <sunnar@online.microsoft.com> wrote in message
news:eeBqQnZ2EHA.2608@TK2MSFTNGP10.phx.gbl...
Good suggestion.

Every one of the windows ends up with:
System error 53 has occurred.
The network path was not found.

Interestingly enough, though, I did a "IPCONFIG /DISPLAYDNS" and none of
those machine names were in the DNS cache, so either DNS failed for all of
them, or it didn't get that far.

I then "primed" it to eliminate the DNS bottleneck by pinging all of the
sites in parallel (which worked), and then verified it with "IPCONFIG
/DISPLAYDNS". I also did a PING with "-L 5000" to pump a bunch of data, and
those also all worked in parallel, showing that it's not a network bandwidth
issue.

But when I did the parallel NET USE again, again they all failed. So, it
wasn't even getting to the point where it tries to resolve the DNS names (or
maybe it doesn't do that because it uses NetBIOS?).

I then cut down the parallelism to only 12 sites at once instead of 14, and
each of those also failed. But as before, when I then dropped down to only
10 sites, each NET USE window was successful.

So, 10 or 11 is still the magic number...

I then did the NET USE on the 15 sites serially to get them to succeed, and
then didn't do a /DELETE. I then did the NET USEs again in parallel, and
they all succeeded right away. So, that shows that at least the problem
isn't in the NET USE command itself -- it works fine with 15 concurrent
requests if it's already in use.

So, I guess this is all showing that the bottleneck is in the NetBIOS
resolution over the network or something like that?




Similar Posts