Tuning Parameters

Overview

This section describes the various tuning parameters available for the Partner Platform.

These should be used with care, since they are generally set to a reasonable default value and fiddling with them may simply make a problem or performance worse. However, they can be invaluable in troubleshooting problems and improving performance.

Java Settings

References

The following settings are not specific to Partner, but determined by the Java Platform itself. You should review the documentation on Oracle’s website for more detail.

This reference is particularly useful: http://www.oracle.com/technetwork/java/hotspotfaq-138619.html

Heap Size

The Java Heap Size is the portion of the Java process’ memory allocated to storing data objects. When there is not enough, you will see OutOfMemoryExceptions in the log.

In general, higher is better. More heap means that Java has to garbage collect less often, which speeds up most tasks.

However, this memory is dedicated to the Java process and cannot be used by other processes on the machine, which may cause problems elsewhere. Further, if there is not sufficient physical memory to satisfy the heap setting, Java may issue an OutOfMemoryException or may crash entirely without even noting the log.

The total memory used by a Java process is actually higher, since the heap is only one portion of the process. The Java code itself takes up space, and there are other portions, such as the stack (described next).

Heap size defaults to 64 MB, but can be configured via a file, heapsize.txt, stored in the config/ filesystem as: config/FOO/system/heapsize.txt.

The most specific version of this file will be used - for example, config/seat/system/heapsize.txt will take priority over config/customer/system/heapsize.txt. In general you should only use one of two locations for this file:

  • config/customer/system/heapsize.txt - default for all installations for a customer
  • config/seat/system/heapsize.txt - for the CentralHub, MapPublisher, or other special installations

The file should contain a single number in megabytes, e.g.:

600

means 600 megabytes.

This value is supplied as the standard -Xmx parameter to Java at startup.

Stack Size

The Java Stack Size is the portion of the Java process’ memory allocated to storing thread stacks. When this stack size is exceeded, you will get a StackOverflowException in the log.

Unlike heap size, higher is not generally better. Often the problems that cause stack overflows - large recursive data structures or looping code - will break regardless of how much stack you throw at them. Also, since the stack is managed for each thread, setting this value high can take up an enormous amount of space if there are a large number of threads. In fact, you sometimes have to lower the stack size if there are a large number of threads - see the Hotspot FAQ referenced above. The Partner Hub in particular is highly threaded.

Stack size defaults to 2 MB, but can be configured via a file, stacksize.txt, stored in the config/ filesystem as: config/FOO/system/stacksize.txt.

The most specific version of this file will be used - for example, config/seat/system/stacksize.txt will take priority over config/customer/system/stacksize.txt. In general you should only use one of two locations for this file:

  • config/customer/system/stacksize.txt - default for all installations for a customer
  • config/seat/system/stacksize.txt - for the CentralHub, MapPublisher, or other special installations

The file should contain a single number in megabytes, e.g.:

4

means 4 megabytes.

This value is supplied as the standard -Xss parameter to Java at startup.

PHP Settings

PHP settings can be configured via *.conf files in the directory MasterInstall/config/modules/PHP/.

These must use the syntax for Apache configuration directives rather than that used in php.ini.

Two common settings that may require tuning are:

  • max_execution_time
  • memory_limit

Increase the first value when a PartnerWeb page fails with a PHP timeout error, and increase the second when it fails with a PHP out of memory error.

Default values can be consulted in the PHP module under templates/php_ini.st.

As of this writing defaults are:

  • memory_limit = 128M
  • max_execution_time = 300

Note that you MUST append an “M” suffix to the memory_limit; if you provide a bare number that is interpreted as bytes, not megabytes.

Here is an example that sets the memory limit to 512M:

MasterInstall/config/hub/modules/PHP/memory_limit.conf:

php_value memory_limit 512M

Here is an example that sets the maximum execution time to 500s.

MasterInstall/config/hub/modules/PHP/max_execution_time.conf:

php_value max_execution_time 500

Apache Settings

Apache settings are configured similarly to PHP settings, via *.conf files in the directory MasterInstall/config/modules/Apache/.

We do not currently recommend any tuning settings here, so use at your own risk.

Table Of Contents

Previous topic

Partner System Networking

Next topic

Partner on Microsoft Windows

This Page