ClustrixDB monitor the amount of space available in the cluster, and take the initiative to warn of potential capacity problem. Determining the capacity of the cluster threshold is configurable, as described below.
Storage Type
To learn how to manage the utilization of equipment and databases, you must first understand ClustrixDB how to allocate disk space. ClustrixDB creation and distribution space in two different files:
Device1 (main memory)
Storing all database data, undo logs, temporary tables, binlogs, ClustrixDB system tables, and for temporarily storing the query execution, the initial size of the file is automatically detected by device1 ClustrixDB installer, but can also be manually configured. After installation, you can use the size of the ALTER CLUSTER RESIZE device extension device1 file. To reduce the size of device1 file, see device1 reduced size.
ClustrixDB hope the same device1 file size on each node. By default, when the database starts, ClustrixDB will automatically try to size adjustment device1 file on each node in the cluster to match the largest device1 file. To disable this feature, set device_auto_resize_to_largest = false.
Temporary storage for large query results are sorted and grouped and stored in the device1. There are two global variables to control the use of temporary space:
- device_temporary_space_limit_bytes: limit the amount of temporary storage space.
- device_temporary_space_preallocate_bytes: Specifies the number of pre-allocated space temporary space (space to ensure temporary use).
Set device_temporary_space_limit_bytes allows the use of additional temporary space, but can not guarantee to provide additional space for temporary space.
Before ClustrixDB 9.2, the temporary space is stored in a separate file called device1-temp's, but in v9.2, management is now in temporary space device1 file.
device1-redo (write-ahead log)
redo log (the WAL) device1-redo stored in the file. The file size is 4GB, not configurable.
Check the storage utilization
CLX viewed by using the command-line management tool uses much space
shell> /opt/clustrix/bin/clx space nid | Hostname | Status | Undo | Perm | WAL | Temp | Used | DB Total | FS Free ----+--------------+---------+-----------------+-----------------+------------------+------------+-----------------+----------+-------- 16 | eukanuba003 | OK | 321.8M (0.04%) | 674.7G (79.4%) | 1024.0M (0.12%) | 0 (0.00%) | 760.1G (89.4%) | 850.0G | 113.9G 17 | karma183 | OK | 313.5M ( 0.04 %) | 664 .6G ( 78.2 %) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 750 .1G ( 88.2 %) | 850 .0G | 113 .9G 18 | eukanuba002 | OK | 324.3M ( 0.04 %) | 669 .5G ( 78.8 %) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 755 .0G ( 88.8%) | 850 .0G | 113 .9G 19 | eukanuba001 | OK | 339.7M ( 0.04 %) | 671 .0G ( 78.9 %) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 756 .4G ( 89.0 %) | 850 .0G | 113 .9G 20 | eukanuba005 | OK | 277.3M ( 0.03 %) | 668 .7G ( 78.7 %) | 1024.0M ( 0.12 %) | 0( 0.00 %) | 754 .1G ( 88.7 %) | 850 .0G | 113 .9G 21 | eukanuba004 | OK | 420.3M ( 0.05 %) | 678 .6G ( 79.8 %) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 764 .1G ( 89.9 %) | 850 .0G | 113 .9G 22 | eukanuba006 | OK | 397.0M ( 0.05 %) | 670 .4G ( 78.9%) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 755 .9G ( 88.9 %) | 850 .0G | 113 .9G 23 | karma184 | OK | 479.9M ( 0.06 %) | 674 .8G ( 79.4 %) | 1024.0M ( 0.12 %) | 0 ( 0.00 %) | 760 .3G ( 89.5 %) | 850 .0G | 113 .9G ----+--------------+---------+-----------------+-----------------+------------------+------------+-----------------+----------+-------- 2.8G (0.04%) | 5.2T (79.0%) | 8.0G (0.12%) | 0 (0.00%) | 5.9T (89.1%) | 6.6T | 910.9G
Global Variables
For most workloads, these default values of global variables is optimal.
Variable
|
Description
|
Default
|
---|---|---|
device_auto_resize_to_largest |
Automatically adjusts the cluster all (online) equipment to match the size of the largest equipment |
true |
device_temporary_space_limit_bytes |
Maximum number of bytes for the temporary container. |
5368709120 |
device_temporary_space_preallocate_bytes | The amount of space allocated in advance to the temporary memory | 5368709120 |
Database storage threshold
Global variables to establish a database to store the threshold for the cluster. When the level exceeds a first threshold value, an alert will be sent. If the storage utilization continues to increase, once the next set threshold is exceeded, the user query will begin to fail. Finally, if memory usage continues to grow, the system queries (including key internal processes) will be terminated. Once the database is completely full, the database may not be able to operate. Proposals to free up space, please refer to the following solutions to problems.
The following variables are used to set the threshold device1 utilization.
The following variables are use to set thresholds for device1 utilization.
Variable
|
Description
|
Default Value
|
Allowed Values
|
---|---|---|---|
Variable
|
Description
|
Default Value
|
Allowed Values
|
databasefull_message_interval_s |
Database almost full message interval in seconds. |
120 |
Minimum: 10 Maximum: 600 |
databasefull_user_warn_percentage |
Warn about user queries when space usage surpasses this percentage. |
80 |
Minimum: 50 Maximum: databasefull_user_error_percentage - 1 |
databasefull_user_error_percentage |
Fail user queries when space usage surpasses this percentage. |
90 |
Minimum: databasefull_user_warn_percentage + 1 Maximum: databasefull_system_warn_percentage - 1 |
databasefull_system_warn_percentage |
Warn about system queries when space usage surpasses this percentage. |
95 |
Minimum: databasefull_user_error_percentage + 1 Maximum: databasefull_system_error_percentage - 1 |
databasefull_system_error_percentage |
Fail user queries when space usage surpasses this percentage. |
97 |
Minimum: databasefull_system_warn_percentage + 1 Maximum: >99 |
User queries are trans