21.1 Estimating desktop heap settings
HiRDB calculates the amount of desktop heap required and secures it automatically when the unit starts up. This means that it is normally not necessary to change the desktop heap specification. However, if you experience frequent desktop heap shortages, you can revise the desktop heap specification using the following method.
- Organization of this section
- (1) Determining the desktop heap settings
- (2) Changing the desktop heap setting
(1) Determining the desktop heap settings
The size of the desktop heap can be set in the registry and can be changed with a registry editor. This specification of the size of the heap is set for each account, with a 48-megabyte# maximum for the entire server machine.
- #
- This is the default maximum value of the desktop heap for Windows Server 2003 (32bit). The maximum value of the desktop heap depends on the OS.
- Formula
Number of server processes started by HiRDB (value of pd_max_server_process) x a (bytes) |
- Value of a:
- For Windows XP, Windows Vista, or Windows 7: 5000
- For Windows Server 2003: 100
Also consider the following:
- If the setting is too large, it can be subject to influence by the action of other program products running under other accounts. For this reason, you should not set the value higher than is necessary.
- The processes activated by HiRDB are not limited to OS commands executed by HiRDB server processes and by users, and to utilities. Commands that acquire maintenance information, and that are executed after abnormal termination of a HiRDB server process, are also processes activated by HiRDB, and they use desktop heap. If a large number of HiRDB server processes terminate abnormally or are cancelled, and if the cause is an insufficient desktop heap (end state=0x8000 indicated in the KFPS01820-E message indicating that server processes have stopped), do not adjust the size of the desktop heap, but change the system common definition so that maintenance information is not collected.
(2) Changing the desktop heap setting
(a) Using HiRDB system definitions
Specify the amount of desktop heap used per process in the system common definition or in the pd_process_desktopheap_size operand in the unit control information definition.
(b) Using the registry editor
If you cannot resolve the desktop heap shortage with any of the above methods, change the value specified for desktop heap in the registry editor. If you misuse the registry editor, it is possible to cause serious problems, so great caution should be exercised. In addition, the setting for the desktop heap must be adjusted for the particular operating environment.
- Stop the HiRDB service.
- Use the registry editor to change the setting for the desktop heap for the non-interactive desktop.
Registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
Registry setting
Windows
Value
%SystemRoot%\system32\csrss.exe ObjectDirectory
=\Windows SharedSection=1024,3072,512
Windows=On SubSystemType=Windows ServerDll=basesrv,1
ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=winsrv:ConServerDllInitialization,2
ProfileControl=Off MaxRequestThreads=16
What you change is the third parameter of SharedSection (underlined). If this parameter is set to 512, the system allocates a 512-kilobyte heap to each desktop. If the third parameter is omitted, the second value (3,072 kilobytes) is allocated. Change the third parameter to the value determined in (1) Determining the desktop heap settings. In this case, it is imperative that the value specified for pd_max_server_process be estimated correctly.
- Restart the operating system.
- Restart the HiRDB service.