Note
This parameter is available starting with V2.2.50.
Description
In Shared-Nothing (SN) mode, the
datafile_disk_percentageparameter specifies the percentage of disk space occupied by data files in thedata_dirdirectory. OceanBase Database initializes the disk for storing data.In Shared-Storage (SS) mode, the
datafile_disk_percentageparameter specifies the percentage of local cache space available on the disk.
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 disk space occupied by data files (in SN mode) or local cache space (in SS mode) based on whether the log and data files 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 disk space occupied by data files to 90%.
obclient> ALTER SYSTEM SET datafile_disk_percentage=90;