Rate This Document
Findability
Accuracy
Completeness
Readability

Modifying OS Parameters

Modify the /etc/sysctl.conf file and use the OS parameters from the Greenplum official website for better performance. Perform the operations in this section on all nodes.

  1. Open the /etc/sysctl.conf file.
    vim /etc/sysctl.conf
  2. Press i to enter the insert mode and add the following content. The following parameters include the OS parameters from the Greenplum official website and user-defined parameters. Adjust the parameters as required.

    You can also adjust the OS parameters recommended by the Greenplum official website based on actual requirements. User-defined parameters are used to solve the problem "interconnect encountered a network error" Displayed When Greenplum Is Running SQL Statements. You are advised to perform this step to set user-defined parameters.

    # OS parameters recommended by the Greenplum official website
    kernel.shmall = 4000000000 # echo $(expr $(getconf _PHYS_PAGES) / 2)
    kernel.shmmax = 500000000 # echo $(expr $(getconf _PHYS_PAGES) / 2 \* $(getconf PAGE_SIZE))
    kernel.shmmni = 4096
    kernel.sem = 1000 10240000 400 10240
    kernel.sysrq = 1
    kernel.core_uses_pid = 1
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.msgmni = 2048
    net.ipv4.tcp_syncookies = 1
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.tcp_tw_recycle = 1
    net.ipv4.tcp_max_syn_backlog = 4096
    net.ipv4.conf.all.arp_filter = 1
    net.ipv4.ip_local_port_range = 10000 65535
    net.core.netdev_max_backlog = 10000
    net.core.rmem_max = 2097152
    net.core.wmem_max = 2097152
    vm.overcommit_memory = 2
    vm.overcommit_ratio = 95 #vm.overcommit_ratio = (RAM - 0.026 * gp_vmem_rq) / RAM #gp_vmem_rq = ((SWAP + RAM) – (7.5GB + 0.05 * RAM)) / 1.7
    vm.swappiness = 10
    # User-defined parameters
    net.ipv4.ipfrag_max_dist = 64000
    net.ipv4.ipfrag_time = 6000
    net.ipv4.ipfrag_high_thresh = 6710886400
    net.ipv4.ipfrag_low_thresh = 671088640
  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the modification take effect.
    sysctl -p