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:

(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.

  1. Stop the HiRDB service.
  2. Use the registry editor to change the setting for the desktop heap for the non-interactive desktop.
    [Figure]Registry key
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
    [Figure] Registry setting
    Windows
    [Figure] 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.
  3. Restart the operating system.
  4. Restart the HiRDB service.