Skip to content

Instantly share code, notes, and snippets.

@oznakn
Forked from andrei-dascalu/sysctl
Created October 2, 2020 20:01
Show Gist options
  • Select an option

  • Save oznakn/586f44d83dd1b46d292e2193f865fdc7 to your computer and use it in GitHub Desktop.

Select an option

Save oznakn/586f44d83dd1b46d292e2193f865fdc7 to your computer and use it in GitHub Desktop.

Revisions

  1. @andrei-dascalu andrei-dascalu created this gist Oct 30, 2018.
    21 changes: 21 additions & 0 deletions sysctl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    #!/bin/bash

    sysctl -w net.core.netdev_max_backlog="150000"
    sysctl -w net.core.rmem_max="16777216"
    sysctl -w net.core.somaxconn="65535"
    sysctl -w net.core.wmem_max="16777216"
    sysctl -w net.ipv4.ip_local_port_range="1025 65535"
    sysctl -w net.ipv4.tcp_fin_timeout="20"
    sysctl -w net.ipv4.tcp_keepalive_time="30"
    sysctl -w net.ipv4.tcp_max_syn_backlog="20480"
    sysctl -w net.ipv4.tcp_max_tw_buckets="400000"
    sysctl -w net.ipv4.tcp_no_metrics_save="1"
    sysctl -w net.ipv4.tcp_syn_retries="2"
    sysctl -w net.ipv4.tcp_synack_retries="2"
    sysctl -w net.ipv4.tcp_tw_reuse="1"
    sysctl -w net.ipv4.tcp_timestamps="0"
    sysctl -w vm.min_free_kbytes="65536"
    sysctl -w vm.overcommit_memory="1"
    sysctl -w vm.max_map_count="2621440"
    sysctl -w vm.swappiness="10"
    sysctl -w vm.dirty_ratio="40"