DCF Parameters Settings
enable_dcf
Parameter description: Specifies whether to enable the DCF mode.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: Boolean. The value can be on or off. on indicates that the current log replication mode is DCF, and off indicates that the current log replication mode is not DCF.
Default value: off
dcf_ssl
Parameter description: This parameter is no longer used. The DCF reuses the GUC parameter ssl.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: Boolean. The value can be on or off. The value on indicates that SSL is used, and the value off indicates that SSL is not used.
Default value: on
dcf_config
Parameter description: Specifies the customized configuration information during installation.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Default value: a string, which is specified by users during installation
dcf_data_path
Parameter description: Specifies the DCF data path.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Default value: a string, which is the dcf_data directory under the data directory of the DN
dcf_log_path
Parameter description: Specifies the DCF log path.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Default value: a string, which is the dcf_log directory under the data directory of the DN
dcf_node_id
Parameter description: Specifies the ID of the DN where the DCF is located. This parameter is defined by the user during installation and mode switching.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Default value: an integer, which is specified by users during installation
dcf_max_workers
Parameter description: Specifies the number of DCF callback function threads. If the number of nodes exceeds 7, increase the value of this parameter (for example, to 40). Otherwise, the primary node may remain in the promoting state and the log replication between the primary and standby nodes has no progress.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 10 to 262143
Default value: 20
dcf_truncate_threshold
Parameter description: Specifies the threshold for a DN to truncate DCF logs.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 2147483647
Default value: 100000
dcf_election_timeout
Parameter description: Specifies the timeout interval for selecting the DCF leader and follower. The election timeout interval depends on the status of the network between DNs. If the timeout interval is short and the network quality is poor, timeout occurs. After the network recovers, the election becomes normal. You are advised to set a proper timeout interval based on the current network status. Restriction on the DCF node clock: The maximum clock difference between DCF nodes is less than half of the election timeout period. In DCF manual election mode, to ensure timely CM arbitration, do not modify this parameter. Instead, use the default election timeout period.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 600, in seconds
Default value: 3
dcf_enable_auto_election_priority
Parameter description: Specifies whether the DCF priority can be automatically adjusted. The value 0 indicates that automatic adjustment is not allowed, and the value 1 indicates that automatic adjustment is allowed.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: 0 or 1.
Default value: 1
dcf_election_switch_threshold
Parameter description: Specifies the DCF threshold for preventing frequent switchover to primary. It is recommended that this parameter be set based on the maximum fault duration acceptable for user services.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 2147483647, in seconds.
Default value: 0
dcf_run_mode
Parameter description: Specifies the DCF election mode. The value 0 indicates the automatic election mode, the value 1 indicates the manual election mode, and the value 2 indicates that the election mode is disabled. Currently, the election mode can be disabled only in minority restoration scenarios. If the election mode is disabled, the database instance will become unavailable.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Note: The working mode of an instance can be switched only when the instance is running properly. Otherwise, the instance is still abnormal after the switching. The DCF working mode configured in GUC parameters must be the same as that configured by using cm_ctl. That is, both DCF working modes must be set to manual or automatic at the same time.
cm_ctl set --param --server -k dn_arbitrate_mode=quorum cm_ctl reload --param --server gs_guc reload -Z datanode -I all -N all -c "dcf_run_mode=1"
cm_ctl set --param --server -k dn_arbitrate_mode=paxos cm_ctl reload --param --server gs_guc reload -Z datanode -I all -N all -c "dcf_run_mode=0"
Value range: 0, 1, or 2
Default value: 1
dcf_log_level
Parameter description: Specifies the DCF log level.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: a string
- Disable the log function: NONE, indicating that the log function is disabled and cannot be used for the following log levels:
- Enable the log function: RUN_ERR|RUN_WAR|RUN_INF|DEBUG_ERR|DEBUG_WAR|DEBUG_INF|TRACE|PROFILE|OPER
You can select a string from the preceding strings and use vertical bars (|) to combine the strings. The log level cannot be left blank.
Default value: RUN_ERR|RUN_WAR|DEBUG_ERR|OPER|RUN_INF|PROFILE
dcf_log_backup_file_count
Parameter description: Specifies the number of DCF run log backups.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 1000
Default value: 100
dcf_max_log_file_size
Parameter description: Specifies the maximum size of a DCF run log file.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 1000, in MB
Default value: 10
dcf_socket_timeout
Parameter description: Specifies the timeout interval for the DCF communication module to connect to the socket. This parameter takes effect upon the system restart. In an environment where the network quality is poor, if the timeout interval is set to a small value, a connection may fail to be set up. In this case, you need to increase the value.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 10 to 600000, in ms
Default value: 5000
dcf_connect_timeout
Parameter description: Specifies the timeout interval for the DCF communication module to set up a connection. This parameter takes effect upon the system restart. In an environment where the network quality is poor, if the timeout interval is set to a small value, the connection may fail to be set up. In this case, you need to increase the value.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 10 to 600000, in ms
Default value: 60000
dcf_mec_fragment_size
Parameter description: Specifies the fragment size of the DCF communication module. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 10240, in KB
Default value: 64
dcf_stg_pool_max_size
Parameter description: Specifies the maximum size of the memory pool of the DCF storage module. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 2147483647, in MB
Default value: 2048
dcf_stg_pool_init_size
Parameter description: Specifies the minimum size of the memory pool of the DCF storage module. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 2147483647, in MB
Default value: 32
dcf_mec_pool_max_size
Parameter description: Specifies the maximum size of the memory pool of the DCF communication module. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 2147483647, in MB
Default value: 200
dcf_flow_control_disk_rawait_threshold
Parameter description: Specifies the disk waiting threshold for DCF flow control.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 2147483647, in μs
Default value: 100000
dcf_flow_control_net_queue_message_num_threshold
Parameter description: Specifies the threshold for the number of messages in a network queue for DCF flow control.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 2147483647
Default value: 1024
dcf_flow_control_cpu_threshold
Parameter description: Specifies the threshold for DCF CPU flow control.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 2147483647, in percentage (%)
Default value: 100
dcf_mec_batch_size
Parameter description: Specifies the number of batch messages for DCF communication. When the value is 0, the DCF automatically adjusts the value based on the network and the amount of data to be written. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 0 to 1024
Default value: 0
dcf_mem_pool_max_size
Parameter description: Specifies the maximum DCF memory. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 2147483647, in MB
Default value: 2048
dcf_mem_pool_init_size
Parameter description: Specifies the initial size of the DCF memory. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 32 to 2147483647, in MB
Default value: 32
dcf_compress_algorithm
Parameter description: Specifies the compression algorithm for DCF run log transmission. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer
- 0 indicates no compression.
- 1 indicates the ZSTD compression algorithm.
- 2 indicates the LZ4 compression algorithm.
Default value: 0
dcf_compress_level
Parameter description: Specifies the compression level for DCF log transmission. This parameter takes effect upon the system restart. Before this parameter takes effect, a valid compression algorithm must be configured, that is, the dcf_compress_algorithm parameter is set.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 22
If compression is disabled, the configured compression level does not take effect.
Default value: 1
dcf_mec_channel_num
Parameter description: Specifies the number of DCF communication channels. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 64
Default value: 1
dcf_rep_append_thread_num
Parameter description: Specifies the number of DCF log replication threads. This parameter takes effect upon the system restart.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 1000
Default value: 2
dcf_mec_agent_thread_num
Parameter description: Specifies the number of DCF communication working threads. This parameter takes effect upon the system restart. It is recommended that the value of dcf_mec_agent_thread_num be greater than or equal to 2 x Number of nodes x Value of dcf_mec_channel_num.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 1000
Default value: 10
dcf_mec_reactor_thread_num
Parameter description: Specifies the number of reactor threads used by the DCF. This parameter takes effect upon the system restart. It is recommended that the ratio of the value of dcf_mec_reactor_thread_num to the value of dcf_mec_agent_thread_num be 1:40.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from 1 to 100
Default value: 1
dcf_log_file_permission
Parameter description: Specifies the attribute of the DCF run log file. The parameter setting takes effect after the system is restarted. This parameter is configured during installation and cannot be modified. To allow other users in the same group to access logs, ensure that all parent directories can be accessed by other users in the same group. That is, if dcf_log_path_permission is set to 750, dcf_log_file_permission can only be set to 600 or 640. If dcf_log_path_permission is set to 700, dcf_log_file_permission must be set to 600.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: enumerated type. The value can be 600 or 640.
Default value: 600
dcf_log_path_permission
Parameter description: Specifies the attribute of the DCF run log directory. The parameter setting takes effect after the system is restarted. This parameter is configured during installation and cannot be modified. To allow other users in the same group to access the log path, set this parameter to 750. Otherwise, set this parameter to 700.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: enumerated type. The value can be 700 or 750.
Default value: 700
dcf_majority_groups
Parameter description: Sets the DCF policy-based majority function. For a group that requires this parameter, at least one standby node in the group receives logs. That is, there is a synchronous standby node in the group. If nodes are added to or deleted from the DCF instance or the group value of a node in the instance is changed, you need to modify the configuration accordingly.
This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: a string
- To disable the policy-based majority function, enter an empty string "".
- To enable the function, configure valid group values separated by commas (,). The group values must exist in dcf_config. For example, if the group values 1 and 2 are added to the DCF policy-based majority configuration, you can set this parameter to "1,2". If the group value does not exist in dcf_config or other characters are configured, the DCF considers the configured group invalid.
Default value: empty
If all nodes in a group are faulty after the parameter is configured, you need to remove the group from the parameter list when performing node build operations (node recovery or node replacement without changing the IP address) on a node. After the node recovers, you can configure the group again.
dcf_node_id_map
Parameter description: Specifies the dictionary mapping between standby DN names and DCF node IDs. The parameter setting takes effect after the system is restarted. This parameter is configured during installation and cannot be modified. This parameter is used in DCF cluster installation, upgrade, and node replacement scenarios. The value of standby_name configured in the GUC parameter synchronous_standby_names must be included in this dictionary.
This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Value range: a string. The configuration format is 'standby_name1:dcf_node_id1,standby_name2:dcf_node_id2'. The values of standby DN names and the corresponding DCF node IDs are separated by commas (,).
Default value: empty
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot