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

    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.1.0
    iconOceanBase Database
    SQL - V 4.1.0
    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

    Create a resource unit configuration

    Last Updated:2023-08-01 06:02:28  Updated
    share
    What is on this page
    Limitations
    Procedure
    What to do next
    More information

    folded

    share

    The resources available to a tenant are limited by the specified resource units. If the existing resource unit configurations cannot meet the needs of the new tenant, you can create a new resource unit configuration.

    Limitations

    Only the sys tenant can create resource units.

    Procedure

    1. Log on to the sys tenant of the cluster as the root user.

    2. Execute the following statement to create a resource unit.

      Sample statement:

      CREATE 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];
      

      Notes:

      • MAX_CPU and MIN_CPU specify the maximum and minimum CPU resources that can be provided by a resource unit that uses the resource unit configuration. The minimum CPU specification is 1C.

        MAX_CPU must be specified, while MIN_CPU is optional. If you do not specify MIN_CPU, the value equals that of MAX_CPU by default.

      • MEMORY_SIZE specifies the size of memory that can be provided by a resource unit that uses the resource unit configuration. The minimum value is 1G.

      • The minimum values of MAX_IOPS and MIN_IOPS are both 1024, and the value of MAX_IOPS must be greater than or equal to that of MIN_IOPS. If you do not specify these parameters, the system automatically calculates the values based on the CPU specifications.

        The system automatically calculates the values for the IOPS parameters based on the following rules:

      • If both MIN_IOPS and MAX_IOPS are not specified, the system automatically calculates their values based on the value of MIN_CPU by using this rule: One CPU core corresponds to 10,000 IOPS, which means MAX_IOPS = MIN_IOPS = MIN_CPU * 10000. In this case:

        • If IOPS_WEIGHT is not specified, IOPS_WEIGHT = MIN_CPU.

        • If IOPS_WEIGHT is specified, the specified value takes precedence.

      • If only MAX_IOPS is specified, MIN_IOPS uses the value of MAX_IOPS. Similarly, if only MIN_IOPS is specified, MAX_IOPS uses the value of MIN_IOPS. In this case:

        • If IOPS_WEIGHT is not specified, the value is 0 by default.
      • LOG_DISK_SIZE specifies the log disk size. If this parameter is not specified, the default value is three times the memory size. The minimum value is 2G.

      • When you specify a value for a parameter, you can use a number without quotation marks ('), a number and a unit enclosed in quotation marks, or a number enclosed in quotation marks, for example, '1T', '1G', '1M', or '1K'.

        Parameters:

      • For integer parameters such as MAX_CPU, MIN_CPU, MAX_IOPS, MIN_IOPS, and IOPS_WEIGHT, if the parameter value is a number and a letter enclosed in quotation marks, the letter is an abbreviation of thousand, million, and the like. For example, '1K' = 1000, and '1M' = 1000,000. For example, MAX_IOPS='2K' is equivalent to MAX_IOPS=2000.

        If you use a number enclosed in quotation marks, the meaning is the same as that without quotation marks. For example, '100' = 100, and '1000' = 1000.

      • For capacity parameters such as MEMORY_SIZE and LOG_DISK_SIZE, if you use a number and a unit enclosed in quotation marks, the unit is byte. For example, '1K' = 1024, and '1M' = 1024 * 1024.

        If you use a number enclosed in quotation marks, the unit is MB by default, For example, '100' = '100M' = 100 * 1024 * 1024.

      Create a resource unit named unit1.

      obclient> CREATE RESOURCE UNIT unit1 MAX_CPU 1, MIN_CPU 1, MEMORY_SIZE '2G', MAX_IOPS 1024, MIN_IOPS 1024, IOPS_WEIGHT 0, LOG_DISK_SIZE '2G';
      
      obclient> CREATE RESOURCE UNIT unit1 MAX_CPU 1, MEMORY_SIZE '2G';
      

      A resource unit configuration is a template of resource units that can be used by different resource pools. For example, after you create the resource unit unit1, you can use the resource configuration of unit1 to create resource pools pool1 and pool2.

    What to do next

    After a resource unit is created, the administrator can specify the resource unit when the administrator creates a resource pool and allocate it to the corresponding tenant. For more information about how to create a resource pool, see Create a resource pool.

    More information

    For more information about how to manage resource units, see the following topics:

    • View resource unit configurations

    • Modify resource unit configurations

    • Drop a resource unit configuration

    Previous topic

    Overview
    Last

    Next topic

    View resource unit configurations
    Next
    What is on this page
    Limitations
    Procedure
    What to do next
    More information