HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Communication Library Parameters

This section describes parameter settings and value ranges for communication 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 is a USERSET parameter. Set it based on instructions provided in Table GUC Parameters.

img NOTICE:

  • 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 Unix domain socket.
  • 0 selects the system default.
  • This parameter is not shared between different sessions, which means that this parameter may have different values in different sessions.
  • When showing this parameter, it is the parameter value in the current session connection, not the value of the guc copy.

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

Default value: 0

tcp_keepalives_interval

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

This parameter is a USERSET parameter. Set it based on instructions provided in Table GUC Parameters.

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

Default value: 0

img NOTICE:

  • 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 Unix domain socket.
  • 0 selects the system default.
  • This parameter is not shared between different sessions, which means that this parameter may have different values in different sessions.
  • When showing this parameter, it is the parameter value in the current session connection, not the value of the guc copy.

tcp_keepalives_count

Parameter description: Specifies the number of keepalive signals that can be waited before the MogDB server is disconnected from the client on an OS that supports the TCP_KEEPCNT socket option.

This parameter is a USERSET parameter. Set it based on instructions provided in Table GUC Parameters.

img NOTICE:

  • 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 Unix domain socket.
  • 0 selects the system default.
  • This parameter is not shared between different sessions, which means that this parameter may have different values in different sessions.
  • When showing this parameter, it is the parameter value in the current session connection, not the value of the guc copy.

Value range: 0 to 100. 0 indicates that the connection is immediately broken if MogDB does not receive a keepalived signal from the client.

Default value: 0

tcp_user_timeout

Parameter description: On operating systems that support the TCP_USER_TIMEOUT socket option, set MogDB to specify the maximum amount of time that transmitted data can remain unacknowledged before the TCP connection is forced to close when sending data.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table GUC Parameters.

img NOTICE:

  • If the operating system does not support the TCP_USER_TIMEOUT option, the value of this parameter will not take effect, and the default is 0.
  • This parameter is ignored on operating systems that connect via Unix domain sockets.

Value range: 0-3600000 in ms. where 0 means follow the OS setting.

Default value: 0

Note that the result of this parameter taking effect will be different for different operating system kernels:

  • aarch64 EulerOS (Linux kernel version: 4.19), the timeout time is the value set for this parameter.

  • x86 Euler2.5 (Linux kernel version: 3.10), the timeout is not the value of this parameter, but the maximum value of different intervals, i.e. the timeout is the maximum value of the upper limit of the interval of “Linux TCP retransmission total time” in which the value of tcp_user_timeout is set. The timeout value is the maximum value of the upper limit of the “Total Linux TCP retransmission time” range for the tcp_user_timeout setting. For example, if tcp_user_timeout=40000, the total retransmission time is 51 seconds.

    Table 1 x86 Euler2.5 (Linux kernel version: 3.10) tcp_user_timeout parameter value description

    Linux TCP retransmission count Linux TCP retransmission total time interval (seconds) Example of tcp_user_timeout setting (milliseconds) Actual Linux TCP retransmission total elapsed time (seconds)
    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: TCP retransmission time per retransmission increases exponentially with the number of retransmissions, when a TCP retransmission reaches 120 seconds, each subsequent retransmission will take 120 seconds without further change.

comm_proxy_attr

Parameter description: Specifies the parameters related to the communication proxy library.

img NOTE:

  • 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: whether to enable the user-mode protocol. The options are as follows: true and false.
    • enable_dfx: whether to enable the communication proxy library view. The options are as follows: true and 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 as follows: [0, Number of CPUs - 1].

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table GUC Parameters.

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

Default value: none

Copyright © 2011-2024 www.enmotech.com All rights reserved.