Slow network directory rename

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
TCC 12.01.44

Renaming a directory on a network using TCC is very slow compared to CMD. 3 seconds compared to half a second.

Here's a test I ran. (I broke up my original command line so it wouldn't create the horizontal scroll bar in the forum HTML view and added some flavoring text)

HTML:
[P:\NewTech\test]dir & timer & ren 1 2 & timer & dir & timer & 
keystack "ren 2 3" 13 "dir" 13 "exit" 13 & cmd & timer & dir & 
timer & ren 3 4 & timer & dir

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  13:21         <DIR>    .
 3/15/2011  13:21         <DIR>    ..
 3/15/2011  13:01         <DIR>    1
                 0 bytes in 0 files and 3 dirs
   560,658,845,696 bytes free
Timer 1 on: 13:23:27
P:\NewTech\test\1 -> P:\NewTech\test\2
     1 file renamed
Timer 1 off: 13:23:30  Elapsed: 0:00:03.06     <-----<<< TCC >>>

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  13:23         <DIR>    .
 3/15/2011  13:23         <DIR>    ..
 3/15/2011  13:01         <DIR>    2
                 0 bytes in 0 files and 3 dirs
   560,658,845,696 bytes free
Timer 1 on: 13:23:30
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

P:\NewTech\test>ren 2 3

P:\NewTech\test>dir
 Volume in drive P has no label.
 Volume Serial Number is 18A1-75DE

 Directory of P:\NewTech\test

03/15/2011  13:23    <DIR>          .
03/15/2011  13:23    <DIR>          ..
03/15/2011  13:01    <DIR>          3
               0 File(s)              0 bytes
               3 Dir(s)  560,658,845,696 bytes free

P:\NewTech\test>exit
Timer 1 off: 13:23:31  Elapsed: 0:00:00.49     <-----<<< CMD >>>

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  13:23         <DIR>    .
 3/15/2011  13:23         <DIR>    ..
 3/15/2011  13:01         <DIR>    3
                 0 bytes in 0 files and 3 dirs
   560,658,845,696 bytes free
Timer 1 on: 13:23:31
P:\NewTech\test\3 -> P:\NewTech\test\4
     1 file renamed
Timer 1 off: 13:23:34  Elapsed: 0:00:03.07     <-----<<< TCC again >>>

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  13:23         <DIR>    .
 3/15/2011  13:23         <DIR>    ..
 3/15/2011  13:01         <DIR>    4
                 0 bytes in 0 files and 3 dirs
   560,658,845,696 bytes free

[P:\NewTech\test]
 
#2
I see nothing like what you described. Could you describe your network set-up
in more detail?

Code:
o:\> echo %@truename[o:]
\\ad\vefatica$\

o:\> dir /a:d [0-9]*

 Volume in drive O is HDSH           Serial number is 9c14:46fc
 Directory of  O:\[0-9]*

2011-03-15  15:52         <DIR>    3
2011-03-15  15:52         <DIR>    4
                 0 bytes in 0 files and 2 dirs
    38,807,580,672 bytes free

o:\> timer & ren 3 1 & timer & timer & cmd /c ren 4 2 & timer
Timer 1 on: 15:54:45
O:\3 -> O:\1
     1 file renamed
Timer 1 off: 15:54:45  Elapsed: 0:00:00.03
Timer 1 on: 15:54:45
Timer 1 off: 15:54:45  Elapsed: 0:00:00.05

o:\> dir /a:d [0-9]*

 Volume in drive O is HDSH           Serial number is 9c14:46fc
 Directory of  O:\[0-9]*

2011-03-15  15:52         <DIR>    1
2011-03-15  15:52         <DIR>    2
                 0 bytes in 0 files and 2 dirs
    38,807,580,672 bytes free
 
#3
On Tue, 15 Mar 2011 16:01:06 -0400, vefatica <> wrote:

|I see nothing like what you described. Could you describe your network set-up
|in more detail?

That was on a LAN. I get similar, but slower, results on an internet VPN.

Code:
o:\test> echo %@truename[o:]
\\lucky\e$\Workplace\test

o:\test> dir /a:d [0-9]*

 Volume in drive O is Data           Serial number is c442:19db
 Directory of  O:\test\[0-9]*

2011-03-15  16:09         <DIR>    3
2011-03-15  16:09         <DIR>    4
                 0 bytes in 0 files and 2 dirs
    24,543,911,936 bytes free

