We have trouble tuning Windows 2000 Server to support an application we
have developed.
The application runs as noninteractive service under a user account. The
service needs to create a large number of extra processes using
CreateProcess().
With the default (512KB) desktop heap setting for desktops associated
with noninteractive window stations we experience that processes fail to
initialize with the following well-known popup message displayed on the
console:
The application failed to initialize properly (0xc0000142)
This occurs after creating about 150 (console) processes. The
CreateProcess() calls do not fail.
Using the description in KB article 184802 we tune the third
SharedSection value from 512 to 2048. This makes it possible to start a
lot more processes under our service, but other services running under
user accounts fail to start initially because the total desktop heap
gets too large. Terminal Services is also enabled on the server, I
understand that this reduces the global 48MB buffer to approx the half.
- is there any way to monitor the usage of the global buffer used for
desktop heap?
- any suggestion on what resources is consumed by each process started
under the service and eventually leads to initialization failure? We
have experimented with running the service as LocalSystem user and
avoiding User32.dll but it still fails.
- on some servers there is a fourth value (512) listed after
SharedSection. What is this value used for?
- on some servers we often have the “application failed to initialize
properly” message displayed when we log out of the console, and this can
occur to any process (for example cmd.exe). It looks like this is not
connected to running the maximum number of processes under the service.
|