Configuring heap memory size on the Qpid servers

You're viewing Apigee Edge documentation.
Go to the Apigee X documentation.
info

Apigee Edge's Qpid server is a Java-based component and uses a default heap memory size of 512 MB. However, the default heap memory size may not be sufficient for all use cases on Apigee Edge. You may need to tune the heap memory size for your Qpid servers depending on your traffic and processing requirements or to address any memory-related issues.

The heap memory size of a Java application is controlled through the Java command line parameters -Xms (minimum heap size) and -Xmx (maximum heap size). On the Apigee Edge Qpid servers, these are controlled through the properties bin_setenv_min_mem and bin_setenv_max_mem. You can read more about these properties in Modifying Java memory settings.

This document explains how to configure the heap memory size on Apigee Edge’s Qpid servers.

Before you begin

Changing heap memory on the Qpid servers

This section explains how to change heap memory size on the Qpid servers. Minimum and maximum heap memory can be configured through the properties bin_setenv_min_mem and bin_setenv_max_mem on the Qpid server component.

To change heap memory size on the Qpid servers, perform the following steps:

  1. Open the /opt/apigee/customer/application/qpid-server.properties file on the Qpid server machine in an editor. If the file does not already exist, then create it. For example:
    vi /opt/apigee/customer/application/qpid-server.properties
  2. Add the following lines to this file:
  3. bin_setenv_min_mem=minimum_heap_in_megabytes
    bin_setenv_max_mem=maximum_heap_in_megabytes

    For example, If you want to change minimum and maximum heap on the Qpid server to 1 GB and 2 GB respectively, then add the following lines to this file:

    bin_setenv_min_mem=1024m
    bin_setenv_max_mem=2048m
  4. Save your changes.
  5. Ensure this properties file is owned by the apigee user. For example:
    chown apigee:apigee /opt/apigee/customer/application/qpid-server.properties
  6. Restart the Qpid server using the following command:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
  7. If you have more than one Qpid server, repeat these steps on all the Qpid servers.

Verifying heap memory configuration on the Qpid servers

This section explains how to verify if the heap memory changes have been successfully modified on the Qpid servers.

Even though you used the properties bin_setenv_min_mem and bin_setenv_max_mem to change the heap memory size on the Qpid server, you need to verify that the actual Java command line parameters -Xms and -Xmx have been set with the new values as follows:

  1. Search to see if the command line parameters -Xms and -Xmx have been set with the new values for the Qpid server using the following command:
    ps -ef | grep qpid-server | egrep -o 'Xms[0-9a-z]+|Xmx[0-9a-z]+' | tr '\r' ' '
  2. If the minimum and maximum heap memory have been changed on the Qpid server, then the previous command shows the new value listed for -Xms and -Xmx.

    The sample result from the previous command, after you have changed the minimum and maximum heap on the Qpid server, is as follows:

    Xms1024m
    Xmx2048m

    In the example output, note that the new values for minimum and maximum heap have been set.

  3. If you still see the old values for -Xms and -Xmx, then verify that you have followed all the steps outlined in Changing heap memory size on the Qpid servers correctly. If you have missed any step, repeat all the steps again correctly.
  4. If you are still not able to change heap memory, then please contact Apigee support.

What's next?

Configuring heap memory size on Message Processors