Connector agents that were designed in Java to be multi-threaded can perform concurrent processing of multiple threads without additional configuration of the connector agent. Additionally, some connectors that were not designed for multi-threading can be configured to use a feature called Connector Agent Parallelism (CAP), which enables a connector to run as multiple connector processes to handle multiple requests. Connector Agent Parallelism instantiates multiple processes in parallel from a single connector agent master process, making it possible to process flows concurrently rather than serially.
Use of Connector Agent Parallelism in the IBM WebSphere InterChange Server business integration system is configurable through the "Resources" tab in Connector Configurator. Because the use of concurrent processing for connector agents may bring performance benefits in some circumstances but not in others, the default behavior for connector agents is to use serial processing. Before changing the default setting, you should consult the IBM Business Integration Adapters documentation for the specific connector, analyze the application itself to determine whether its architecture or requirements would prevent effective use of concurrent processing, and consider how you can most effectively utilize the resources available in your specific environment. You should test any change you make in this setting before implementing it in a production environment.
Typically, you should consider using Connector Agent Parallelism in the following circumstances:
Even if a connector falls into one of the above categories, there may be circumstances where you would probably not want to use Connector Agent Parallelism:
To change settings for use of connector agent parallelism, start Connector Configurator and choose the "Resources" tab. The "Resources" tab is shown in Figure 105:
Figure 105. Configuring values on the "Resources" tab
Set the values of the Resources tab for either serial or concurrent processing.
If you change the value from 1 to a higher value, or from a higher value to one, you must reboot the connector agent for the change to take effect. If the value is already higher than one, you can change to another value higher than one dynamically.
By default, connector definitions are configured with the Parallel Process Degree property set to the value 1, causing them to use serial processing. When the Parallel Process Degree property is set to 1, all other values in the window are set to 0.
Do the following to configure a connector to use concurrent processing:
Call-triggered flows are synchronous and are initiated by access clients, which expect a response to be returned for their request. If the connector will be processing call-triggered flows and event-triggered flows, you might want to dedicate more slave processes to the call-triggered flows so that the initiating programs receive as quick a response as possible.
You can either accept the default values, or you can enter the minimum number and maximum number of processes that you want to devote to each type of request. Note that the sum of the maximums for both types of request cannot exceed the value of the Parallel Process Degree property. Also, the minimums cannot exceed the maximums.
To make effective use of Connector Agent Parallelism, coordinate the Parallel Process Degree value of the connector agent with the Maximum Number of Concurrent Events values in the collaboration objects that send requests to the connector agent. If only one collaboration sends requests to this connector agent, set the Maximum Number of Concurrent Events for the collaboration to a value no lower than the Parallel Process Degree value of the connector agent. If multiple collaborations send requests to this connector agent, set the Parallel Process Degree value equal to the sum of the Maximum Number of Concurrent Events values of the collaborations.
If you are using a connector that has Java Virtual Machine (JVM) heap/stack size parameter values that are other than the defaults shown below, you will need to edit the configuration file for the connector. The JVM values that you set in the connector configuration file will be propagated from the connector agent master to the slave processes. To edit these values, use an XML editor to open the InterchangeSystem.cfg file, or the local connector agent configuration file if you are using a local file, and edit the values under the JVM <connector_name> section.
The JVM parameters and their corresponding Java VM options are:
MIN_HEAP_SIZE (-Xms) MAX_HEAP_SIZE (-Xmx) MAX_NATIVE_STACK_SIZE(-Xss)
By default, the following values are used:
MIN_HEAP_SIZE=1m MAX_HEAP_SIZE=128m MAX_NATIVE_STACK_SIZE=128k
You may need to set different values for your connector. For example, you might set the following values in the JVM section of the configuration file
[JVM SAPConnector] MIN_HEAP_SIZE=256m MAX_HEAP_SIZE=512m MAX_NATIVE_STACK_SIZE=1m