o:\test> timer & ren 3 1 & timer & timer & cmd /c ren 4 2 & timer
Timer 1 on: 16:11:21
O:\test\3 -> O:\test\1
     1 file renamed
Timer 1 off: 16:11:23  Elapsed: 0:00:01.38
Timer 1 on: 16:11:23
Timer 1 off: 16:11:24  Elapsed: 0:00:01.36

o:\test> dir /a:d [0-9]*

 Volume in drive O is Data           Serial number is c442:19db
 Directory of  O:\test\[0-9]*

2011-03-15  16:09         <DIR>    1
2011-03-15  16:09         <DIR>    2
                 0 bytes in 0 files and 2 dirs
    24,543,911,936 bytes free
 
#4
Could you describe your network set-up in more detail?
I would love to, but I'm not too sure about it. Corporate environment with access managed using Active Directory (ADDS in Server 2008?).
I can offer the following (names have been changed to protect the innocent)...
HTML:
[P:\NewTech\test]net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
             P:        \\MXXXT.MXXC.UXXS.GOV\PUBS
                                                 Microsoft Windows Network
             Q:        \\MXXXT.MXXC.UXXS.GOV\MXXC_STORAGE\APPLICATIONS
                                                 Microsoft Windows Network
             S:        \\MXXXT.MXXC.UXXS.GOV\MXXC_STORAGE\DATA
                                                 Microsoft Windows Network
             T:        \\MXXXT.MXXC.UXXS.GOV\PUBS\NEWTECH
                                                 Microsoft Windows Network
             U:        \\MXXXT.MXXC.UXXS.GOV\MXXC_STORAGE\HOME\qxxxx0
                                                 Microsoft Windows Network
Disconnected           \\NXXXXXS3M20\LOGS        Microsoft Windows Network
The command completed successfully.


[P:\NewTech\test]
I can also offer a suggestion to all forum posters. If you are posting anything that has greater than and less than signs (such as &lt;DIR&gt;), I've found that using the
HTML:
 and
tags in your post allow for better formatting than
Code:
 and
.
 
#5
On Tue, 15 Mar 2011 16:41:21 -0400, JohnQSmith <> wrote:

|---Quote (Originally by vefatica)---
|Could you describe your network set-up in more detail?
|---End Quote---

My first test (posted) was with an AD share mounted manually (and persistently);
my machine does not require an AD logon. Did you test many times ... with CMD
first and TCC second? Whenever the connection had to be re-established it
would, of course, take longer. See my examples to eliminate the KEYSTACK stuff.
 
#6
Did you test many times ... with CMD
first and TCC second?
I tried several combinations; alternating between TCC and CMD a couple of times and then a sequence of TCC renames followed by a sequence of CMD renames.

I did notice that using CMD /C instead of using KEYSTACK decreased the CMD renaming speed from half a second down to less than a tenth of a second.

HTML:
[P:\NewTech\test]net use p:
Local name        p:
Remote name       \\MXXXT.MXXC.UXXS.GOV\PUBS
Resource type     Disk
The command completed successfully.


[P:\NewTech\test]dir & timer & ren 1 2 & timer & timer & cmd /c ren a b & timer
& timer & ren 2 3 & timer & timer & cmd /c ren b c & timer & timer & ren 3 4 & t
imer & timer & cmd /c ren c d & timer & dir & timer & ren d c & timer & timer &
ren c b & timer & timer & ren b a & timer & timer & cmd /c ren 4 3 & timer & tim
er & cmd /c ren 3 2 & timer & timer & cmd /c ren 2 1 & timer & dir

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  16:11         <DIR>    .
 3/15/2011  16:11         <DIR>    ..
 3/15/2011  13:01         <DIR>    1
 3/15/2011  16:05         <DIR>    a
                 0 bytes in 0 files and 4 dirs
   560,384,585,728 bytes free
Timer 1 on: 16:12:38
P:\NewTech\test\1 -> P:\NewTech\test\2
     1 file renamed
Timer 1 off: 16:12:41  Elapsed: 0:00:03.08
Timer 1 on: 16:12:41
Timer 1 off: 16:12:41  Elapsed: 0:00:00.06
Timer 1 on: 16:12:41
P:\NewTech\test\2 -> P:\NewTech\test\3
     1 file renamed
Timer 1 off: 16:12:44  Elapsed: 0:00:03.08
Timer 1 on: 16:12:44
Timer 1 off: 16:12:44  Elapsed: 0:00:00.06
Timer 1 on: 16:12:44
P:\NewTech\test\3 -> P:\NewTech\test\4
     1 file renamed
