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 NameCardinalityCluster Wait Time (%)GC Contention Wait Time (%)GC Contention Count/secRecommendation
qos1_sales471.2497.9212,222.51Enable Smart Connection Rebalance
qos147.790.000.00No Recommendation

Table: AWR report after implementing Smart Connection Rebalance recommendations

Service NameCardinalityCluster Wait Time (%)GC Contention Wait Time (%)GC Contention Count/secRecommendation
qos1_sales41.7698.21417.55Smart Connection Rebalance is enabled
qos149.070.000.00No Recommendation

Enabling Smart Connection Rebalance

Enable and use Smart Connection Rebalance feature in Oracle Real Application Clusters (Oracle RAC) 26ai.

  1. Set the -rlbgoal attribute of your database service to SMART_CONN to enable Smart Connection Rebalance.
    $ srvctl modify service -db db_unique_name -service service_name -rlbgoal SMART_CONN

    This instructs Oracle RAC to use the new Smart Connection Routing for the specified service.

  2. Query the (G)V$ACTIVE_SERVICES view to see the SMART_CONN_RECOMMENDATION column.
    SQL> SELECT NAME, SMART_CONN_RECOMMENDATION FROM (G)V$ACTIVE_SERVICES;

    This column provides real-time recommendations for service placement and connection routing.

  3. Set the -rlbgoal of that service to SERVICE_TIME to disable Smart Connection Rebalance.
    $ srvctl modify service -db db_unique_name -service service_name -rlbgoal NONE

    Note:

    You can set -rlbgoal to only SMART_CONN or NONE for a child service.