Tuning AQ for Oracle ESB
If you are using AQ within Oracle ESB there might be a point in time you want to tune AQ performance. In this post you’ll find the results of Metalink research, and our experience on a production system.
Queue compatibility
When creating the ORAESB schema (in version 10.1.3.3) using the script $ORACLE_HOME/integration/esb/sql/oracle/create_esb_topics.sql, the queues are created with 8.1 compatibility. This is solved in 10.1.3.4. To alter this find the statement
1 2 3 4 5 6 | dbms_aqadm.create_queue_table ( Queue_table => qtablename , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE' , multiple_consumers => true , compatible => '8.1' ); |
and change this to:
1 2 3 4 5 6 | dbms_aqadm.create_queue_table ( Queue_table => qtablename , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE' , multiple_consumers => true , compatible => '10.2' ); |
if you already created the queues, use this statement:
1 2 3 4 | dbms_aqadm.migrate_queue_table ( queue_table => 'ESB_JAVA_DEFERRED' , compatible => '10.2' ); |
If you’re not sure check the compatibility with this query:
1 2 3 4 5 6 | SELECT queue_table , compatible , recipients FROM dba_QUEUE_tables WHERE owner = 'ORAESB' ; |
Streams pool size
Verify the current stream_pool_size using the following query:
1 2 3 4 5 6 7 | SELECT component , current_size/1024/1024 "CURRENT_SIZE" , min_size/1024/1024 "MIN_SIZE" , user_specified_size/1024/1024 "USER_SPECIFIED_SIZE" , last_oper_type "TYPE" FROM v$sga_dynamic_components ; |
look for the streams pool. There are several Metalink notes on this setting (including 316889.1, 102926.1 and 335516.1). The latter has a general recommandetion per RDBMS version:
- 11g: set STREAMS_POOL_SIZE to be greater or equal to 100 MB;
- 10gR2: set SGA_TARGET > 0 and STREAMS_POOL_SIZE=0 to enable autotuning of the Streams pool;
- 10gR1: use the STREAMS_POOL_SIZE init.ora parameter to configure the Streams memory allocation;
And of course you could use V$STREAMS_POOL_ADVICE to get advice for your specific situation.
Upgrade the JDK
A described here upgrading the JDK can also give a performance boost.
Advanced Queueing, AS, Database, ESB, Fusion Middleware, JVM, Messaging, Oracle, SOA Suite