Sunteți pe pagina 1din 8

Improve performance for IBM Operational Decision

Manager, Part 3: Reduce response times for hosted


transparent decision services
U. Siddiqui (usiddiqu@us.ibm.com)
Software Engineer
IBM

20 May 2015

IBM Operational Decision Manager (ODM) offers a variety of options for optimal performance.
Each organization's environment and needs are unique, so guidance about settings to increase
performance and to streamline resource management is essential. As part 3 in a series, this
tutorial provides recommended settings for addressing performance issues encountered when
working with hosted transparent decision services.
View more content in this series

Introduction
This tutorial is the third in a series to guide you through the configuration of IBM ODM modules,
environment, and applications for optimal performance of rule execution on Rule Execution Server.
The first tutorial, Improve performance for IBM Operational Decision Manager, Part 1: Reduce rule
execution time, introduces the IBM ODM components and addressed configurations to shorten
ruleset execution time. The second tutorial, Improve performance for IBM Operational Decision
Manager, Part 2: Reduce rule execution resource consumption, addresses the performance issues
encountered on the Rule Execution Server. This tutorial addresses how to reduce response times
for hosted transparent decision services.

Try the Business Rules service


Spend less time recoding and testing when the business policy changes. The Business
Rules service from Bluemix minimizes your code changes by keeping business logic
separate from application logic. Try it for free!

This tutorial applies to IBM ODM versions 7.5 and later, except when discussing a specific
behavior relevant to a specific version. Configurations shown in the tutorial use IBM ODM
V8.7, the most recent version at the time of publication. Note that default values for certain
configurations vary between versions. Verify the configurations for the version that you are working
with in the product documentation. To take advantage of customer fixes and features, make sure
that you have installed the latest fix packs on the versions that you are working with.
Copyright IBM Corporation 2015
Improve performance for IBM Operational Decision Manager,
Part 3: Reduce response times for hosted transparent decision
services

Trademarks
Page 1 of 8

developerWorks

ibm.com/developerWorks/

Recommendations to reduce response time for hosted transparent


decision services
You can choose to expose a ruleset as a web service, when your application is remote. Requests
to Rule Execution Server are carried by the HTTP protocol. A transparent decision service handles
requests between the application and Rule Execution Server, as shown in Figure 1.

Figure 1. A transparent decision service environment

You can implement the servlet with two types of transparent decision services: a monitored
transparent decision service, or a hosted transparent decision service provided by Decision
Server. See Transparent decision services in the IBM ODM documentation.
A hosted transparent decision service is an execution component that is linked to a ruleset path
through a Java Management Extensions (JMX) management bean (MBean). You can make
rulesets available as web services without any code deployment, and invoke the rules using a web
request, as a SOAP/XML web service or as a REST web service. Traditionally, only XML XOMs
were used with hosted transparent decision services, however, starting with IBM ODM V8.x, a
Java XOM can also be used with hosted transparent decision services. See Hosted transparent
decision services in the IBM ODM documentation.
Performance problems when working with hosted transparent decision services mostly consist of
slow response times for the web requests. Users might have to wait minutes for requests to be
processed. The response time might degrade as the number of simultaneous invocations increase.
The invocations also might fail with SocketTimeOutErrors.
It is helpful to gather diagnostics information from the following locations:
The Rule Execution Server console Explorer tab under Service information. You can obtain
statistics on the ruleset that was executed through the transparent decision service. JMX
MBeans also can read these statistics.
The res-decisionservice.log, after adding
log4j.logger.ilog.rules.res.decisionservice.web.IlrWebServiceServlet=DEBUG,
Improve performance for IBM Operational Decision Manager,
Part 3: Reduce response times for hosted transparent decision
services

Page 2 of 8

ibm.com/developerWorks/

DS_LOG_FILE
log4j.lcf.

developerWorks

to jrules-res-htds-WAS8.ear/jrules-res-htds.war/WEB-INF/classes/

The web server (IBM HTTP Server) logging.


This information will help determine if the delay is due to long ruleset execution time or other
factors. Analyze how many concurrent clients target hosted transparent decision services
simultaneously and how often, how many different rulesets are being executed, and if the web
requests are intermittently slow (indicating delay due to the parsing of a ruleset that was flushed
from the cache.)
Follow the recommendations in Part 1 and Part 2 of this series to improve ruleset parsing and
execution time and to reduce memory and CPU consumption. Disable the decision trace, or
reduce the decision trace size if tracing is enabled (see the Decision trace information section in
the Viewing or downloading an HTDS description file topic in the IBM ODM documentation.) In
addition, reduce the response time for hosted transparent decision services by making changes to
the ruleset design, server configuration, and application design, as summarized in Figure 2.

