Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

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.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.0
    iconOceanBase Database
    SQL - V 4.3.0
    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

    Modify unit configs

    Last Updated:2026-04-15 08:30:00  Updated
    Share
    What is on this page
    Considerations
    Limitations
    Procedure

    folded

    Share

    Modifying unit configs means increasing or decreasing the CPU, memory, log disk capacity, etc. for unit configs.

    Considerations

    Before modifying a unit config, if the unit corresponding to the unit config is being used by a tenant and additional resources are needed, you must ensure that there is sufficient remaining resources available for allocation on each node during the resource increase process. You can query the total resources and allocated resources on each node through the oceanbase.GV$OB_SERVERS view, and then determine whether it is possible to modify the unit config.

    If you need to increase a unit config, you must ensure that the total amount of resources after the increase meets the following requirements:

    Sum(min_cpu) <= CPU_CAPACITY;
    Sum(max_cpu) <= CPU_CAPACITY * resource_hard_limit;
    Sum(memory_size) <= MEM_CAPACITY;
    Sum(log_disk_size) <= LOG_DISK_CAPACITY;
    

    where

    • CPU_CAPACITY: Indicates the total CPU capacity on a single node.

    • resource_hard_limit: Indicates the amount of CPU resources allocated by the system when allocating units. The value range is [100, 10000]. The default value is 100, indicating that over-allocation is not allowed.

      For more information about the resource_hard_limit parameter, see resource_hard_limit.

    • MEM_CAPACITY: Indicates the total memory capacity on a single node.

    • LOG_DISK_CAPACITY: Indicates the total log disk capacity on a single node.

      The total log disk capacity is jointly controlled by the cluster-level parameters log_disk_size and log_disk_percentage. log_disk_size is used to set the size of the disk where redo logs are stored, with a default value of 0. log_disk_percentage is used to set the percentage of the disk space occupied by redo logs, with a default value of 0. The usage rules for these two parameters are as follows:

      • If the value of log_disk_size is 0M and that of log_disk_percentage is not 0, the system allocates the log disk space based on the value of log_disk_percentage.

      • If the value of log_disk_size is not 0M, the system allocates the log disk space based on the value of log_disk_size, regardless of whether the value of log_disk_percentage is 0.

      • If the value of log_disk_size is 0M and that of log_disk_percentage is 0, the system automatically calculates the percentage of the disk space occupied by redo logs based on whether the log and data share the same disk.

        • If they share the same disk, the percentage of the disk space occupied by redo logs is 30%.

        • If redo logs exclusively occupy the disk, the percentage of the disk space occupied by redo logs is 90%.

      For more information about the log_disk_size parameter, see log_disk_size.

      For more information about the log_disk_percentage parameter, see log_disk_percentage.

    If you need to decrease a unit config, you must ensure that the total amount of CPU, memory, log disk capacity after the decrease is greater than or equal to the currently used log disk space.

    Limitations

    Only the sys tenant can modify unit configs.

    Procedure

    When modifying unit configs, you can modify several items in CPU, memory, IOPS, and log disk capacity. The items that are not modified will remain unchanged.

    1. Log in to the sys tenant of the cluster using the root user.

    2. Execute the following statement to modify a unit config:

      ALTER RESOURCE UNIT unitname
      MAX_CPU [=] cpunum,
      [MIN_CPU [=] cpunum,]
      MEMORY_SIZE [=] memsize,
      [MAX_IOPS [=] iopsnum, MIN_IOPS [=] iopsnum,IOPS_WEIGHT [=]iopsweight,]
      [LOG_DISK_SIZE [=] logdisksize];
      

      An example of modifying the configurations of the unit1 resource unit is as follows:

      obclient> ALTER RESOURCE UNIT unit1 MAX_CPU 15, MEMORY_SIZE '20G', LOG_DISK_SIZE '4G';
      

    Previous topic

    Query unit configs
    Last

    Next topic

    Drop unit configs
    Next
    What is on this page
    Considerations
    Limitations
    Procedure