User Tools

Site Tools


Java and memory-related tasks

EASA is a Java application, and it uses Tomcat8.

A customer may wish to modify the default settings such as:

  • Service name
  • Desktop heap size
  • Java initial and maximum heap size for an EASAP/Excel Server
  • Java maximum heap size for EASAP Builder

Windows

The EASA Server service Tomcat8 is installed automatically by the installer.

Rename the EASA Tomcat service

Tomcat8 is the default name when EASA is installed to run as a Windows service.

To rename the service:

  1. Execute <EASAROOT>\tomcat\bin\uninstallservice.bat
  2. Open <EASAROOT>\tomcat\bin\serviceName.properties
  3. Change the text in the file to the new name then save
  4. Update the filename <EASAROOT>\tomcat\bin\tomcat8w.exe to reflect the new service name (append 'w.exe')
    • ie. if the new name is 'Tomcat1234' the file needs to be 'tomcat1234w.exe'
  5. Execute <EASAROOT>\tomcat\bin\installservice.bat

Modify EASA's memory usage

A machine running as an Excel Server requires more desktop heap memory than other EASA machines (see below).

An EASAP with a large spreadsheet may require 300 MB or more per simultaneous User using both Excel and Java related resources.

To be clear, both Excel and Java memory requirements grow with spreadsheet size and complexity for an Excel/EASAP Server.

Set the current Java memory setting for an EASA Server at
'EASA > Administrator > System > Diagnostics > Summary > Maximum allowed memory usage'

EASA run as a service, Java heap size

Change the Java intial and max heap size (both default to 2200MB) by running <EASAROOT>\tomcat\bin\tomcat8w.exe: Under EASA Tomcat8 Properties > Java set 'Initial memory pool' and 'Maximum memory pool'

An 'OutOfMemoryError' in the server logs indicates this setting needs to be raised.

EASA run as an application, Java heap size

For EASA run as an application, modify the JAVA_OPTS environment variable:

  1. Go to: Settings > Control Panel > System > Advanced > Environment Variables'
  2. Change '-Xmx2200m' to '-Xmx3000m' to raise max heap memory allocation to 3GB

EASA run as a service, Windows Desktop heap size

  • The size of each desktop heap allocation is controlled by the following registry value,
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

The default data for this registry value in 'regedit.exe' will look something like the following (all on one line),

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows
SharedSection=1024,20480,768 Windows=On 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 (in KB).

  • SharedSection - 1024 is the shared heap size common to all desktops.
    This not a desktop heap allocation, the value should not be modified to address desktop heap problems.
  • SharedSection - 20480 is the size of the desktop heap for each desktop for an interactive window station
    (with the exception of the “Disconnect” and “Winlogon” desktops)
  • SharedSection - 768 is the size of the desktop heap for each desktop “non-interactive” window station.

Set the non-interactive desktop heap (the third value, '768' above) to '4096' to support up to 40 Excel processes.

The third value (768 above) may be increased up to but not to exceed the second value.


Linux

Linux must be manually configured, see Install EASA as a Linux service.

Run EASA as a user other than root

By default, EASA will run as root on a Linux computer. The steps below will configure EASA to run as a different user:

  1. Stop the EASA Server, see Start or Stop EASA
  2. Uncomment and set the RUN_USER variable to the desired user name in <EASAROOT>/tomcat/bin/easa.conf
  3. Add read, write and execute permissions on the installation and data folders.
    For example,
    • sudo chown -R easauser:easauser <EASAROOT>
    • sudo chown -R easauser:easauser <SERVERDATA>
  4. By default EASA runs on port 80 which is not available to a user other than root.
    To turn on port forwarding from 8080 to 80 (for example) edit two files:
  5. In <EASAROOT>/tomcat/bin/easa.conf
    • uncomment and set the CATALINA_IP variable to the IP address of the EASA Server
    • uncomment the EXTERNAL_PORT variable
    • uncomment the INTERNAL_PORT variable
  6. In <EASAROOT>/tomcat/conf/server.xml
    • in the first <Connector> tag set
    • proxyPort to port 80
    • port to port 8080
  7. Start the EASA software on the EASA Server, see Start or Stop EASA

The Linux EASA Server is now configured to run as a user 'easauser'

Memory

To change the EASA maximum memory setting on a Linux computer:

  1. Edit <EASAROOT>/tomcat/bin/easa.sh
  2. Modify JAVA_OPTS (ie. to set a 3GB max allocation is use: -Xmx3000m )

EASAP Builder and Compute Server Config Tool

The Builder and Compute Server Config Tool are combined in a standalone Java application (historically called the 'EASA Client')

To raise the maximum heap allocation modify <EASA_CLIENT>\client\easaclient5x.vmoptions (below)

# Enter one VM parameter per line
# For example, to adjust the maximum memory usage to 512 MB, uncomment the following line:
# -Xmx512m
# To include another file, uncomment the following line:
# -include-options [path to other .vmoption file]

Dependencies calculation for a large EASAP may require up to 4096m.

An 'OutOfMemoryError' in the EASAP Builder logs (eg. C:\Users\<username>\.easa\data\logs ) indicates this setting needs to be raised.

The Java8 max heap size defaults to 25% of the physical system memory.

To find this value heap size and other values:

  1. Open cmd.exe
  2. Run: <EASACLIENT>\jre\bin\java -XX:+PrintFlagsFinal -version
  3. Search for 'MaxHeapSize'