Note
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 the disk used 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 query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.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 disk is shared for logs and data:
- If the disk is shared for logs and data, the percentage is 60%.
- If the disk is dedicated to data, the percentage is 90%.
When this parameter and the
datafile_sizeparameter are both configured, the value ofdatafile_sizetakes precedence. For more information about thedatafile_sizeparameter, see datafile_size.
Examples
In SN mode, set the data files to occupy 90% of the total disk space.
obclient> ALTER SYSTEM SET datafile_disk_percentage=90;