Question & Answer
Question
How can I ensure that the Microsoft® Windows® non-interactive desktop heap problem does not recur as I add IBM® Rational® ClearCase® users?
Answer
Given that the heap size is statically allocated, there is no way to completely avoid the issue. However, you can configure Windows to warn you when you are about to start running out of desktop heap.
Refer to Microsoft Knowledge Base Article 184802 User32.dll or Kernel32.dll fails to initialize for further information about desktop heap.
First, you need to know roughly how many service processes your host can support.
Note that 512KB of desktop heap space is roughly enough for 90 service processes to run.
The "90" processes is derived from the 48 MB limit minus 3 MB increments divided by 512 KB.
(49152 KB - 3072 KB) / 512 KB = 90
Note: 49152 KB = 48 MB & 3072 KB = 3 MB
In other words you can have approximately 90 non-interactive desktops (Services).
Note: If you were to raise the 3rd number to 3072, the result would be.
(49152 KB - 3072 KB) / 3072 KB = 15
Hence you would then be able to run approximately 15 non-interactive desktops (Services).
Based on this knowledge, you can set up a Performance Monitor alert to warn you when this threshold is close.
To determine the approximate number of service processes your Windows server can run:
- Determine the third number of the "SharedSection=" portion of the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Subsystems\Windows string value.
- Take 48 MB - 3 MB -- (49152 KB - 3072 KB) and divide that by the 3rd value.
Example:
If you set "SharedSection=1024,3072,1024", the result would be:
(49152 KB - 3072 KB) / 1024 KB = 45
You could have approximately 45 non-interactive desktop services running.
Performance Monitor on Windows 2000® and Windows XP®:
- Open the Performance Monitor application. (Start/Settings/Control Panel/Administrative tools/Performance)
- Open "Performance Logs and Alerts"
- Right Click "Alerts" and select "New Alert Settings."
- Type in any name, and Hit OK.
- In the Alert settings dialog box that appears, enter a descriptive comment and then click the "Add" button in the "counters" section.
- Select the "System" Performance Object.
- Select the "Processes" counter from the list below it.
- Click "Add" and then "Close"
- With the "Processes" counter selected, Change the dropdown in the "Alert when the value is:" to "Over" and the "Limit" to the number we calculated from the desktop heap settings we set.
- Go to the "Action" tab and make sure that "Log an entry in the application event log" is set. You may want to also set "Send a network message to:" to send a message to an administrator's workstation. There is the option for running a specific program as well; configuring that to send you e-mail or a page is "left as an exercise for the reader."
- "OK" out of this dialog to start the alert monitor running.
- Exit the application and the alerts will be collected in the background by the "Performance Logs and Alerts" service.
Performance Monitor on Windows NT®:
The most important thing to be aware of on Windows NT is that performance monitor alerts will only occur if the Performance Monitor application is currently running. Also, once the application is exited, the alert settings are lost if not specifically saved. So, once configured, the settings need to be saved and reloaded after each server reboot.
To Configure the Performance monitor:
- Start the Performance Monitor application. (Start/Programs/Administrative Tools/Performance Monitor)
- Select "View/Alert"
- Select "Edit/Add To Alert"
- Select the "Objects" Object
- Select the "Processes" Counter.
- In "Alert if:" select "Over" and then enter the number calculated above.
- Click "Add" and then "Done"
- Select "Options/Alert" and make sure that "Log to Application Event Log" is selected. You may want to also set "Send a network message to:" to send a message to an administrator's workstation.
- Select File/Save Workspace. Save the workspace out with a descriptive filename. (Example: ProcessAlert.pmw)
- Create a new shortcut in the Windows start menu's "Startup" group as follows.
- Right Click on the Start menu
- Select "Explore all Users"
- Drill down to the "Programs/Startup" folder.
- Right click in the right hand pane, select "New/Shortcut".
- For the program name, type "%systemroot%\system32\perfmon.exe" followed by the path to the workspace file you saved.
- "Next" through and finish creation of the shortcut
Monitoring ClearCase Desktop heap usage with Desktop heap Monitor:
*** Set up Desktop heap monitor
Download and install Desktop Heap monitor following the URL below.
http://www.microsoft.com/downloads/details.aspx?familyid=5CFC9B74-97AA-4510-B4B9-B2DC98C8ED8B&displaylang=en
To start monitoring, run dheapmon -l to have the driver loaded as follows;
C:\kktools\dheapmon8.1\x86>dheapmon -l
Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
Dheapmon - Driver loaded successfully
*** Monitor how much non-interactive desktop heap size ClearCase consumes.
- Stop ClearCase and run dheapmon to confirm active desktop heaps.
C:\kktools\dheapmon8.1\x86>dheapmon
Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Session ID: 0 Total Desktop: ( 11456 KB - 7 desktops)
WinStation\Desktop Heap Size(KB) Used Rate(%)
-------------------------------------------------------------
WinSta0\Default 3072 77.7
WinSta0\Disconnect 64 4.5
WinSta0\Winlogon 128 13.1
Service-0x0-3e7$\Default 2048 11.9
Service-0x0-3e4$\Default 2048 1.7
Service-0x0-3e5$\Default 2048 1.1
SAWinSta\SADesktop 2048 0.1
-------------------------------------------------------------
- Start ClearCase and run dheapmon again to recognize the desktop heap assigned for ClearCase (ClearCase albd user).
C:\kktools\dheapmon8.1\x86>dheapmon
Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Session ID: 0 Total Desktop: ( 13504 KB - 8 desktops)
WinStation\Desktop Heap Size(KB) Used Rate(%)
-------------------------------------------------------------
WinSta0\Default 3072 77.7
WinSta0\Disconnect 64 4.5
WinSta0\Winlogon 128 13.1
Service-0x0-3e7$\Default 2048 12.2
Service-0x0-3e4$\Default 2048 1.7
Service-0x0-3e5$\Default 2048 1.1
SAWinSta\SADesktop 2048 0.1
Service-0x0-1b6a3a7$\Default 2048 0.4
-------------------------------------------------------------
In this example the last listed Service-0x0-1b6a3a7$\Default is the desktop heap assigned for all processes with clearcase_albd user account. The heap size should be the same as the 3rd value of "SharedSection"in Windows Registry.
Note: You may not be able to easily identify which service desktop belongs to which service other than by knowing it's behavior. So, of the four service desktops on his machine, the one we selected is not necessarily the one that is the albd desktop.
Then, run dheapmon -v -w <WinStation> to show the detailed information about it.
In this example, WinStation is Service-0x0-1b6a3a7$.
C:\kktools\dheapmon8.1\x86>dheapmon -v -w Service-0x0-1b6a3a7$
Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Windowstation: (Service-0x0-1b6a3a7$) SessionID: 0
Desktop: (Default) Addr: be690000
Desktop Heap 2097152 (0x 200000) Bytes
Committed 12288 (0x 3000) Bytes
Uncommitted 2084864 (0x 1fd000) Bytes
Allocated 9152 (0x 23c0) Bytes
Total Freed 3136 (0x c40) Bytes
Unused 2088000 (0x 1fdc40) Bytes
Used Rate ( 0.4) %
-------------------------------------------------------------
"Allocated" is the size actually used by ClearCase server processes with clearcase_albd account.
As albd_server.exe and syncmgr_server.exe are such processes, the above result means that these 2 processes consume 9152 byte in the desktop heap.
- Accessing views/VOBs and run dheapmon -v -w <WinStation> to check how much desktop heap size ClearCase processes consume.
C:\kktools\dheapmon8.1\x86>dheapmon -v -w Service-0x0-1b6a3a7$
Desktop Heap Information Monitor Tool (Version 8.1.2925.0)
Copyright (c) Microsoft Corporation. All rights reserved.
-------------------------------------------------------------
Windowstation: (Service-0x0-1b6a3a7$) SessionID: 0
Desktop: (Default) Addr: be690000
Desktop Heap 2097152 (0x 200000) Bytes
Committed 24576 (0x 6000) Bytes
Uncommitted 2072576 (0x 1fa000) Bytes
Allocated 22048 (0x 5620) Bytes
Total Freed 2528 (0x 9e0) Bytes
Unused 2075104 (0x 1fa9e0) Bytes
Used Rate ( 1.1) %
-------------------------------------------------------------
In this example, "Allocated" size has been increased to 22048 from 9152 at step 2 above. In addition, 4 ClearCase servers (view_server, db_server, vob_server and vobrpc_server) get activated as follows;
This means, these 4 processes consume 12896 (22048-9152) byte.
Related Information
Was this topic helpful?
Document Information
Modified date:
29 September 2018
UID
swg21150076