tencent cloud

Feedback

Management Parameters

Last updated: 2023-05-05 11:05:32

    Overview

    Management parameters provide a unified entry for frequently used custom configurations of nodes. You can use this entry to tune the underlying KernelArgs kernel parameters for native nodes. You can also set the Nameservers and Hosts parameters to meet the requirements of the service deployment environment.

    Management Parameter Classification

    Parameter in the Console
    Description
    Nameservers
    DNS server addresses required by service deployment.
    Hosts
    Hosts required by service deployment.
    Kernel parameters for performance tuning. This feature is available only for accounts in the allowlist. You can submit a ticket to apply for the feature.
    Note
    To ensure normal installation of system components, native nodes are automatically injected with Tencent Cloud’s database addresses: nameserver = 183.60.83.19 and nameserver = 183.60.82.98.

    KernelArgs parameters

    Supported OS parameters and their valid values are listed below.

    Sockets and network optimization:

    For proxy nodes expected to process a large amount of concurrent sessions, you can use the following TCP socket and network settings for tuning.
    No.
    Parameter
    Default Value
    Valid Values/Range
    Parameter Type
    Description
    1
    "net.core.somaxconn"
    32768
    4096 - 3240000
    int
    The maximum length of the listening queue for each port in the system.
    2
    "net.ipv4.tcp_max_syn_backlog"
    8096
    1000 - 3240000
    int
    The maximum length of the TCP SYN queue.
    3
    "net.core.rps_sock_flow_entries"
    8192
    1024 - 536870912
    int
    The maximum size of the hash table for RPS.
    4
    "net.core.rmem_max"
    16777216
    212992 - 134217728
    int
    The maximum size, in bytes, of the socket receiving buffer.
    5
    "net.core.wmem_max"
    16777216
    212992 - 134217728
    int
    The maximum size, in bytes, of the socket sending buffer.
    6
    "net.ipv4.tcp_rmem"
    "4096 12582912 16777216"
    1024 - 2147483647
    string
    The minimum/default/maximum size of TCP socket receiving buffer.
    7
    "net.ipv4.tcp_wmem"
    "4096 12582912 16777216"
    1024 - 2147483647
    string
    The minimum/default/maximum size of TCP socket sending buffer.
    8
    "net.ipv4.neigh.default.gc_thresh1"
    2048
    128 - 80000
    int
    The minimum number of entries that can be retained. If the number of entries is less than this value, the entries will not be recycled.
    9
    "net.ipv4.neigh.default.gc_thresh2"
    4096
    512 - 90000
    int
    When the number of entries exceeds this value, the GC will clear the entries longer than 5 seconds.
    10
    "net.ipv4.neigh.default.gc_thresh3"
    8192
    1024 - 100000
    int
    The maximum allowable number of non-permanent entries.
    11
    "net.ipv4.tcp_max_orphans"
    32768
    4096 - 2147483647
    int
    The maximum number of TCP sockets not attached to any user file handle or held by the system. Increase this parameter value properly to avoid the "Out of socket memory" error when the load is high.
    12
    "net.ipv4.tcp_max_tw_buckets"
    32768
    4096 - 2147483647
    int
    The maximum number of timewait sockets held by the system simultaneously. Increase this parameter value properly to avoid the "TCP: time wait bucket table overflow" error.

    File descriptor limits:

    Large amounts of traffic usually come from a large number of local files. You can slightly adjust the following kernel settings and built-in limits so that only a part of the system memory is used to handle larger traffic.
    No.
    Parameter
    Default Value
    Valid Values/Range
    Parameter Type
    Description
    1
    "fs.file-max"
    3237991
    8192 - 12000500
    int
    The limit on the total number of file descriptors (FDs), including sockets, in the entire system.
    2
    "fs.inotify.max_user_instances"
    8192
    1024 - 2147483647
    int
    The limit on the total number of inotify instances.
    3
    "fs.inotify.max_user_watches"
    524288
    781250 - 2097152
    int
    The limit on the total number of inotify watches. Increase this parameter value to avoid the "Too many open files" error.

    Virtual memory:

    The following setting can be used to adjust the operations of the Linux kernel virtual memory (VM) subsystem and the writeout of dirty data on disks.
    No.
    Parameter
    Default Value
    Valid Values/Range
    Parameter Type
    Description
    1
    "vm.max_map_count"
    262144
    65530 - 262144
    int
    The maximum number of memory map areas a process can have.

    Worker thread limits:

    No.
    Parameter
    Default Value
    Valid Values/Range
    Parameter Type
    Description
    1
    "kernel.threads-max"
    4194304
    4096 - 4194304
    int
    The system-wide limit on the number of threads (tasks) that can be created on the system.
    2
    "kernel.pid_max"
    4194304
    4096 - 4194304
    int
    The system-wide limit on the total number of processes and threads. PIDs greater than this value are not allocated.

    Setting the Management Parameters for a Node

    Enabling the feature in the TKE console

    Method 1: Setting the Management parameters for a new node

    1. Log in to the TKE console and create a native node. For more information, see Creating Native Nodes.
    2. On the Create node pool page, click More settings and set the Management parameters for the node, as shown below:
    
    3. Click Create node pool.

    Method 2: Setting the Management parameters for an existing node

    1. Log in to the TKE console and select Cluster in the left sidebar.
    2. On the cluster list page, click the ID of the target cluster to go to the details page.
    3. Choose Node management > Node pool in the left sidebar to go to the Node pool list page.
    4. Click the ID of the node pool to go to the Node list page.
    5. On the node details page, choose Parameter setting > Edit and modify the Management parameters.

    Enabling the feature by using YAML

    apiVersion: node.tke.cloud.tencent.com/v1beta1
    kind: MachineSet
    spec:
    type: Native
    displayName: mstest
    replicas: 2
    autoRepair: true
    deletePolicy: Random
    instanceTypes:
    - C3.LARGE8
    subnetIDs:
    - subnet-xxxxxxxx
    template:
    spec:
    displayName: mtest
    providerSpec:
    type: Native
    value:
    instanceChargeType: PostpaidByHour
    # Set management parameters here
    management:
    hosts:
    - Hostnames:
    - static.fake.com
    IP: 192.168.2.42
    - Hostnames:
    - common.fake.com
    IP: 192.168.2.45
    nameservers:
    - 183.60.83.19
    - 183.60.82.98
    - 8.8.8.8
    kernelArgs:
    - kernel.pid_max=65535
    - fs.file-max=400000
    - net.ipv4.tcp_rmem="4096 12582912 16777216"
    - vm.max_map_count="65535"
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support