Applicable scenarios
This article is suitable for root cause analysis of GC (Garbage Collection) problems. It is analyzed based on the internal table data and logs of OceanBase database to help locate GC-related problems.
Currently, OceanBase database V4.0.0.0 and later versions are supported. When using obdiag, you need to configure the cluster information in the ~/.obdiag/config.yml file according to your choice, or configure the cluster information through the --config option in the command.
Attention
Due to the timeliness of internal table data, only current data is supported for analysis.
Can import environment variables
Variable name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| tenant_id | No | string | "" | Specifies the tenant ID to be analyzed. |
Usage example
- Configure analysis scenarios, executed by default
obdiag rca run --scene=gc_troubleshooting
```* Configure the analysis scenario and specify the tenant ID
```shell
obdiag rca run --scene=gc_troubleshooting --env tenant_id=1001
Analyze content
This scenario analyzes the following:
- GC task status: Check the execution status of the current GC task.
- GC blocking reasons: Analyze the reasons that may cause GC blocking, such as long transactions, active sessions, etc.
- Resource Usage: Check the resource usage related to GC.
- Log Analysis: Analyze GC-related information in OceanBase cluster logs.
Output results
After the analysis is completed, a diagnostic report will be generated, which includes:
- Root cause analysis results of GC issues
- Problem location information
- Fix suggestions
Related scenes
If the GC problem is related to other problems, it can be analyzed in conjunction with the following scenarios:
