Recommended Memory Allocation for Proxy

What is the recommended memory allocation for Security Server's proxy component with respect to the host's available memory?

The recommended memory allocation for proxy depends on the amount of RAM available on the host. In addition, also the type of host (virtual, physical etc.) and usage patterns of the Security Server effect on the most optimal amount of memory. The table below shows general recommendations regarding the amount of memory allocated for the proxy component.

RAM on host (GB)

PROXY_PARAMS value

RAM on host (GB)

PROXY_PARAMS value

4

-Xms200m -Xmx512m

8

-Xms512m -Xmx2g

16

-Xms2g -Xmx8g

31

-Xms2g -Xmx16g

The default memory allocation for proxy is only -Xms100m -Xmx512m. In production environments the allocation should be increased.

Please note that the step-by-step guides differ between X-Road 6 and X-Road 7. Therefore, it's extremely important to choose the right guide.

More information about the differences is available here.

Step-by-step guide for X-Road 7

Memory allocation for proxy can be customized modifying /etc/xroad/services/local.properties configuration file

Proxy's default configuration is stored in /etc/xroad/services/proxy.conf which is always overwritten on version updates. Therefore, /etc/xroad/services/local.properties must be used for overriding default configuration as the file is not overwritten during version updates. By default, /etc/xroad/services/local.properties file is empty.

  1. Open /etc/xroad/services/local.properties file for editing and make your changes on XROAD_PROXY_PARAMS variable value. For example, configuration of dynamic memory allocation of 200 - 2000 MB (heap, max memory 2000 MB, min memory 200 MB):

    XROAD_PROXY_PARAMS=-Xms200m -Xmx2000m

    The size of the metaspace can be adjusted changing the value of MaxMetaspaceSize parameter. The value can be increased to 160m (-XX:MaxMetaspaceSize=160m), if needed.

  2. Save the /etc/xroad/services/local.properties file after making the required changes.

  3. Restart the xroad-proxy service.

    systemctl restart xroad-proxy

Step-by-step guide for X-Road 6

Memory allocation for proxy can be customized modifying /etc/xroad/services/local.conf configuration file

  1. Open /etc/xroad/services/local.conf file for editing and make your changes on PROXY_PARAMS variable value. For example, configuration of dynamic memory allocation of 200 - 2000 MB (heap, max memory 2000 MB, min memory 200 MB):

    PROXY_PARAMS="$PROXY_PARAMS -Xms200m -Xmx2000m "

    The size of the metaspace can be adjusted changing the value of MaxMetaspaceSize parameter. The value can be increased to 160m (-XX:MaxMetaspaceSize=160m), if needed.

  1. Save the /etc/xroad/services/local.conf file after making the required changes.

  2. Restart the xroad-proxy service.