Updated on 2024-06-03 GMT+08:00

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 is a USERSET parameter. Set it based on instructions in Table 1.

  • 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.

Value range: 0 to 3600. The unit is s.

Default value: 60

tcp_keepalives_interval

Parameter description: Specifies the response time before retransmission on an OS that supports the TCP_KEEPINTVL socket option.

This is a USERSET parameter. Set it based on instructions in Table 1.

Value range: 0 to 180. The unit is s.

Default value: 30

  • 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.

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 is a USERSET parameter. Set it based on instructions in Table 1.

  • 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.

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

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.

This is a SIGHUP parameter. Set it based on instructions in Table 1.

  • 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.

Value Range: 0 to 3600000. The unit is ms. The value 0 indicates that the value is set based on the OS.

Default value: 0

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.

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, that is, 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 the 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].

This is a POSTMASTER parameter. Set it based on instructions in Table 1.

Value range: a string, consisting of one or more characters.

Default value: 'none'

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 in Table 1.

Setting suggestion: Set this parameter based on the actual application scenarios.

  • GaussDB adapts to the UMDK communication protocol stack. The UMDK capability is provided and maintained by the OS.
  • By default, the umdk_enabled 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.
  • To 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 operating systemOS.

    If the result of the preceding operation shows that 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 the value 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 in Table 1.

Setting suggestion: Retain the default value.

  • 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).