OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Resource isolation configuration examples for background tasks

    Last Updated:2026-05-20 03:29:00  Updated
    Share
    What is on this page
    Grouping resource request types
    Resource isolation strategy
    Configure resource isolation for background tasks
    Prerequisites
    Procedure
    References

    folded

    Share

    The OceanBase Database kernel supports more than ten types of resource requests, including both foreground and background tasks. Most background tasks have low priority, so their resource usage needs to be isolated. Resource isolation is enabled by default.

    Because the built-in approach for freely configuring resource isolation for background tasks in Configure resource isolation within a tenant is complex, this section provides a recommended method. It simplifies configuration for background tasks by grouping resource request types.

    Grouping resource request types

    The current configuration of resource isolation is complex. To simplify it, you can group the resource request types. The following resource groups are used:

    • CLOG log commit resource group: CLOG_HIGH_GROUP
    • Compaction resource group: COMPACTION_HIGH_GROUP
    • Background task resource group: BACKGROUND_GROUP

    The following table shows the resource request types included in each resource group. For more details about the resource request types (background tasks), see Resource isolation overview.

    Resource group
    Resource request types
    CLOG_HIGH_GROUP CLOG_HIGH
    COMPACTION_HIGH_GROUP COMPACTION_HIGH
    BACKGROUND_GROUP
    • COMPACTION_LOW
    • COMPACTION_MID
    • HA_LOW
    • HA_MID
    • HA_HIGH
    • DDL
    • DDL_HIGH
    • CLOG_LOW
    • CLOG_MID
    • OPT_STATS
    • GC_MACRO_BLOCK
    • IMPORT
    • SQL_AUDIT
    • MVIEW
    • REPLAY_HIGH

    Resource isolation strategy

    Based on these groupings, you can define resource isolation policies for the resource groups. The recommended policies are shown in the following table.

    Resource group
    MIN_IOPS
    MAX_IOPS
    IOPS_WEIGHT
    MAX_CPU
    CPU_WEIGHT
    CLOG_HIGH_GROUP 40 100 100 100 30
    COMPACTION_HIGH_GROUP 30 100 50 100 70
    BACKGROUND_GROUP 10 100 30 100 70

    Note

    Because the CLOG_HIGH background task directly affects business request latency, its I/O requirements are satisfied as much as possible. Therefore, set MIN_IOPS in CLOG_HIGH_GROUP to 40. This task does not require high CPU usage, so set CPU_WEIGHT to 30.

    Configure resource isolation for background tasks

    Prerequisites

    1. CPU resource isolation depends on cgroups. If you need to control CPU resource isolation, configure the cgroup directory and enable the cgroup feature before you configure resource isolation for background tasks.

      For details, see Configure cgroups.

    2. Before configuring resource isolation for background tasks, calibrate disk performance and set IOPS for the tenant Unit.

      Note

      For V4.3.5, starting from V4.3.5 BP2, CPU and IOPS resource isolation no longer have a strict dependency on disk performance calibration.

      1. Log in to the cluster as the root user and switch to the sys tenant.

      2. Calibrate disk performance.

        1. Run the following command to trigger the disk calibration job:

          obclient> ALTER SYSTEM RUN JOB "io_calibration";
          
        2. After the statement succeeds, run the following command to check the calibration progress:

          obclient> SELECT * FROM  oceanbase.GV$OB_IO_CALIBRATION_STATUS;
          
        3. Calibration may take 1–2 minutes to take effect after it completes. Then run the following command to view the calibration values:

          obclient> SELECT * FROM  oceanbase.GV$OB_IO_BENCHMARK;
          
      3. Configure IOPS for the tenant Unit. Based on the disk calibration values on the OBServer nodes obtained in the previous step, use the 16 KB read calibration value as the upper limit for each node’s IOPS setting.

        For more details, see Specify valid values for the MAX_IOPS and MIN_IOPS parameters of the tenant in Configure resource isolation within a tenant.

    Procedure

    1. Log in to the MySQL or Oracle tenant of the cluster as the tenant administrator of the user tenant.

    2. Execute the following SQL statements to configure resource isolation for background tasks.

      V4.3.5/V4.3.5 BP1
      V4.3.5 BP2 and later
      /*Create a plan*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN('GLOBAL_PLAN','plan for global');
      
      /*Create the COMPACTION_HIGH_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'COMPACTION_HIGH_GROUP', COMMENT => 'COMPACTION_HIGH_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'COMPACTION_HIGH_GROUP' , COMMENT => 'COMPACTION_HIGH_GROUP', MAX_IOPS => 100, MIN_IOPS => 30, WEIGHT_IOPS => 50,UTILIZATION_LIMIT => 100, MGMT_P1 => 70);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_HIGH', 'COMPACTION_HIGH_GROUP');
      
      /*Create the CLOG_HIGH_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'CLOG_HIGH_GROUP', COMMENT => 'CLOG_HIGH_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'CLOG_HIGH_GROUP' , COMMENT => 'CLOG_HIGH_GROUP', MAX_IOPS => 100, MIN_IOPS => 40, WEIGHT_IOPS => 100, UTILIZATION_LIMIT => 100, MGMT_P1 => 30);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_HIGH', 'CLOG_HIGH_GROUP');
      
      /*Create the BACKGROUND_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'BACKGROUND_GROUP', COMMENT => 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'BACKGROUND_GROUP' , COMMENT => 'BACKGROUND_GROUP', MAX_IOPS => 100, MIN_IOPS => 10, WEIGHT_IOPS => 30, UTILIZATION_LIMIT => 100, MGMT_P1 => 70);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_HIGH', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'DDL', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'DDL_HIGH', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'OPT_STATS', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'GC_MACRO_BLOCK', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'IMPORT', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'SQL_AUDIT', 'BACKGROUND_GROUP');
      
      /*Activate the plan*/
      SET GLOBAL resource_manager_plan = 'GLOBAL_PLAN';
      
      /*Create a plan*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN('GLOBAL_PLAN','plan for global');
      
      /*Create the COMPACTION_HIGH_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'COMPACTION_HIGH_GROUP', COMMENT => 'COMPACTION_HIGH_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'COMPACTION_HIGH_GROUP' , COMMENT => 'COMPACTION_HIGH_GROUP', MAX_IOPS => 100, MIN_IOPS => 30, WEIGHT_IOPS => 50,UTILIZATION_LIMIT => 100, MGMT_P1 => 70);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_HIGH', 'COMPACTION_HIGH_GROUP');
      
      /*Create the CLOG_HIGH_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'CLOG_HIGH_GROUP', COMMENT => 'CLOG_HIGH_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'CLOG_HIGH_GROUP' , COMMENT => 'CLOG_HIGH_GROUP', MAX_IOPS => 100, MIN_IOPS => 40, WEIGHT_IOPS => 100, UTILIZATION_LIMIT => 100, MGMT_P1 => 30);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_HIGH', 'CLOG_HIGH_GROUP');
      
      /*Create the BACKGROUND_GROUP resource group*/
      CALL DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP( CONSUMER_GROUP => 'BACKGROUND_GROUP', COMMENT => 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'GLOBAL_PLAN', GROUP_OR_SUBPLAN => 'BACKGROUND_GROUP' , COMMENT => 'BACKGROUND_GROUP', MAX_IOPS => 100, MIN_IOPS => 10, WEIGHT_IOPS => 30, UTILIZATION_LIMIT => 100, MGMT_P1 => 70);
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'COMPACTION_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'HA_HIGH', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'DDL', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'DDL_HIGH', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_LOW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'CLOG_MID', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'OPT_STATS', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'GC_MACRO_BLOCK', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'IMPORT', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'SQL_AUDIT', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'MVIEW', 'BACKGROUND_GROUP');
      CALL DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING('FUNCTION', 'REPLAY_HIGH', 'BACKGROUND_GROUP');
      
      /*Activate the plan*/
      SET GLOBAL resource_manager_plan = 'GLOBAL_PLAN';
      

    References

    This topic provides only the recommended configuration method for resource isolation of background tasks. For information about how to configure resource isolation for other types within the tenant, see the following topics:

    • Configure resource isolation within a tenant (MySQL mode)

    • Configure resource isolation within a tenant (Oracle mode)

    Previous topic

    Clear cgroup configurations
    Last

    Next topic

    View tenant and resource information
    Next
    What is on this page
    Grouping resource request types
    Resource isolation strategy
    Configure resource isolation for background tasks
    Prerequisites
    Procedure
    References