Note
For Vx.x.x, this parameter is available starting with V2.2.50.
Description
In Shared-Nothing (SN) mode, the
datafile_disk_percentageparameter specifies the percentage of the total disk space occupied by data files (data_diris initialized by OceanBase Database for storing data).In Shared-Storage (SS) mode, the
datafile_disk_percentageparameter specifies the percentage of the total disk space occupied by local cache space.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 0
NoteStarting from V4.0.0, the default value is changed from 90 to 0. |
| Value range | [0, 99]
NoteStarting from V4.0.0, the value range is changed from [5, 99] to [0, 99]. |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
When the value of this parameter is 0, the system automatically calculates the percentage of the total disk space occupied by data files (in SN mode) or local cache space (in SS mode) based on whether the log and data share the same disk:
- If they share the same disk, the percentage is 60%.
- If they do not share the same disk, the percentage is 90%.
When this parameter is configured together with the
datafile_sizeparameter, the value ofdatafile_sizetakes precedence. For more information about thedatafile_sizeparameter, see datafile_size.
Examples
In SN mode, set the percentage of the total disk space occupied by data files to 90%.
obclient> ALTER SYSTEM SET datafile_disk_percentage=90;