Communications Library Parameters
This section describes parameter settings and value ranges for communications libraries.
tcp_keepalives_idle
Parameter description: Specifies the interval for transmitting keepalive signals on an OS that supports the TCP_KEEPIDLE socket option. If no keepalive signal is transmitted, the connection is in idle mode. This parameter can be set at the PDB level.

- If the OS does not support TCP_KEEPIDLE, set this parameter to 0.
- The parameter is ignored on an OS where connections are established using the UDS.
- If this parameter is set to 0, the system value is used.
- This parameter is not shared among different sessions. That is, different session connections may have different values.
- The parameter value in the current session connection, not the value of the GUC copy, is displayed.
Parameter type: integer
Unit: second
Value range: 0 to 3600
Default value: 60. In the PDB scenario, if this parameter is not set, the global setting is inherited.
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1. For example, if the value is 60 without a unit, tcp_keepalives_idle indicates 60s. If the value is 1min, tcp_keepalives_idle indicates 1 minute. If the unit is required, the value must be s, min, h, or d.
Setting suggestion: Before setting this parameter, ensure that the OS supports the TCP_KEEPIDLE socket option.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
tcp_keepalives_interval
Parameter description: Specifies the response time before retransmission on an OS that supports the TCP_KEEPINTVL socket option. This parameter can be set at the PDB level.

- If the OS does not support TCP_KEEPINTVL, set this parameter to 0.
- The parameter is ignored on an OS where connections are established using the UDS.
- If this parameter is set to 0, the system value is used.
- This parameter is not shared among different sessions. That is, different session connections may have different values.
- The parameter value in the current session connection, not the value of the GUC copy, is displayed.
Parameter type: integer
Unit: second
Value range: 0 to 180
Default value: 30. In the PDB scenario, if this parameter is not set, the global setting is inherited.
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1. For example, if the value is 60 without a unit, tcp_keepalives_interval indicates 60s. If the value is 1min, tcp_keepalives_interval indicates 1 minute. If the unit is required, the value must be s, min, h, or d.
Setting suggestion: Before setting this parameter, ensure that the OS supports the TCP_KEEPINTVL socket option.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
tcp_keepalives_count
Parameter description: Specifies the number of keepalive signals that can be waited before the GaussDB server is disconnected from the client on an OS that supports the TCP_KEEPCNT socket option. This parameter can be set at the PDB level.

- If the OS does not support TCP_KEEPCNT, set this parameter to 0.
- The parameter is ignored on an OS where connections are established using the UDS.
- If this parameter is set to 0, the system value is used.
- This parameter is not shared among different sessions. That is, different session connections may have different values.
- The parameter value in the current session connection, not the value of the GUC copy, is displayed.
Parameter type: integer
Unit: none
Value range: 0 to 100. 0 indicates that the connection is immediately broken if GaussDB does not receive a keepalive signal from the client.
Default value: 20. In the PDB scenario, if this parameter is not set, the global setting is inherited.
Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Before setting this parameter, ensure that the OS supports the TCP_KEEPCNT socket option.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
tcp_user_timeout
Parameter description: Specifies the maximum duration for which the transmitted data can remain in the unacknowledged state before the TCP connection is forcibly closed when the GaussDB sends data on the OS that supports the TCP_USER_TIMEOUT socket option.

- If the OS does not support the TCP_USER_TIMEOUT option, the value of this parameter does not take effect. The default value is 0.
- The parameter is ignored on an OS where connections are established using the UDS.
Parameter type: integer
Unit: millisecond
Value range: 0 to 3600000
Default value: 0, indicating that the value is set based on the OS.
Note that the effective result of this parameter varies according to the OS kernel.
- For AArch64 EulerOS (Linux kernel version: 4.19), the timeout interval is the value of this parameter.
- For x86 Euler 2.5 (Linux kernel version: 3.10), the timeout interval is not the value of this parameter but the maximum value in different ranges. That is, the timeout interval is the maximum upper limit of the total Linux TCP retransmission duration to which the value of tcp_user_timeout belongs. For example, if tcp_user_timeout is set to 40000, the total retransmission duration is 51 seconds.
Table 1 Value of tcp_user_timeout for x86 Euler 2.5 (Linux kernel version: 3.10) Number of Linux TCP Retransmission Times
Total Linux TCP Retransmission Duration Range (s)
Example of tcp_user_timeout (ms)
Actual Linux TCP Retransmission Duration (s)
1
(0.2,0.6]
400
0.6
2
(0.6,1.4]
1000
1.4
3
(1.4,3]
2000
3
4
(3,6.2]
4000
6.2
5
(6.2,12.6]
10000
12.6
6
(12.6,25.4]
20000
25.4
7
(25.4,51]
40000
51
8
(51,102.2]
80000
102.2
9
(102.2,204.6]
150000
204.6
10
(204.6,324.6]
260000
324.6
11
(324.6,444.6]
400000
444.6
Note: The duration of each TCP retransmission increases exponentially with the number of retransmission times. When the duration of a TCP retransmission reaches 120 seconds, the duration of each subsequent retransmission does not change.
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Before setting this parameter, ensure that the OS supports the TCP_USER_TIMEOUT socket option.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
comm_proxy_attr
Parameter description: Specifies the parameters related to the communications proxy library.

