Exele Information Systems, Inc.

            How many libraries can be run?

            When the Microsoft® Windows® operating system starts, it reserves various areas of memory for tracking its resources. One of these is the relatively unknown desktop heap. On Windows-based systems, the desktop heap stores information about the various processes running on the machine. Memory allocation of the heap is controlled by the number of open applications, windows, services and other resources. When a large number of processes are running, this heap may run out of memory.

            How this memory is allocated has implications on the number of libraries that the Equation Server is able to start. When reading the details below, note that Equation Library executables are started by the Equation Server Service - they fall under the category of non-interactive processes .

            Symptom of insufficient heap size

            You have a large number of libraries running (>25). When you start the next library (LibraryX), it crashes. If you stop one of the running libraries, you are able to start LibraryX without any errors. 

            Modifying heap size

            The different values for the desktop heap are stored in the following Windows registry value: 
            HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

            To start the Windows registry editor, click Start > Run, and enter: regedt32. You can then expand the folders listed above in the left (navigation) pane of the Registry Editor to display the value of these settings in the view pane. The default data for this registry value will look something like the following (all on one line):

            %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On 337 SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

            The numeric values following SharedSection= control how desktop heap is allocated. These "SharedSection" values are specified in kilobytes. There are separate settings for desktops associated with interactive and noninteractive window stations.

            The first SharedSection value (1024) is the shared heap size common to all desktops. It is unlikely that you would ever need to change this value.

            The second SharedSection value (3072) is the size of the desktop heap for each desktop that is associated with the "interactive" window station. It is unlikely that you would ever need to change this second SharedSection value.

            The third SharedSection value (512) is the size of the desktop heap for each desktop that is associated with a "noninteractive" window station. If this value is not present, the size of the desktop heap for noninteractive window stations will be same as the size specified for interactive window stations (the second SharedSection value).

            This section of the heap is used to keep track of the processes that are running without graphical user interfaces. Each running Equation Library is a process that is managed through the settings in this heap. Increasing this value will increase the maximum number of libraries that you can run simultaneously. We typically suggest a setting of 1024.

            We suggest that you research and understand the impliciations of making any registry changes. You can read more about desktop heap and this registry setting at Microsoft Q184802.
            Updated: 28 Mar 2019 11:33 PM
            Helpful?  
            Help us to make this article better
            0 0