Timer 1 off: 16:12:47  Elapsed: 0:00:03.07
Timer 1 on: 16:12:47
Timer 1 off: 16:12:47  Elapsed: 0:00:00.05

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  16:12         <DIR>    .
 3/15/2011  16:12         <DIR>    ..
 3/15/2011  13:01         <DIR>    4
 3/15/2011  16:05         <DIR>    d
                 0 bytes in 0 files and 4 dirs
   560,384,585,728 bytes free
Timer 1 on: 16:12:47
P:\NewTech\test\d -> P:\NewTech\test\c
     1 file renamed
Timer 1 off: 16:12:50  Elapsed: 0:00:03.08
Timer 1 on: 16:12:50
P:\NewTech\test\c -> P:\NewTech\test\b
     1 file renamed
Timer 1 off: 16:12:53  Elapsed: 0:00:03.07
Timer 1 on: 16:12:53
P:\NewTech\test\b -> P:\NewTech\test\a
     1 file renamed
Timer 1 off: 16:12:56  Elapsed: 0:00:03.08
Timer 1 on: 16:12:56
Timer 1 off: 16:12:57  Elapsed: 0:00:00.05
Timer 1 on: 16:12:57
Timer 1 off: 16:12:57  Elapsed: 0:00:00.05
Timer 1 on: 16:12:57
Timer 1 off: 16:12:57  Elapsed: 0:00:00.04

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/15/2011  16:12         <DIR>    .
 3/15/2011  16:12         <DIR>    ..
 3/15/2011  13:01         <DIR>    1
 3/15/2011  16:05         <DIR>    a
                 0 bytes in 0 files and 4 dirs
   560,384,585,728 bytes free

[P:\NewTech\test]
I also mapped to another drive.

HTML:
[Z:\]net use z:
Local name        Z:
Remote name       \\nxxxxxs3m11\home\qxxxx0
Resource type     Disk
Status            OK
# Opens           3
# Connections     1
The command completed successfully.


[Z:\]dir & timer & ren 1 2 & timer & timer & cmd /c ren a b & timer & timer & re
n 2 3 & timer & timer & cmd /c ren b c & timer & timer & ren 3 4 & timer & timer
 & cmd /c ren c d & timer & dir & timer & ren d c & timer & timer & ren c b & ti
mer & timer & ren b a & timer & timer & cmd /c ren 4 3 & timer & timer & cmd /c
ren 3 2 & timer & timer & cmd /c ren 2 1 & timer & dir

 Volume in drive Z is Storage        Serial number is 3887:3b0f
 Directory of  Z:\*

 3/15/2011  16:17         <DIR>    .
 3/15/2011  16:17         <DIR>    ..
 3/15/2011  16:17         <DIR>    1
 3/15/2011  16:17         <DIR>    a
                 0 bytes in 0 files and 4 dirs
 2,311,431,061,504 bytes free
Timer 1 on: 16:18:13
Z:\1 -> Z:\2
     1 file renamed
Timer 1 off: 16:18:16  Elapsed: 0:00:03.07
Timer 1 on: 16:18:16
Timer 1 off: 16:18:16  Elapsed: 0:00:00.07
Timer 1 on: 16:18:16
Z:\2 -> Z:\3
     1 file renamed
Timer 1 off: 16:18:19  Elapsed: 0:00:03.07
Timer 1 on: 16:18:19
Timer 1 off: 16:18:19  Elapsed: 0:00:00.05
Timer 1 on: 16:18:19
Z:\3 -> Z:\4
     1 file renamed
Timer 1 off: 16:18:22  Elapsed: 0:00:03.08
Timer 1 on: 16:18:22
Timer 1 off: 16:18:22  Elapsed: 0:00:00.04

 Volume in drive Z is Storage        Serial number is 3887:3b0f
 Directory of  Z:\*

 3/15/2011  16:18         <DIR>    .
 3/15/2011  16:18         <DIR>    ..
 3/15/2011  16:17         <DIR>    4
 3/15/2011  16:17         <DIR>    d
                 0 bytes in 0 files and 4 dirs
 2,311,415,832,576 bytes free
Timer 1 on: 16:18:22
Z:\d -> Z:\c
     1 file renamed
Timer 1 off: 16:18:25  Elapsed: 0:00:03.10
Timer 1 on: 16:18:25
Z:\c -> Z:\b
     1 file renamed
