SAP Pool capacity and peak limit-Mule esb

2.1k Views Asked by At

Hi am having an SAP connector and SAP is sending 10,000 idocs parallel what can be the good number I can give in Pooling capacity and Peak limit,Now I have given 2000 and 1000 respectively any suggestion for better performance

<sap:connector name="SAP" jcoAsHost="${saphost}" jcoUser="${sapuser}" jcoPasswd="${sappassword}" jcoSysnr="${sapsystemnumber}" jcoClient="${sapclient}" jcoLang="${saploginlanguage}" validateConnections="true" doc:name="SAP" jcoPeakLimit="1000" jcoPoolCapacity="2000"/> 
1

There are 1 best solutions below

0
On BEST ANSWER

When dealing with big amounts of IDocs, the first thing I recommend to improve performance is to configure the SAP system to send IDocs in batches instead of sending them individually. That is, the IDocs are sent in groups of X number you define as a batch size in the Partner Profile section of SAPGUI. Among other settings, you have to set "Pack. Size" and select "Collect IDocs" as Output Mode.

enter image description here

If you are not familiar with SAPGUI, request your SAP Admin to configure it for you.

Aditionally, to extract the most out of the connection pooling from the SAP connector, I suggest you use SAP Client Extended Properties to get full advantage of JCo additional connection parameters. These extended properties are defined in a Spring Bean and set in jcoClientExtendedProperties at connector or endpoint level. Take a look at the following example:

<spring:beans>
<spring:bean name="sapClientProperties" class="java.util.HashMap">
      <spring:constructor-arg>
          <spring:map>
              <!-- Maximum number of active connections that can be created for a destination simultaneously -->
              <spring:entry key="jco.destination.peak_limit" value="15"/>
              <!-- Maximum number of idle connections kept open by the destination. A value of 0 has the effect that there is no connection pooling, i.e. connections will be closed after each request.  -->
              <spring:entry key="jco.destination.pool_capacity" value="10"/>
              <!-- Time in ms after that the connections hold by the internal pool can be closed -->
              <spring:entry key="jco.destination.expiration_time" value="300000"/>
              <!-- Interval in ms with which the timeout checker thread checks the connections in the pool for expiration -->
              <spring:entry key="jco.destination.expiration_check_period" value="60000"/>
              <!-- Max time in ms to wait for a connection, if the max allowed number of connections is allocated by the application -->
              <spring:entry key="jco.destination.max_get_client_time" value="30000"/>
          </spring:map>
      </spring:constructor-arg>
  </spring:bean>
</spring:beans>

<sap:connector  name="SAP" 
        jcoAsHost="${sap.jcoAsHost}" 
        jcoUser="${sap.jcoUser}" 
        jcoPasswd="${sap.jcoPasswd}" 
        jcoSysnr="${sap.jcoSysnr}" 
        jcoClient="${sap.jcoClient}" 
        ...
        jcoClientExtendedProperties-ref="sapClientProperties" />         

Important: to enable the pool it is mandatory that you set the jcoExpirationTime additionally to the Peak Limit and Pool Capacity.

For further details, please refer to SAP Connector Advanced Features documentation.