Updated on 2025-05-29 GMT+08:00

Setting the Maintenance Window Parameters

  • RETENTION_TIME: duration for storing evaluation and compression records, in days. The default value is 30. You can adjust the value based on your storage capacity.
  • EXECUTION_INTERVAL: execution frequency of an evaluation task, in minutes. The default value is 15. You can adjust the value based on the service and resource usage during the maintenance window. This parameter and ABS_JOBLIMIT affect each other. A single thread can generate a maximum of WIND_DURATION/EXECUTION_INTERVAL x JOB_SIZELIMIT I/Os per day.
  • JOB_SIZELIMIT: maximum number of bytes that can be processed by a single compression job. The unit is MB. The default value is 1024. The compression speed is about 100 MB/s. When the I/O limit of each compression job is 1 GB, the compression job can be completed within 10 seconds. You can adjust the value based on the service off-peak hours and the amount of data to be compressed.
  • ABS_JOBLIMIT: maximum number of compression jobs that can be generated in an evaluation. You can adjust the value based on the number of partitions and tables in the configured policy. It is recommended that the value be less than or equal to 10. You can run the select count(*) from gs_adm_ilmobjects where enabled = true command to query the value.
  • POLICY_TIME: specifies whether the time unit for determining cold rows is day or second. The time unit second is used only for testing. The value can be ILM_POLICY_IN_SECONDS or ILM_POLICY_IN_DAYS (default value).
  • WIND_DURATION: maintenance window duration, in minutes. The default value is 240 minutes (4 hours). By default, the maintenance window lasts 240 minutes from 22:00 (Beijing time). You can adjust the maintenance window based on service off-peak hours.
  • BLOCK_LIMITS: upper limit of the instance-level row-store compression speed. The default value is 40. The value ranges from 0 to 10000, in block/ms, indicating the maximum number of blocks that can be compressed per millisecond. 0 indicates that there is no speed limit. The maximum speed is calculated as follows: BLOCK_LIMITS x 1000 x BLOCKSIZE. For example, if the default value is 40, the maximum speed is 320,000 KB/s (40 x 1000 x 8 KB).
  • ENABLE_META_COMPRESSION: specifies whether to enable header compression. The default value is 0. The value can be 0 (disabled) or 1 (enabled). You can enable or disable this function as required.
  • SAMPLE_MIN: minimum sampling step for constant encoding and equivalent encoding. The default value is 10. The value range is [1,100]. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • SAMPLE_MAX: maximum sampling step for constant encoding and equivalent encoding. The default value is 10. The value range is [1,100]. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • CONST_PRIO: constant encoding priority. The default value is 40. The value range is [0,100]. The value 100 indicates that constant encoding is disabled. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • CONST_THRESHOLD: constant encoding threshold. The default value is 90. The value range is [1,100], indicating that constant encoding is performed when the proportion of constant values in a column exceeds the threshold. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • EQVALUE_PRIO: equivalent encoding priority. The default value is 60. The value range is [0,100]. The value 100 indicates that equivalent encoding is disabled. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • EQVALUE_THRESHOLD: equivalent encoding threshold. The default value is 80. The value range is [1,100], indicating that equivalent encoding is performed when the ratio of equal values in two columns exceeds the threshold. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • ENABLE_DELTA_ENCODE_SWITCH: specifies whether to enable difference encoding. The default value is 1. The value 0 indicates that difference encoding is disabled, and the value 1 indicates that difference encoding is enabled. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • LZ4_COMPRESSION_LEVEL: LZ4 compression level. The default value is 0. The value range is [0,16]. Decimals can be entered and will be automatically rounded down. You can set this parameter as required.
  • ENABLE_LZ4_PARTIAL_DECOMPRESSION: specifies whether to enable partial decompression. The default value is 1. The value 0 indicates that partial decompression is disabled, and the value 1 indicates that partial decompression is enabled. Decimals can be entered and will be automatically rounded down. You can enable or disable this function as required.
Example:
EXECUTION_INTERVAL: 15
JOB_SIZELIMIT: 10240
WIND_DURATION: 240
BLOCK_LIMITS: 0

In this configuration, for a single table partition or sub-partition, a total of 160 GB (240/15 x 10240 MB) data can be evaluated and compressed during a maintenance window. The compression speed is 100 MB/s, but the actual compression takes only 27 minutes (160 GB/(100 MB/s) = 27 minutes). Services are not affected in other periods. You can adjust the parameters based on the available compression period during off-peak hours.