Figure 2. Recommendations for reducing response time for hosted


transparent decision services

Ruleset design changes


Apply the following changes to the ruleset design:
If you are working with an XML XOM, by default, the
ruleset.xmlDocumentDriverPool.maxSize property value is set to 1, which could cause a
performance bottleneck if several clients execute a hosted transparent decision service
concurrently. Increase the value to the number of concurrent executions of the ruleset. For
example, if you have five concurrent clients, change the value to 5.
Reduce the number of currently active ruleset versions deployed, and manage the
deployment behavior using ruleset.maxIdleTime, as discussed in the Ruleset design
changes section under Recommendations to reduce high memory utilization in Part 2.

Server configuration changes


Configure the server using the following guidelines:
Improve performance for IBM Operational Decision Manager,
Part 3: Reduce response times for hosted transparent decision
services

Page 3 of 8

developerWorks

ibm.com/developerWorks/

1. If you are working with IBM ODM V8.7 or later, consider deploying the rules on the Rule
Execution Server on Liberty V8.5.5.3 to take advantage of the small footprint. The Liberty
server can host the Rule Execution Server console, transparent decision services, and testing
and simulation. See Configuring Rule Execution Server on the Liberty profile in the IBM ODM
documentation.
2. Configure timeouts in the following ways:
Decrease the HTTP request timeout for the Web Server, to time out a web request in a
reasonable time, in case a ruleset parsing is invoked. In IBM HTTP Server, you should
configure ServerIOTimeout. See the Recommended values for web server plug-in config
support document for more details.
Increase the HTTP socket connection timeout for the Application Server, to avoid
HTTP socket timeout before the web service completely reads the SOAP request. In
WebSphere Application Server, configure ConnectionIOTimeout.
Make sure that the HTTP socket connection timeout for the Application Server is less
than the HTTP request timeout for the Web Server.
3. Use application server-specific settings to constrain the number of concurrent threads. For
example, if the Rule Execution Server is deployed on WebSphere Application Server, reduce
the Web Container thread pool maximum size application server setting to constrain the
number of threads that can be actively executing incoming HTTP requests at any given time.
4. Check the application server settings for web container tracing. For example, if you are
working with WebSphere Application Server, make sure that the following settings are
removed from the Change log detail levels window: com.ibm.ws.webcontainer.*=all and
com.ibm.ws.webcontainer.srt=all

Application design changes


On the client side, consider the following settings:
1. When using hosted transparent decision services, setting the asynchronousRulesetParsing
XU property to true does not have the intended effect of executing an older version of a
ruleset while the newer one is being parsed. Instead, if a new ruleset version has been
deployed, the next request to the ruleset triggers the parsing of the new ruleset version, must
to wait for the parsing to complete, unless the hosted transparent decision service request is
specifically invoked for an existing ruleset version that is already in memory.
Therefore, you should design the application to parse rulesets and any new ruleset versions
before they are invoked. The first time a ruleset version is run, it is parsed if it is not already
in memory. You might incur long waits or timeouts if your web request triggers the parsing of
either a new ruleset version or an existing version that was flushed out of the cache.
To eliminate the ruleset parsing time incurred for the first ruleset execution, run a "dummy"
request of newly deployed rulesets. Wait for this request to complete before running the "real"
requests of the rulesets through hosted transparent decision services, to avoid timeout during
ruleset parsing.
You can use a script like cURL for sequential dummy requests for each ruleset version.
This will constrain the memory consumption during ruleset parsing, since each ruleset will
be parsed sequentially. You should invoke a dummy request to trigger the parsing of every
Improve performance for IBM Operational Decision Manager,
Part 3: Reduce response times for hosted transparent decision
services

Page 4 of 8

ibm.com/developerWorks/

developerWorks

