#117922 - 2004-04-15 12:48 AM
execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
I have a fairly short script that takes a long time(approximately 2.5 minutes) to execute. I will be useing this as a logon script so I am obviously concerned about the execution time. In the script I have 1 IF InGroup and approximately 5 If Exists. This script will grow to a MUCH LARGER size before I am finished.
I am wondering if this is an average execution time for this size script. Is it possible that most of my time is taken up with the group chacheing?
I did notice that if I 'short circuited' the If InGroup statement it took 1.5 minutes off my execution time. If InGroup is one of the culprits would I get better execution time using my own array for getting the groups?
Also, Any tips on increaseing speed will help drasticly. Even if it is rearrangeing the script in certain ways to help the exe 'compile' it quicker. PS. This script is very likely to have tons of InGroups in it.
|
Top
|
|
|
|
#117926 - 2004-04-15 01:03 AM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
The full script is as follows. I tended to think that this was very slow for normal operations. Thanks for all the help. Some of this is commented out because it will be comeing soon in our configuration, but we are not quite read for them yet.
;************************************************************* ; NAME: Clinton Login Script ; ; DATE : 4/14/04 ; ; COMMENT: ; ;*************************************************************
;************************************************************* ; root variable intailization ;************************************************************* $rootserver = "\\clnhfp01\" $KixHome = $rootserver+"\ScriptTools\WKix32.exe" $BatHome = $rootserver+"\ClintonLogon\bat\" $ScriptHome = $rootserver+"\ClintonLogon\script\"
;************************************************************* ;Auto Install based Logic ; This is used for to install Applications automatically upon ; reboot ;*************************************************************
;************************************************************* ;Process M & N Drive Mappings ;************************************************************* If (InGroup("TKNTOR\CLN__Clinton Users")) $NTData = $RootServer+"NTData" $NTSoftware = $RootServer+"NTSoftware" Use M: $NTData Use N: $NTSoftware ? "Drives should be connected" endif
;************************************************************* ;Process Old Tor-Cl03 Drive Mappings ;************************************************************* ;If (InGroup("TKNTOR\CLN_Clinton Users")) ; Use q $RootServer+"Vol1\" ; Use u $RootServer+"NWData\" ; Use V $RootServer+"Vol4\" ; Use W $RootServer+"Vol3\" ; Use X $RootServer+"Vol2\" ; Use Y $RootServer+"Vol1\" ; Use Z $RootServer+"Sys\" ;endif
;************************************************************* ;Process User Home Drive Mappings ;************************************************************* $UserHome = $rootServer+@UserID+"$" if Exist($UserHome) Use H $UserHome endif
;************************************************************* ;Run login Batch if it exists ;************************************************************* $AllUsersBat = $BatHome+"AllUsers.BAT" If exist($AllUsersBat) call $AllUsersBat endif
$userbat = $BatHome+$uid+".BAT" If exist($userbat) call $userbat endif
;************************************************************* ;Run login script if it exists ;************************************************************* $AllUsersScr = $ScriptHome+"AllUsers.SCR" If exist($AllUsersScr) $KixHome $AllUsersScr endif
$userScr = $ScriptHome+$uid+".SCR" If exist($userScr) $KixHome $userScr EndIf
|
Top
|
|
|
|
#117927 - 2004-04-15 01:16 AM
Re: execution time
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Have you tried commenting out the portions that call other scripts? My first guess would be that this portion is really what is taking the longest. Try commenting everything below this section...
Code:
;************************************************************* ;Process M & N Drive Mappings ;************************************************************* If InGroup("TKNTOR\CLN__Clinton Users") $NTData = $RootServer+"NTData" $NTSoftware = $RootServer+"NTSoftware" Use M: $NTData Use N: $NTSoftware ? "Drives should be connected" endif
Also you dont need the double parenthesis in the ingroup lines. Im not sure if that would cause any slow downs but just incase.
|
Top
|
|
|
|
#117928 - 2004-04-15 01:21 AM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
I had to add the extra set of parenthesis earlier today to get it to work. I know that sounds strange, but that is what it required.
Also it took 1.5 mins to get to that serction of the script. That is why the ? line was there (to help me gauge time). The problem may be the prefetch.
|
Top
|
|
|
|
#117933 - 2004-04-15 05:00 AM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
Thanks for catching the double \s. This is a error I missed. Logically to me though at that point of the script they are just variables. They should not effect my speed in the early part of the script (unless the parser is prepareing it in a special part of memory or something like that.).
I agree that there should not have to be the double set of ( for the InGroup, but for some unknown reason it did not work until I placed the double set there. (This was suggested by one of our corporate contacts useing kixstart as well).
|
Top
|
|
|
|
#117934 - 2004-04-15 05:05 AM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
What OS is the test client? Most are Windows NT 4.0 SP6 machines What OSs are the other clients? same What OS are the DCs? DCs are windows NT 4.0 (will be moveing to win2k later this year when we go AD. What version @KiX? latest downloadable version What protocols are on the network? Currently TCP/IP, Netbios, IPX (IPX will be going later this year) What network clients on the clients? MS Windows, Netware (Netware will be going later this year) Do you have KXRPC service running? No, I dont know about the finer point of what this would add to the mix yet.
Thanks
|
Top
|
|
|
|
#117936 - 2004-04-15 06:24 AM
Re: execution time
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
FYI
Quote:
What version @KiX?
latest downloadable version
Does not specifically tell us what version you're running because were not sure where you downloaded from.
I will assume KiXtart 4.22
Just try running a whole new script on a test account.
In user manager place something like this on the account for testing.
KIX32.EXE TEST.KIX /F
Then in the script just place this code...
Code:
Break On
Dim $SO,$x
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
DIM $RootServer,$NTSoftware
'Welcome to test script - going to sleep for 3 seconds ' ?
sleep 3
'Welcome to test script - going to sleep for 5 seconds ' ?
sleep 5
'Welcome to test script - going to sleep for 10 seconds ' ?
sleep 10
'Okay sleep timing should have been okay. Now we will try some other tasks.' ?
$RootServer = "\\clnhfp01\"
$NTSoftware = $RootServer + "NTSoftware"
'My NT Software location is: ' + $NTSoftware
'Will now attempt to map the N: drive to NTSoftware ' ?
Use N: $NTSoftware
'Mapping N drive error was: ' + @ERROR + ' - ' + @SERROR
get $x
This code should complete very quickly, if not then you will have to start digging into the way your Network is setup.
The get $x at the end of the code will cause the script to hold and wait until you press a key so that you can see all of this on screen.
|
Top
|
|
|
|
#117937 - 2004-04-15 01:55 PM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
Yup it is 4.22 . sorry about not knowing the version. I was home and checking the board by that time so my work resources were not available at that time. I was also time constrained due to 'kid' issues I will try that as a test here shortly.
|
Top
|
|
|
|
#117938 - 2004-04-15 02:03 PM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
This script does not contain an InGroup. will kixstart still do the group pre-fetch? Or is the script system smart enough to know it wont need it so it wont pre-fetch it. A little more information about our network structure: TONS UPON TONS of groups(I would say 1k+, without counting) BDC local to my plant ISDN to PDC Also, I am not testing this by actually logging in. I am executeing the command line that will be executed out of a .bat file.
Thanks
|
Top
|
|
|
|
#117939 - 2004-04-15 02:08 PM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
ok... forgot I had a tool that could count the groups. I have 1400 global groups and 10 local groups on the domain controller.
|
Top
|
|
|
|
#117940 - 2004-04-15 02:15 PM
Re: execution time
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
If I were you, would test things like this:
Go into registry and delete this key:
HKEY_CURRENT_USER\Software\KiXtart\TokenCache
This is where Kixtart caches it's groups, it will cache all your group memberships only when/if you use the INGROUP() function, then I would run this script:
Code:
break on
$start = @TICKS
if ingroup("domain users")
?"In domain users"
endif
?"elapsed=" @TICKS-$start
exit 1
THen show us the output strings from this script ... then RUN THIS SCRIPT AGAIN and you should see a much improved reponse time.
btw, we have thousands of groups and over a hundred InGroups in our login script, the script takes just a few seconds to run.
-Shawn
|
Top
|
|
|
|
#117941 - 2004-04-15 02:38 PM
Re: execution time
|
burnsc
Starting to like KiXtart
Registered: 2004-04-14
Posts: 171
|
The output I recieved was as follows :
In Domain Users elapsed=91872
Actual script time to run was 1 min 32 seconds
BTW, thanks for the location of the cache. With the way this program caches the grops it will come in handy for another program I will be writing later.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 496 anonymous users online.
|
|
|