"Fossies" - the Fresh Open Source Software Archive

Member "octavia-3.0.2/elements/haproxy-octavia/post-install.d/20-haproxy-tune-kernel" (19 Dec 2018, 1230 Bytes) of package /linux/misc/openstack/octavia-3.0.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "20-haproxy-tune-kernel": 3.0.1_vs_3.0.2.

    1 #!/bin/bash
    2 
    3 set -eu
    4 set -o pipefail
    5 
    6 sysctl-write-value net.ipv4.tcp_max_tw_buckets 5800000
    7 sysctl-write-value net.ipv4.tcp_max_orphans 5800000
    8 sysctl-write-value net.ipv4.tcp_max_syn_backlog 100000
    9 sysctl-write-value net.ipv4.tcp_keepalive_time 300
   10 sysctl-write-value net.ipv4.tcp_tw_recycle 0
   11 sysctl-write-value net.ipv4.tcp_tw_reuse 1
   12 sysctl-write-value net.core.somaxconn 65534
   13 sysctl-write-value net.ipv4.tcp_synack_retries 3
   14 sysctl-write-value net.core.netdev_max_backlog 100000
   15 # This should allow HAProxy maxconn to be 1,000,000
   16 sysctl-write-value fs.file-max 2097152
   17 sysctl-write-value fs.nr_open 2097152
   18 
   19 # It's ok for these to fail if conntrack module isn't loaded
   20 sysctl-write-value net.netfilter.nf_conntrack_buckets 125000 || true
   21 sysctl-write-value net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait 5 || true
   22 sysctl-write-value net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait 5 || true
   23 
   24 sysctl-write-value net.ipv4.tcp_fin_timeout 5
   25 sysctl-write-value net.ipv4.ip_nonlocal_bind 1
   26 sysctl-write-value net.ipv6.ip_nonlocal_bind 1
   27 sysctl-write-value net.ipv4.tcp_rmem "16384 65536 524288"
   28 sysctl-write-value net.ipv4.tcp_wmem "16384 349520 699040"
   29 sysctl-write-value net.ipv4.ip_local_port_range "1025 65534"