ruleset (and version) that could be invoked through a web request. For this reason, you
should also reduce the number of currently active ruleset versions that are deployed.
2. As previously stated, when using hosted transparent decision services,
asynchronousRulesetParsing=true does not have the intended effect of executing an older
version of a ruleset while the newer one is being parsed. However, it is possible to use
an interceptor to invoke IlrSessionRequest.setForceUptodate(false), which allows the
execution of an older version of the ruleset while the newer version is being parsed.
public class Interceptor implements IlrSessionInterceptor {
public void beforeExecute(IlrInterceptorContext ctx)
throws IlrSessionInterceptorException {
ctx.getRequest().setForceUptodate(false);
}
public void afterExecute(IlrInterceptorContext ctx)
throws IlrSessionInterceptorException {
}
public IlrPath transformRsPath(IlrPath path, IlrRuleAppInformation arg1, Serializable
arg2, Map <String, Object> arg3,
IlrSessionFactory arg4)
throws IlrSessionInterceptorException {
return path;
}
}

3. Reduce the client application overhead. Compare the execution performance you see in
your application with the performance while invoking hosted transparent decision services
through SoapUI, an open source cross-platform functional testing solution. This reveals if
the performance problem is in the application harness, and not with the hosted transparent
decision services invocation.
The use of SoapUI is especially applicable for load tests. For guidance on using SoapUI for
load tests, see Using SoapUI for load testing on the SoapUI website. You can also use a Java
profiler to diagnose performance issues with multi-threaded applications and analyze where
the time is spent in the test programs. For example, the performance degradation could be
due to a test harness issue with the HTTP client library that is used, not an issue the hosted
transparent decision service request itself.
4. Reduce the networking and security overhead for each web request. Measure the network
latency and review any firewalls or security mechanisms that might be increasing the
response time for the web requests.
For additional guidelines for performance improvement, see the following resources:
The IBM ODM documentation at Overview: What affects the performance of a Decision
Server application
The presentation Design and Develop an IBM ODM application to optimize Performance
Chapters 6, 7 and 8 in the IBM Operational Decision Management V8.0 Performance Tuning
guide
The Tuning Decision Server Rules section in the Performance: How to fine-tune your IBM
ODM solution presentation.

Improve performance for IBM Operational Decision Manager,


Part 3: Reduce response times for hosted transparent decision
services

Page 5 of 8

developerWorks

ibm.com/developerWorks/

Conclusion
This tutorial described recommended practices for configuring IBM ODM, and the rules and
client applications, to reduce response time for hosted transparent decision services. You can
choose the settings that are most applicable to your needs and customize your applications and
environments accordingly. Before you incorporate these recommendations, make sure you read
Part 1 and Part 2 of this IBM ODM performance series.

Acknowledgements
The author would like to thank Franck Delporte, Alain Robert, and Pierre Berlandier for their review
and contributions to this tutorial. Additional appreciation goes to the IBM ODM technical resolution
teams - including Level 2, Level 3, and research and development teams - and the authors of the
referenced documents.

Improve performance for IBM Operational Decision Manager,


Part 3: Reduce response times for hosted transparent decision
services

Page 6 of 8

ibm.com/developerWorks/

developerWorks

Resources
Improve performance for IBM Operational Decision Manager, Part 1: Reduce rule execution
time
Improve performance for IBM Operational Decision Manager, Part 2: Reduce rule execution
resource consumption
IBM Operational Decision Manager V8.7 documentation on IBM Knowledge Center
Design and Develop an IBM ODM application to optimize Performance (InterConnect 2015
presentation)
Performance: How to fine-tune your IBM ODM solution
IBM Operational Decision Management V8.0 Performance Tuning guide
Improve performance of ODM modules (dW Answers)
Rule Execution Server engine pool sizing (technote)
cURL
Why is asynchronousRulesetParsing=true not effective with HTDS (dW Answers)
Using SoapUI for load testing
Recommended values for web server plug-in config (technote)
IBM Operational Decision Manager product page
Top 10 editor's picks for IBM Operational Decision Manager
IBM Operational Decision Manager Developer Center
developerWorks Business process management zone

Improve performance for IBM Operational Decision Manager,


Part 3: Reduce response times for hosted transparent decision
services

Page 7 of 8

developerWorks

ibm.com/developerWorks/

About the author


U. Siddiqui
U. Siddiqui is a software engineer who has worked closely with IBM Operational
Decision Management customers on technical resolution issues for a number of
years, during which she has gained extensive insight into how enterprise customers
use these products and integrate them into their environments.
Copyright IBM Corporation 2015
(www.ibm.com/legal/copytrade.shtml)
Trademarks
(www.ibm.com/developerworks/ibm/trademarks/)

Improve performance for IBM Operational Decision Manager,


Part 3: Reduce response times for hosted transparent decision
services

Page 8 of 8

S-ar putea să vă placă și