OSB Performance Tuning – RouterRuntimeCache

Oracle Service Bus (OSB) uses the Router Runtime Cache to optimize message processing by 

storing frequently accessed data (like XSLT, XQuery, WSDLs, and routing rules) in memory. 

Proper tuning of this cache can significantly improve throughput and reduce latency.

Key Aspects of Router Runtime Cache


1. Purpose

  • Reduces Backend Calls: Caches external resources (WSDLs, XSDs, XQuery) to avoid repeated fetches.


  • Improves Speed: Stores compiled transformations (XSLT, XQuery) to skip recompilation.


  • Minimizes Overhead: Avoids repeated parsing of static routing rules.



2. Cache Types in OSB


Cache TypeDescriptionTuning Parameter
Static CacheCaches immutable resources (WSDLs, XSDs).xpath-cache-sizewsdl-cache-size
Dynamic CacheStores runtime objects (XQuery, XSLT).transformation-cache-size
Route CacheCaches routing decisions for repeated requests.route-cache-size

Performance Tuning Parameters:


1. Cache Sizing (in config.xml or WLST)


<server>
  <osb-config>
    <route-cache-size>1000</route-cache-size> <!-- Default: 1000 routes -->
    <xpath-cache-size>500</xpath-cache-size>  <!-- Default: 500 XPath entries -->
    <transformation-cache-size>200</transformation-cache-size> <!-- Default: 200 -->
  </osb-config>
</server>


Too Small: Causes frequent cache evictions → Slower performance.

Too Large: Consumes excess heap → Risk of OutOfMemoryError

2.Cache Refresh Strategies

Time-to-Live (TTL):

export WS_CACHE_REFRESH_INTERVAL=3600 # Refresh cache every hour

Manual Flush (via WLST):

flushOSBCache(domain='soa_domain', server='osb_server1')


3.Monitoring Cache Efficiency

Via Enterprise Manager:

OSB Performance Dashboard → Check Cache Hit Ratio (ideal: >90%).

Log Analysis:

grep "CacheMiss" $DOMAIN_HOME/servers/osb_server1/logs/osb.log

Comments

Popular posts from this blog

Interview question for File and FTP Adapter

What is boot.properties file and how to create

SSL Exceptions in Admin Server and Node Manager.