Timer 1 off: 16:18:28  Elapsed: 0:00:03.07
Timer 1 on: 16:18:28
Z:\b -> Z:\a
     1 file renamed
Timer 1 off: 16:18:31  Elapsed: 0:00:03.06
Timer 1 on: 16:18:31
Timer 1 off: 16:18:31  Elapsed: 0:00:00.05
Timer 1 on: 16:18:31
Timer 1 off: 16:18:31  Elapsed: 0:00:00.05
Timer 1 on: 16:18:31
Timer 1 off: 16:18:31  Elapsed: 0:00:00.04

 Volume in drive Z is Storage        Serial number is 3887:3b0f
 Directory of  Z:\*

 3/15/2011  16:18         <DIR>    .
 3/15/2011  16:18         <DIR>    ..
 3/15/2011  16:17         <DIR>    1
 3/15/2011  16:17         <DIR>    a
                 0 bytes in 0 files and 4 dirs
 2,311,415,627,776 bytes free

[Z:\]
 
#8
Will try it tomorrow. What is "WAD"? Oh yeah, "Works As Designed". Almost had me a bit upset for a sec, thinking you were saying "What A Doofus!"
 
#9
if you want TCC to do the same as CMD (i.e., nothing other than renaming the directory), use REN /NNT.
Now THAT is what I'm talking about! Thanks!

HTML:
[P:\NewTech\test]dir & timer & ren /nnt 1 2 & timer & timer & cmd /c ren a b & t
imer & timer & ren /nnt 2 3 & timer & timer & cmd /c ren b c & timer & timer & r
en /nnt 3 4 & timer & timer & cmd /c ren c d & timer & dir & timer & ren /nnt d
c & timer & timer & ren /nnt c b & timer & timer & ren /nnt b a & timer & timer
& cmd /c ren 4 3 & timer & timer & cmd /c ren 3 2 & timer & timer & cmd /c ren 2
 1 & timer & dir

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/16/2011  08:20         <DIR>    .
 3/16/2011  08:20         <DIR>    ..
 3/15/2011  13:01         <DIR>    1
 3/15/2011  16:05         <DIR>    a
                 0 bytes in 0 files and 4 dirs
   560,331,436,032 bytes free
Timer 1 on: 08:22:24
P:\NewTech\test\1 -> P:\NewTech\test\2
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.02
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.09
Timer 1 on: 08:22:24
P:\NewTech\test\2 -> P:\NewTech\test\3
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.01
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.05
Timer 1 on: 08:22:24
P:\NewTech\test\3 -> P:\NewTech\test\4
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.00
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.06

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/16/2011  08:22         <DIR>    .
 3/16/2011  08:22         <DIR>    ..
 3/15/2011  13:01         <DIR>    4
 3/15/2011  16:05         <DIR>    d
                 0 bytes in 0 files and 4 dirs
   560,331,436,032 bytes free
Timer 1 on: 08:22:24
P:\NewTech\test\d -> P:\NewTech\test\c
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.02
Timer 1 on: 08:22:24
P:\NewTech\test\c -> P:\NewTech\test\b
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.00
Timer 1 on: 08:22:24
P:\NewTech\test\b -> P:\NewTech\test\a
     1 file renamed
Timer 1 off: 08:22:24  Elapsed: 0:00:00.02
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.04
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.05
Timer 1 on: 08:22:24
Timer 1 off: 08:22:24  Elapsed: 0:00:00.05

 Volume in drive P is unlabeled      Serial number is 18a1:75de
 Directory of  P:\NewTech\test\*

 3/16/2011  08:22         <DIR>    .
 3/16/2011  08:22         <DIR>    ..
 3/15/2011  13:01         <DIR>    1
 3/15/2011  16:05         <DIR>    a
                 0 bytes in 0 files and 4 dirs
   560,331,436,032 bytes free

[P:\NewTech\test]
Looking at the switches for REN, I see that "T" part of "/NNT" means disabling update of the jpstree.idx. When I originally indexed with a CDD /S, I specifically ignored all of my network mappings, only generating a tree for my local C: drive. I guess I assumed that since I didn't index them that they wouldn't be updated, well, that and I didn't know that REN was updating the .idx file. I created the environment variable TREEEXCLUDE to exclude all my network drives and there are no speed issues now. Perhaps if the suggestion of having the option of having the jpstree.idx file stored as a database file gets implemented, that would also speed things up as well.

Thanks again Rex. Also, thanks Vince for troubleshooting it with me like you did.