Change Memory Configuration for Gateway Process

The gateway is designed to start with one of two configurations:
gateway83
The 
CA API Gateway
 is designed to start with one of two configurations:
  • Hardware appliances with 4GB memory or less:
    2/3 of the available memory, up to 2 GB
  • Hardware appliances with 8 GB memory or more:
      4GB of memory
The hardware Gateway appliance is not configured to start with more than 4 GB of memory dedicated to the internal Gateway process, due to limitations of the nShield HSM. Virtual environments do not have this restriction, therefore you can configure the Gateway to use more than 4 GB of memory for improved performance.
To change the memory on the Virtual Appliance:
  1. Start the image and log in as the root user.
  2. Open the following file in a text editor:
    /opt/SecureSpan/Gateway/runtime/etc/profile.d/appliancedefs.sh
  3. Locate the following section in the file:
    system_ram=`grep MemTotal /proc/meminfo |cut -c 15-23`
    # Maximum amount of RAM to use
    multiplier="2/3"
    #
    let java_ram="$system_ram*multiplier"
    #if we have a lot of ram, we need to check whether we are enabled to use it or not.
    if [ `expr $java_ram \> 2074412` == 1 ] ; then
        if [ $usebigmemory -eq 1 ]; then
                # we have more ram than java can use
                # FIXME: when we start running 64 bit JVM
                java_ram=2074412;
                # CAP at 2 gigs
        else
            java_ram=4194304;
        fi
    fi
  4. Comment out the entire if/fi block.
  5. Save and exit the file.
  6. Restart the Gateway.
The Gateway process now uses 2/3 of the memory allocated to it, regardless of how much memory is allocated to the image in ESX/vSphere.
Do not alter the 2/3 multiplier. This ensures that there is sufficient memory available to run the remainder of the components in the virtual appliance.