Tuning the EAI JMS Transport

Two tuning parameters are provided for JBS (Java Business Service) and JMS (Java Message Service). You can set these parameters in applicationcontainer_internal\webapps\configagent.properties in the Siebel CRM installation.

  • JBSSessKeepAlive. Specifies the time interval (in seconds) at which the connection clean-up thread runs. The default value is 1800 seconds (30 minutes). The suggested value is the maximum time that the system takes to process or dispatch a single message, plus some HTTP communication time between the Siebel process and the Apache Tomcat process for the application container. This ensures that connections are not removed while a message is being processed or dispatched, which could lead to queue rollback and duplicate messages.

  • JBSSessEvictPerRun. Specifies the number of idle connections objects that the clean-up thread must try to evict in each clean-up run. The value must be a positive number. The default value is 20. Ideally, the value is equal to the maximim number of JMS tasks that run on that server, so that all connections are properly cleaned up.

To set these parameters, do the following (values are examples only):

  1. For each application container, edit applicationcontainer_internal\webapps\configagent.properties and add these two lines to the end of the file:

    JBSSessKeepAlive = 30 (seconds)
    JBSSessEvictPerRun = 100 (number of idle connections)
  2. Restart the application container.

After you configure these parameters (with the example values):

  • Every 30 seconds, Apache Tomcat runs an eviction thread to close idle connections to MQ Receiver or JMS Receiver.

  • Tomcat closes idle connections that have been idle for more than 30 seconds, to a limit of 100 connections.

    • At 30 seconds, Tomcat does nothing, because no connections have been idle for 31 secs. However, at 60 seconds, Tomcat will likely find connections that have been idle for 31 or more seconds. This process repeats itself every 30 seconds.

    • If there are fewer than 100 idle connections, then Tomcat closes all of them. If there are more than 100 idle connections, then Tomcat stops at 100 and leaves the rest for the next run.

These settings are just an example. Tune these parameters according to the loads experienced in your environment, striving for an appropriate balance:

  • For JBSSessKeepAlive, values that are too high yield more idle connections, leaving less room for new connections. Values that are too low lead to early closing of connections (even though connections could have been reused), leading to increased cycles of opening and closing, and consuming more CPU due to increased clean-up cycles.

  • For JBSSessEvictPerRun, values can be as high as the Maximum Tasks (MaxTasks) value for that server (cumulative of the JMS Receiver plus any other process that connects to the JMS server). If you set this parameter on the higher end (such as equal to MaxTasks), then all connections are considered for clearing if they are idle.