Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


wscript memory use

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,65257
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> wscript memory use
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 wscript memory use - 10/19/2008 8:59:13 PM   
  mwaddington

 

Posts: 4
Score: 0
Joined: 10/19/2008
Status: offline
Hi folks,

I've got a problem with windows XP PCs (in an Active Directory domain) running several instances of wscript.exe at startup. The issue is that each instance of wscript is using over 100mb of memory. The version of wscript is 5.7.0.16599. Does anyone know of a way to restrict the amount of memory wscript uses? I've resolved the problem in the past by re-installing the scripting engine, but I can't re-install over this version. I'd be greatful for any help or advice with this one.

Thanks.
 
 
Post #: 1
 
 RE: wscript memory use - 10/20/2008 1:32:51 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
I think you are looking for a solution to the wrong problem. The memory usage is a function of the script and what it is doing. If the script is using too much memory, then the script needs to be optimized.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mwaddington)
 
 
Post #: 2
 
 RE: wscript memory use - 10/20/2008 2:04:53 AM   
  mwaddington

 

Posts: 4
Score: 0
Joined: 10/19/2008
Status: offline
Thanks for your reply,

I've had the issue before on other machines, and re-installing the scripting engine fixes the problem. Instead of using 100mb the same script uses only 5mb after the re-install.

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: wscript memory use - 10/20/2008 2:09:33 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
I just can't see what reinstallation of the engine would do. The engine is just a collection of DLLs and EXEs. There isn't anything that preserves state in the engine itself. For there to be some sort of over time cumulative effect, the engine would need to be preserving state in some fashion.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mwaddington)
 
 
Post #: 4
 
 RE: wscript memory use - 10/20/2008 2:18:20 AM   
  mwaddington

 

Posts: 4
Score: 0
Joined: 10/19/2008
Status: offline
I've used the re-install of wscript as a workaround to fix 100s of PCs with the slow logon problem. I've used pslist to analyse memory use before and after, and it has shown marked decreases in memory use. I don't know why it works - I just know it does. Do you have any ideas where I could go from here?,
Thanks again.

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: wscript memory use - 10/20/2008 2:21:11 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
Nope. Is there some reason why you can't reinstall?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mwaddington)
 
 
Post #: 6
 
 RE: wscript memory use - 10/20/2008 2:29:21 AM   
  mwaddington

 

Posts: 4
Score: 0
Joined: 10/19/2008
Status: offline
It won't let me re-install on this machine, because it has a later version of wscript (5.7.0.16599 via service pack 3). The version that you can download from microsoft is 5.7.0.16535

(in reply to ebgreen)
 
 
Post #: 7
 
 RE: wscript memory use - 10/20/2008 2:57:22 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I must agree with ebgreen and say look at the code that wscript is running and not  the engine itself

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to mwaddington)
 
 
Post #: 8
 
 RE: wscript memory use - 10/20/2008 5:29:12 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
Yes but he said "the same script uses 5 mb instead of 100 mb", so it can be a defect in his engine version.
But 5 mb is already huge for a script (unless you are loading datas that big).

I'd try uninstalling wscript before re-installing again a previous version.

_____________________________

Fred

(in reply to TNO)
 
 
Post #: 9
 
 RE: wscript memory use - 12/11/2008 3:38:20 AM   
  vbS_fans

 

Posts: 1
Score: 0
Joined: 12/11/2008
Status: offline
I know why .....   for your reference only:

I write vbs or wsf files  and then run it in win-xp with no anti-virus and no firewall .
The memory is about 5 Mb.
But when same vbs running in a win-xp, with MCAfee and ZoneAlarm ,
The memory will become 130MB + 136MB(virtual) , wah... total 260++ MB #

thus, i try to find why they different ?
I turn on trace tool :
Process Explorer.exe
ProcMon.exe

found that,
WScript.exe tree ,
each relative DLL, OXC,...etc.
In using the actual size of MB in fact is total about 20MB,
Not the total 260++ MB #
I don't know what cause the memory leaks.
Maybe that is anti-virus software preserve huge memory space for this running.

(in reply to mwaddington)
 
 
Post #: 10
 
 RE: wscript memory use - 12/11/2008 7:42:31 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
Find the script components in SP3 and replace the existing.



_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to vbS_fans)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> wscript memory use Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts