Forked from sergey-dryabzhinsky/sysctl-proxmox-tune.conf
Created
April 21, 2022 04:46
-
-
Save Srobin2020S/ca2005e5982b48eb5064ec566f8c014c to your computer and use it in GitHub Desktop.
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # allow that much active connections | |
| net.core.somaxconn = 256000 | |
| # do less swap but not disable it | |
| vm.swappiness = 1 | |
| # allow application request allocation of virtual memory | |
| # more than real RAM size (or OpenVZ/LXC limits) | |
| vm.overcommit_memory = 1 | |
| net.core.netdev_max_backlog = 16000 | |
| net.ipv4.tcp_max_syn_backlog = 32000 | |
| net.ipv4.tcp_syncookies = 1 | |
| net.unix.max_dgram_qlen = 1024 | |
| # Don't need IPv6 for now | |
| # If you use IPv6 - comment this line | |
| net.ipv6.conf.all.disable_ipv6 = 1 | |
| # Flush TIME_WAIT connections faster | |
| net.ipv4.tcp_fin_timeout = 10 | |
| # same for nf_conntrac moule | |
| net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 15 | |
| # Increase ephermeral IP ports | |
| net.ipv4.ip_local_port_range = 10240 61000 | |
| # https://www.serveradminblog.com/2011/02/neighbour-table-overflow-sysctl-conf-tunning/ | |
| net.ipv4.neigh.default.gc_thresh1 = 1024 | |
| net.ipv4.neigh.default.gc_thresh2 = 2048 | |
| net.ipv4.neigh.default.gc_thresh3 = 4096 | |
| # http://www.opennet.ru/opennews/art.shtml?num=44945 | |
| net.ipv4.tcp_challenge_ack_limit = 9999 | |
| # https://major.io/2008/12/03/reducing-inode-and-dentry-caches-to-keep-oom-killer-at-bay/ | |
| vm.vfs_cache_pressure = 10000 | |
| ## | |
| # Adjust vfs cache | |
| # https://lonesysadmin.net/2013/12/22/better-linux-disk-caching-performance-vm-dirty_ratio/ | |
| # Decriase dirty cache to faster flush on disk | |
| vm.dirty_background_ratio = 5 | |
| vm.dirty_ratio = 10 | |
| # Only on Proxmox 3.x with OpenVZ | |
| ubc.dirty_ratio = 20 | |
| ubc.dirty_background_ratio = 10 | |
| # Don't slow network - save congestion window after idle | |
| # https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance | |
| net.ipv4.tcp_slow_start_after_idle = 0 | |
| # https://tweaked.io/guide/kernel/ | |
| # Don't migrate processes between CPU cores too often | |
| kernel.sched_migration_cost_ns = 5000000 | |
| # Kernel >= 2.6.38 (ie Proxmox 4+) | |
| kernel.sched_autogroup_enabled = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment