OceanBase logo

OceanBase

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

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

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

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.2.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 & Certification
    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.2.2
    iconOceanBase Database
    SQL - V 4.2.2
    SQL
    KV
    • 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

    Background threads of OceanBase Database

    Last Updated:2026-04-15 08:27:14  Updated
    share
    What is on this page
    Background threads

    folded

    share

    This topic introduces some background threads of OceanBase Database and their features. In most cases, you do not need to understand how these threads are implemented.

    Background threads

    Background threads are optimized along with the iteration of OceanBase Database. Some background threads may be eliminated or merged, and other background threads may be created in later versions.

    Thread Module Thread quantity Purpose
    TsMgr Trx 1 Refreshes the local GTS cache.
    WeakReadSvr Trx 1 Calculates the local server-level read timestamp of the standby IDC.
    HAGtsSource Trx 1 Refreshes ha_gts. The refresh frequency is determined by the gts_refresh_interval parameter.
    GCPartAdpt Trx 1 Regularly checks the all_tenant_gc_partition_info table to obtain the garbage collection (GC) information of partitions. The thread helps facilitate the GC and two-phase commit of transactions.
    PartWorker Trx 1 Traverses all partitions on the local OBServer node and performs the following operations:
    1. Tries to write checkpoint logs at the transaction layer every 50 ms.
    2. Calculates the snapshot points to be migrated every 15s.
    3. Drives all active transactions in the current partition every 10s and checks the status of the scheduler. The thread helps clear the transaction context.
    4. Checks the replica table status of the current partition every 10s.
    5. Refreshes the clogs cached in the current partition every 10s.
    LockWaitMgr Trx 1 Wakes up the threads in the wait lock queue in hotspot row scenarios, such as statement timeout and session kill.
    ClogAdapter Trx 8 Asynchronously commits clogs at the transaction layer.
    ObTransService Trx 6 Performs the following operations:
    • Processes error messages during the transaction commit.
    • Retries a failed statement rollback.
    • Wakes up the subsequent transactions in an early lock release scenario.
    GCCollector Storage 1 Regularly checks whether GC operation can be performed on all partitions on the local OBServer nodes. If yes, triggers a GC operation.
    RebuildSche Storage 1 Regularly drives partition tasks that need to be rebuilt.
    PurgeWorker Storage 1 Deletes MemTable labels in the background.
    DAG Storage 16 The worker thread of dag, which is used to run tasks such as the minor compactions, major compactions, and migration of partitions.
    DagScheduler Storage 1 The scheduling thread of dag.
    STableChecksumUp Storage 1 Batch commits SSTable checksum tasks.
    PartitionScheduler Storage 2 Schedules minor compaction and major compaction tasks.
    MemstoreGC Storage 1 Recycles the frozen MemStore after a warm-up for minor compactions.
    ObStoreFile Storage 1 Checks for bad macroblocks and recycles macroblocks.
    PartSerCb Storage 40 Schedules 20 threads to handle the switchover of a partition leader.
    ObPartitionSplit Worker Storage 1 Splits a partition in the background.
    FreezeTimer Storage 1 Checks the MemStore memory and triggers a freezing task.
    RebuildTask Storage 1 Schedules the D replica to pull data.
    IndexSche Storage 1 Schedules the index creation task.
    FreInfoReload Storage 1 Synchronizes major freeze information in internal tables.
    TableMgrGC Storage 1 Recycles MemTable to release memory.
    BackupInfoUpdate Storage 1 Regularly refreshes backup data.
    LogDiskMon Storage 1 Detects the multiple disks of the system.
    KVCacheWash Storage 1 Cleans the memory of KVCache. The detection interval is determined by the _cache_wash_interval parameter. Default value: 200ms. Value range: [1ms,1m].
    KVCacheRep Storage 1 Manages memory fragments of the cache to recycle memory. The detection interval is determined by the _cache_wash_interval parameter. Default value: 200ms. Value range: [1ms,1m].
    RSMonitor RS 1 Monitors the status of the current RootService.
    CacheCalculator RS 1 Reserves memory for location_cache and schema_cache.
    ObDailyMergeScheduler RS 1 Schedules major compaction tasks.
    ObEmptyServerChecker RS 1 Detects whether an OBServer node has replicas.
    ObFetchPrimaryDDLOperator RS 1 Synchronizes the logic of the standby database to the schema of the sys tenant of the primary database.
    ObFreezeInfoUpdater RS 1 Speeds up the progress of freeze and manages the snapshot recovery points.
    ObGlobalIndexBuilder RS 1 Schedules the creation of global indexes.
    ObGlobalMaxDecidedTransVersionMgr RS 1 Collects the statistics of the versions of global maximum transactions.
    ObLeaderCoordinator RS 1 Manages the distribution of leader replicas in a cluster.
    ObLogArchiveScheduler RS 1 Archives the log files.
    ObMajorFreezeLauncher RS 1 Launches scheduled major compaction tasks daily.
    ObPartitionSpliter RS 1 Schedules the compaction of partitions.
    ObRebalanceTaskMgr RS 1 Schedules the execution of load balancing tasks.
    ObRootBackup RS 1 Schedules backup tasks.
    ObRootBalancer RS 1 Generates load balancing tasks.
    ObRsGtsMonitor RS 1 Monitors the distribution of GTS instances and initiates tasks to migrate or generate GTS replicas based on the distribution of GTS replicas.
    ObRsGtsTaskMgr RS 1 Executes the tasks related to GTS replicas.
    ObHeartbeatChecker RS 1 Checks the status of heartbeats between OBServer nodes.
    ObStandbyClusterSchemaProcessor RS 1 Synchronizes the replica of a standby database to the user tenant schema of the primary database.
    ObRestoreScheduler RS 1 Schedules the restoration process.
    ObWorkQueue RS 4 Executes asynchronous RootServer tasks. The number of threads is determined by the rootservice_async_task_thread_count parameter. Value range: [1,10].
    ObAsyncTaskQueue RS 16 Executes the creation of indexes.
    ObSwitchTaskQueue RS 6 The task queue for primary/standby switchover in the physical standby database. The number of threads is determined by the switchover_process_thread_count parameter. Value range: [1,1000].
    LocalityReload RS 1 Regularly refreshes the locality information.
    RSqlPool RS 1 Allows the standby database to regularly maintain the RootServer list of the primary database.
    ServerTracerTimer RS 1 Schedules the tasks to maintain the status of other OBServer nodes.
    LogEngine CLOG 1 Collects and monitors the disk space occupied by clog files and recycles clog files.
    CLGWR CLOG 1 Writes clog items to the disk.
    ClogHisRep CLOG 3 Updates the internal table of the clog history when a partition goes online or offline.
    BatchSubmitCtx CLOG 1 Splits the transactions optimized in phase 1.
    LogScanRunnable CLOG 4 Scans all clog files when the OBServer node starts.
    LogStateDri CLOG 1 Switches the primary and standby replicas of the clog module and checks the status of the replica association.
    ObElectionGCThread Election 1 Recycles the memory of election objects.
    Blacklist CLOG 1 Detects network connection with the destination server.
    BRPC CLOG 5 Sends the batch_rpc aggregation package in the background.
    CLOGReqMinor CLOG 1 Triggers minor freezing based on the clog disk usage and speeds up the recycling of clog files.
    LineCache CLOG 1 Optimizes the synchronization of historical data in the liboblog scenario.
    EXTLogWash CLOG 1 Frequency: 100 ms.
    CLogFileGC CLOG 1 Regularly recycles clog files.
    CKPTLogRep CLOG 1 Used for the checkpoint operations of log replicas.
    RebuildRetry CLOG 1 Retries the partition rebuilding task.
    ReplayEngine CLOG Physical core Replays the clog files on the follower.
    PxPoolTh SQL 0 The thread pool for parallel execution.
    sql_mem_timer SQL 1 Automatically manages memory.
    OmtNodeBalancer Common 1 Refreshes multi-tenant information in the background.
    MultiTenant Common 1 Refreshes CPU utilization for multiple tenants to schedule resources.
    SignalHandle Common 1 Processes signals.
    LeaseUpdate Common 3 Monitors the lease between the RootServer and each OBServer node.
    RsDDL Common 1 Executes the DDL operations of the RootService.
    MysqlIO Common 12 Manages the connection with MySQL.
    all_meta_table Common 8 Reports the status of partition groups or partitions.
    all_pg_partition_ meta_table Common 8 Reports the status of partitions in a partition group.
    TimerMonitor Common 1 Monitors the actions of scheduled internal threads and triggers alerts for exceptions during execution.
    ConfigMgr Common 1 Refreshes parameters.
    OB_ALOG Common 1 Writes asynchronous system logs to the disk.
    ELE_ALOG Election 1 Writes asynchronous election module logs to the disk.

    Previous topic

    View the thread status
    Last

    Next topic

    FAQ about multi-tenant threads
    Next
    What is on this page
    Background threads