Smart Connection Rebalance
Smart Connection Rebalance optimizes Oracle RAC performance by routing connections based on workload patterns. Its recommendation engine offers real-time service placement guidance in Automatic Workload Repository (AWR) and (G)V$ACTIVE_SERVICES.
About Smart Connection Rebalance
The Smart Connection Rebalance feature uses workload and access pattern analytics. It recommends and implements smarter service placement and routing within an Oracle RAC cluster.
Oracle Real Application Clusters (Oracle RAC) offers two options for load balancing: client-side load balancing and server-side load balancing. Sessions connect to an Oracle RAC instance using Single Client Access Network (SCAN) and a user-defined service name. You can configure a service to run on all or a subset of Oracle RAC instances. By default, SCAN redirects the sessions to the local listener. The SCAN listener directs a connection request to the best instance that currently hosts the service. The redirection is based on the -clbgoal and -rlbgoal settings for the service.
Smart Connection Rebalance minimizes resource conflicts. It ensures that workloads accessing similar objects are directed to a minimal set of instances. These workloads benefit from reduced inter-instance network messages and reduced data block transfers over the private network. This feature ensures optimal load balancing and performance.
This feature performs real-time monitoring of different workloads and attempts to transparently relocate service-based connections across Oracle RAC instances. This relocation significantly improves database performance.
Note:
The connection relocation is automatic. It does not require database administrators to manually distribute the sessions.
Related Topics
About Smart Connection Rebalance Recommendation
The Smart Connection Rebalance Recommendation engine provides real-time placement advice in the Automatic Workload Repository (AWR) report and the (G)V$ACTIVE_SERVICES view.
The Smart Connection Rebalance Recommendation engine optimizes workload distribution and enhances performance in Oracle Real Application Clusters (Oracle RAC) environments. The engine continuously analyzes the activity of each database service. It assesses whether enabling the Smart Connection Rebalance feature at the service level can deliver measurable improvements. These improvements include better throughput and response times.
This engine leverages advanced monitoring to evaluate how connections associated with the workloads interact with data blocks and shared resources. Based on this, the engine recommends the optimal placement for the workloads on the database instances. This process helps reduce contention and balance workloads across the Oracle RAC cluster. Connections are grouped by attributes such as service name and application name, forming smart connection groups. The engine automatically identifies connection groups and recommends their optimal placement on cluster instances. This process helps reduce contention and balance workloads across the Oracle RAC cluster.
The engine generates actionable recommendations. You can view these in AWR reports or see them directly in the (G)V$ACTIVE_SERVICES view. The SMART_CONN_RECOMMENDATION column in the (G)V$ACTIVE_SERVICES view provides DBAs with clear, real-time guidance to tune connection distribution and service placement.
By following these recommendations, DBAs can confidently adjust service-level settings to make full use of Oracle RAC's scalability and performance features. This results in strategic routing of client connections, improved database responsiveness, and more efficient use of resources across cluster nodes. It helps DBAs balance workloads, reduce contention, and improve resource utilization across database instances.
The following tables show examples of Smart Connection Rebalance recommendations in AWR.
Table: AWR report before implementing Smart Connection Rebalance recommendations
| Service Name | Cardinality | Cluster Wait Time (%) | GC Contention Wait Time (%) | GC Contention Count/sec | Recommendation |
|---|---|---|---|---|---|
qos1_sales | 4 | 71.24 | 97.92 | 12,222.51 | Enable Smart Connection Rebalance |
qos1 | 4 | 7.79 | 0.00 | 0.00 | No Recommendation |
Table: AWR report after implementing Smart Connection Rebalance recommendations
| Service Name | Cardinality | Cluster Wait Time (%) | GC Contention Wait Time (%) | GC Contention Count/sec | Recommendation |
|---|---|---|---|---|---|
qos1_sales | 4 | 1.76 | 98.21 | 417.55 | Smart Connection Rebalance is enabled |
qos1 | 4 | 9.07 | 0.00 | 0.00 | No Recommendation |
Enabling Smart Connection Rebalance
Enable and use Smart Connection Rebalance feature in Oracle Real Application Clusters (Oracle RAC) 26ai.
- Set the
-rlbgoalattribute of your database service toSMART_CONNto enable Smart Connection Rebalance.$ srvctl modify service -db db_unique_name -service service_name -rlbgoal SMART_CONNThis instructs Oracle RAC to use the new Smart Connection Routing for the specified service.
- Query the
(G)V$ACTIVE_SERVICESview to see theSMART_CONN_RECOMMENDATIONcolumn.SQL> SELECT NAME, SMART_CONN_RECOMMENDATION FROM (G)V$ACTIVE_SERVICES;This column provides real-time recommendations for service placement and connection routing.
- Set the
-rlbgoalof that service toSERVICE_TIMEto disable Smart Connection Rebalance.$ srvctl modify service -db db_unique_name -service service_name -rlbgoal NONENote:
You can set
-rlbgoalto onlySMART_CONNorNONEfor a child service.