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

    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.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    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

    Multi-tenant threads of OceanBase Database

    Last Updated:2026-04-02 06:23:57  Updated
    Share
    What is on this page
    Scenarios
    Scenario 1
    Scenario 2
    Scenario 3
    Related parameters
    cpu_quota_concurrency
    workers_per_cpu_quota
    Related views

    folded

    Share

    This topic describes how the multi-tenant threads of OceanBase Database work.

    OceanBase Database is a distributed database that supports the multi-tenant architecture. When an OBServer node receives requests from different tenants, the OBServer node uses tenant-specific threads to handle the requests and returns the results to a client, such as the OBClient. The results can also be returned by an application through an OceanBase Database Proxy (ODP). During this process, the background system threads of OceanBase Database handle both system tasks and tasks that are shared by multiple tenants. The healthy running of all threads supports the stable running of OBServer nodes and ensures reliable and highly available data services. The following section describes how OceanBase Database handles three basic types of tenant requests received by OBServer nodes in the multi-tenant thread architecture.

    Scenarios

    Scenario 1

    When an OBServer node receives an SQL request of the online transaction processing (OLTP) type, which is sent from a client to Tenant A (with an ID of 1014), a tenant thread locally executes the request. The request is executed in the following manner:

    1. A client sends the req1 request to an OBServer node.

    2. req1 enters a tenant request queue. On the OBServer node, such SQL requests enter the tenant request queue queue4.

    3. Multi-tenant worker threads inspect request queues. When the tenant thread (TNT_1014) of Tenant 1014 finds a new request in the queue that needs to be processed, it retrieves req1 from the queue.

    4. The TNT_1014 thread executes req1.

    5. The TNT_1014 thread returns the execution results and the return value to the client.

    Scenario 2

    When an OBServer node receives a remote procedure call (RPC) request, such as a distributed OLTP SQL request that is sent from another OBServer node in Tenant B (with an ID of 1011), a tenant thread executes the request. The RPC request is executed in the following manner:

    1. An OBServer node in a tenant serves as an RPC client and sends an RPC request req1 to the current OBServer node.

    2. req1 is an OLTP SQL request and enters the tenant request queue queue2.

    3. Multi-tenant worker threads inspect request queues. When the tenant thread (TNT_1011) of Tenant 1011 finds a new request in the queue that needs to be processed, it retrieves req1 from the queue.

    4. The TNT_1011 thread executes req1.

    5. The TNT_1011 thread returns the execution results and the return value to the remote OBServer node.

    Scenario 3

    When an OBServer node receives a PX SQL request that is sent from a client to Tenant C (with an ID of 1013), all SQL requests are locally executed. The request is executed in the following manner:

    1. A client sends the req1 request to an OBServer node.

    2. req1 enters the tenant request queue. In OceanBase Database, regular SQL requests enter the tenant request queue queue4.

    3. Multi-tenant worker threads inspect request queues. When the tenant thread (TNT_1013) of Tenant 1013 finds a new request in the queue that needs to be processed, it retrieves req1 from the queue.

    4. The tenant thread serves as the local scheduler and drives the PX thread to execute the request.

    5. After req1 is executed, the thread returns the execution results and the return value to the client.

    Related parameters

    cpu_quota_concurrency

    The min_cpu parameter (a resource unit parameter) and the cpu_quota_concurrency parameter (a system parameter) determine the number of active threads of a tenant.

    Number of active threads of a tenant = min_cpu × cpu_quota_concurrency

    The default value is 4, and the value range is [1,20]. This parameter takes effect immediately after it is modified.

    If you deploy and use OceanBase Database in a standard environment, we recommend that you use the default value.

    workers_per_cpu_quota

    The max_cpu parameter (a resource unit parameter) and the workers_per_cpu_quota parameter (a system parameter) determine the maximum number of threads of a tenant.

    Maximum number of threads of a tenant = max_cpu × workers_per_cpu_quota

    The default value is 10, and the value range is [2, 20]. This parameter takes effect immediately after it is modified.

    If you deploy and use OceanBase Database in a standard environment, we recommend that you use the default value.

    Related views

    View or table name
    Description
    GV$OB_TENANT_RUNTIME_INFO Information about queues and thread quotas in OceanBase Database multi-tenant threads.

    Previous topic

    Overview of OceanBase threads
    Last

    Next topic

    View the thread status
    Next
    What is on this page
    Scenarios
    Scenario 1
    Scenario 2
    Scenario 3
    Related parameters
    cpu_quota_concurrency
    workers_per_cpu_quota
    Related views