Re: Memory consumption PowerShell
- From: Thorsten Hindermann <ThorstenHindermann@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 05:18:02 -0700
Hi Andrew!
The mechanism of the Identity Management system (it is Novell Identity
Manager 3.0 - we just call it IDM 3.0) is, that everey event that occours
with a user account intiate an action. The most actions are modify attributes
in the IDM an his connectes Drirectories, e.g. Open LDAP and Active
Directory. And we could initiate to run a script oout side the IDN 3.0. This
is the case we want to do, if a new user account was created. A few actions
are to modifiy the attributes, an one of the most last actions is to run a
script, that create a subdir, set NTFS rights an so on.
Now the Pronblem is, in many cases we have bulk-operatiuons with our user
accounts. So it can be normal that a few to thousands account are modified.
When in this case a script must be executed, than in a few seconds hundred or
thousand script instances are running. And every instance needs 28-30 MB
memory (it took this value over the TaskManager). And the PowerShell
start|running-script|terminate ist not so fast (the average runtime of a
"start|running-script|terminate" are 2-3 seconds. But the System call the
scripts faster as they terminate, so the memory consumption explode and crash
the Server (Windows Server 2003 SP1 with actual patch stand) with a blue
screen. I have test this scenario in a virtual machine environment.
To this, the normal size oc CMD.Exe are 2 MB. But the runtime is faster. If
have wrote a little script, that is equiv. to the powershellscript, but the
avarage runtime is very fast. The mechanism behind is, that within a java
program the function CreateProcess is called an this function needs a string
as parameter. This parameter contains the string with the .BAT-File and his
parameters. Now I'v look to the Server (now there runs a bulk operation) and
I dont see no CMD.Exe or Command.com instances. How is that implemented in
the Server APIs that a programm call to a .BAT ir .CMD Script consume so
minimal memory in the Server but the PS consumes 28 MB per instance?
Is there a chance, that the PowerShell run like this or how could we
minimize the memory consumption of the PS and how coould we minimize the
average runtime.
Any idea are welcome!
--
With best regards
Thorsten Hindermann
"Andrew Watt [MVP]" wrote:
Thorsten,.
I can only surmise precisely what you want to do.
Have you tried something like this?
$users = [List of users]
foreach ($user in $users){
#tasks go here
}
I would be very surprised if that took up 28GB.
If the suggested approach doesn't work for you I suggest that you post
more detail on the scenario and precisely what it is that you want to
do.
Andrew Watt MVP
On Wed, 19 Jul 2006 23:43:02 -0700, Thorsten Hindermann
<ThorstenHindermann@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello Group!
I have following problem. We want to use the powershell with an Identity
Management System. Within a task from the IM System we must start a script
per person to make actions e.g. create a homedir path, set ACLs ...
The Problem now is, it could be that about a few till hundreds of person
identified, for which we must start an action with an pwoershell scipt. But
each(!) running instance consumes 28 - 30 MB memory. 28MB * (e.g.) 1000
acrions = 28.000 MB (28GB). To big for todays memory management.
How could I reduce this mmory consume????
Please help! Any idea are welcome!
Thanx
--
With best regards
Thorsten Hindermann
- Follow-Ups:
- Re: Memory consumption PowerShell
- From: Thorsten Hindermann
- Re: Memory consumption PowerShell
- References:
- Re: Memory consumption PowerShell
- From: Andrew Watt [MVP]
- Re: Memory consumption PowerShell
- Prev by Date: Re: PowerShell : Return of experience
- Next by Date: Re: Memory consumption PowerShell
- Previous by thread: Re: Memory consumption PowerShell
- Next by thread: Re: Memory consumption PowerShell
- Index(es):
Relevant Pages
|
Loading