- This parameter applies only to the centralized Arm standalone system running EulerOS 2.9.
- This function takes effect when the thread pool is enabled (enable_thread_pool is set to on).
- When setting this parameter, you need to set the GUC parameter local_bind_address to the IP address of the NIC of libos_kni.
- Parameter template: comm_proxy_attr = '{enable_libnet:true, enable_dfx:false, numa_num:4, numa_bind:[[30,31],[62,63],[94,95],[126,127]]}'
- Parameters that need to be configured include:
- enable_libnet: specifies whether to enable the user-mode protocol. The value can be true or false.
- enable_dfx: specifies whether to enable the communications proxy library view. The value can be true or false.
- numa_num: number of NUMA nodes in the system. 2P and 4P servers are supported. The value can be 4 or 8.
- numa_bind: core binding parameter of the agent thread. Each numa has two CPUs. There are a total of numa_num groups. The value range is [0,Number of CPUs – 1].
Parameter type: string.
Unit: none
Value range: a string of more than 0 characters.
Default value: "none"
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value.
Risks and impacts of improper settings: If comm_proxy is set to a value other than "none", set this parameter based on the parameter description. Otherwise, the function cannot be used.
umdk_enabled
Parameter description: Specifies whether UMDK is enabled for the current primary and standby DNs in the database. If the UMDK protocol is used for communication between the primary and standby DNs, the related log keyword on DNs is umdk. If the TCP protocol is used for communication between the primary and standby DNs, logs are recorded. Currently, this function is supported only in some scenarios.
Parameter type: Boolean
Unit: none
Value range:
- on: UMDK is enabled. If the current database instance does not support the UMDK network communication protocol, TCP is used for communication between the primary and standby DNs. Otherwise, UMDK is used for communication between the primary and standby DNs.
- off: The UMDK function is disabled. TCP is used for communication between the primary and standby DNs.
Default value: off
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value. You can set this parameter based on the application scenario described in the parameter usage description.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

- GaussDB adapts to the UMDK communication protocol stack. The UMDK capability is provided and maintained by the OS.
- By default, the parameter is disabled in GaussDB. After this parameter is enabled, whether GaussDB supports this capability depends on whether the OS provides and supports the UMDK function.
- The UMDK capability depends on the hardware NIC and software OS configuration. For example, the hardware NIC should be 1823V200 and the OS should be HCE2.0.
- Check whether the environment has the UMDK capability: Run the lsmod | grep ums statement as the root user to check whether the UMS module is loaded to the OS.
If the current environment does not support the UMDK (UMS module) or the UMS module is faulty, enabling umdk_enabled will cause the connection between the primary and standby nodes to fail. Before enabling umdk_enabled, ensure that the environment has the UMDK capability.
umdk_port
Parameter description: Specifies the listening port of the network communication link between the primary and standby DNs when the UMDK protocol is used for communication between the primary and standby DNs.
Parameter type: integer
Unit: none
Value range: 1 to 65535
Default value: dataPortBase + 15. The value of dataPortBase is the same as that of GUC parameter port set when the database is installed for the first time.
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: Retain the default value. You are advised not to set this parameter.
Risks and impacts of improper settings: Ports may conflict, affecting database startup.

- GaussDB adapts to the UMDK communication protocol stack. The UMDK capability is provided and maintained by the OS.
- By default, GaussDB does not listen on the port specified by umdk_port. The UMDK protocol function of the database is enabled and related ports are listened on only when the GUC parameter umdk_enabled is enabled and the hardware and software in the current environment support the UMDK protocol. Then, the primary and standby DNs start to execute the UMS network protocol (a type of UMDK network protocols).
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