Description
In OceanBase Database V4.0 and later, the log disk space of a tenant is isolated from that of other tenants. Each server reserves sufficient log disk space for each tenant to prevent tenants from affecting each other. The LOG_DISK_SIZE parameter is added to unit configs to specify the log disk size of each unit. If you do not specify the LOG_DISK_SIZE parameter, the value of the MIN_MEMORY parameter is used by default.
When you create or migrate a unit of a tenant, Root Service selects a server whose remaining log disk space is larger than the value of the LOG_DISK_SIZE parameter as the target server. This alert is triggered when the log disk usage of a tenant exceeds the specified threshold.
Principle
| Parameter | Value |
|---|---|
| Metric | ob_tenant_log_disk_usage |
| Source | Internal views. SQL statements for metric collection: SELECT tenant_id, log_disk_in_use, log_disk_size FROM GV$OB_UNITS |
| Collected metric | ob_tenant_unit_log_disk_in_use,ob_tenant_unit_log_disk_size |
| Metric expression | 100 * avg(ob_tenant_unit_log_disk_in_use{@LABELS}) by (@GBLABELS) / avg(ob_tenant_unit_log_disk_size{@LABELS}) by (@GBLABELS) |
| Collection cycle | 1 minute |
Alert rule
| Metric expression | Metric description | Default threshold (percentage) | Detection cycle | Time before clearance |
|---|---|---|---|---|
| ob_tenant_log_disk_usage > 85 | The log disk usage of a tenant. | 85 | 60 seconds | 5 minutes |
Alert information
| Trigger method | Alert level | Scope |
|---|---|---|
| Based on the expression of the metric | Critical | Tenant |
Alert templates
- Alert overview: ${alarm_target} ${alarm_name}
- Alert details: Cluster: ${ob_cluster_name}. Zone: ${obzone}. Tenant: ${tenant_name}. Alert: The log disk usage of the OceanBase Database tenant reaches ${value_shown}, which exceeds the threshold of ${alarm_threshold} %.
- Overview example: ob_cluster=C1-1000:tenant_name=T1. The log disk usage of the OceanBase Database tenant exceeds the threshold.
- Details example: Cluster: C1. Zone: Z1, Tenant: T1. Alert: The log disk usage of the OceanBase Database tenant reaches 96 %, which exceeds the threshold of 95 %.
Impact on the system
When the free space of the OBServer log disk is insufficient, OBServer cannot work properly.
Possible causes
Improper log disk settings.
Solutions
OceanBase Database V4.0 provides the following log disk parameters:
log_disk_size: the total log disk space that the server can use. The default value is 0, which indicates that the log disk space available for the server is calculated based on the actual space of the local log disk.log_disk_percentage: the usage of the log disk in percentage. If you set thelog_disk_sizeparameter to 0, the log disk space is allocated based on the value of thelog_disk_percentageparameter. The default value is 0, which indicates that calculations are automatically performed based on whether logs and data share the same disk.
If you set the log_disk_size and datafile_size parameters to 0, the sizes of the log disk and data disk are automatically calculated by using the following methods:
If the value of the
log_disk_percentageordatafile_disk_percentageparameter is not 0, the following formulas are used:log_disk_size = Size of the physical disk where logs are stored × log_disk_percentagedatafile_size = Size of the physical disk where data is stored × datafile_disk_percentage
If the
log_disk_percentageordatafile_disk_percentageparameter is set to 0, the following settings prevail and the sizes of the log disk and data disk are calculated based on the following settings:If data and logs share a disk:
log_disk_percentage = 30%datafile_disk_percentage = 60%
When data and logs do not share one disk and each has exclusive disks:
log_disk_percentage = 90%datafile_disk_percentage = 90%
If data and logs share a disk, you can adjust the default value of the
log_disk_percentageparameter to avoid insufficient log disk space.If data and logs do not share a disk, the log disk has ample space, you can set the
log_disk_percentageparameter to an appropriately larger value.