Created
October 29, 2025 07:09
-
-
Save luckylittle/e613e7437bbc034a051823c96794e196 to your computer and use it in GitHub Desktop.
Optimized for media streaming: buffer settings, network throughput, and I/O scheduling
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
| # Optimized sysctl.conf for Media Streaming Server | |
| # Hardware: 4 cores / 8 threads, 16GB RAM, 1000Mb/s NIC, HDD (not SSD/NVMe) | |
| # Last rev: v1.5.8/26092025 | |
| # | |
| # For Debian-based systems: | |
| # 1. Save this file to /etc/sysctl.conf | |
| # 2. Apply immediately with: sudo sysctl -p | |
| # | |
| # For RHEL-based systems: | |
| # 1. Save this file to /etc/sysctl.d/99-custom.conf | |
| # 2. Apply immediately with: sudo sysctl -p /etc/sysctl.d/99-custom.conf | |
| # 3. Ensure it loads at boot: sudo systemctl restart systemd-sysctl | |
| # | |
| # IMPORTANT: Test these settings with your specific workload. | |
| # | |
| net.core.rmem_max = 12288000 | |
| net.core.wmem_max = 12288000 | |
| net.core.rmem_default = 2048000 | |
| net.core.wmem_default = 2048000 | |
| net.core.optmem_max = 2097152 | |
| net.ipv4.tcp_rmem = 786432 3145728 6291456 | |
| net.ipv4.tcp_wmem = 786432 3145728 6291456 | |
| net.ipv4.udp_mem = 786432 3145728 6291456 | |
| net.ipv4.tcp_mem = 786432 3145728 6291456 | |
| net.ipv4.udp_rmem_min = 16384 | |
| net.ipv4.udp_wmem_min = 16384 | |
| net.core.netdev_max_backlog = 100000 | |
| net.core.somaxconn = 32768 | |
| net.ipv4.tcp_max_syn_backlog = 65536 | |
| net.core.busy_poll = 50 | |
| net.core.busy_read = 50 | |
| net.ipv4.tcp_fastopen = 3 | |
| net.ipv4.tcp_notsent_lowat = 16384 | |
| net.core.netdev_budget_usecs = 4000 | |
| net.core.dev_weight = 64 | |
| net.ipv4.tcp_max_tw_buckets = 2000000 | |
| net.ipv4.ip_local_port_range = 1024 65535 | |
| net.ipv4.tcp_congestion_control = bbr | |
| net.core.default_qdisc = fq | |
| net.ipv4.tcp_window_scaling = 1 | |
| net.ipv4.tcp_timestamps = 1 | |
| net.ipv4.tcp_sack = 1 | |
| net.ipv4.tcp_dsack = 1 | |
| net.ipv4.tcp_slow_start_after_idle = 0 | |
| net.ipv4.tcp_fin_timeout = 5 | |
| net.ipv4.tcp_keepalive_time = 300 | |
| net.ipv4.tcp_keepalive_intvl = 10 | |
| net.ipv4.tcp_keepalive_probes = 6 | |
| net.ipv4.tcp_moderate_rcvbuf = 1 | |
| net.ipv4.tcp_frto = 2 | |
| net.ipv4.tcp_mtu_probing = 1 | |
| net.ipv4.conf.all.rp_filter = 1 | |
| net.ipv4.conf.default.rp_filter = 1 | |
| net.ipv4.conf.all.accept_redirects = 0 | |
| net.ipv4.conf.default.accept_redirects = 0 | |
| net.netfilter.nf_conntrack_max = 131072 | |
| kernel.sched_min_granularity_ns = 600000 | |
| kernel.sched_wakeup_granularity_ns = 800000 | |
| kernel.sched_latency_ns = 4000000 | |
| kernel.sched_rt_runtime_us = 980000 | |
| kernel.sched_migration_cost_ns = 120000 | |
| kernel.sched_autogroup_enabled = 0 | |
| kernel.sched_cfs_bandwidth_slice_us = 3000 | |
| vm.swappiness = 10 | |
| vm.dirty_ratio = 5 | |
| vm.dirty_background_ratio = 2 | |
| vm.dirty_expire_centisecs = 1000 | |
| vm.dirty_writeback_centisecs = 100 | |
| vm.zone_reclaim_mode = 0 | |
| vm.min_free_kbytes = 65536 | |
| vm.vfs_cache_pressure = 150 | |
| vm.overcommit_memory = 0 | |
| vm.overcommit_ratio = 50 | |
| vm.max_map_count = 1048576 | |
| vm.page-cluster = 0 | |
| vm.oom_kill_allocating_task = 1 | |
| fs.file-max = 16000000 | |
| fs.nr_open = 1600000 | |
| fs.aio-max-nr = 65536 | |
| fs.inotify.max_user_instances = 1024 | |
| fs.inotify.max_user_watches = 1048576 | |
| kernel.pid_max = 131072 | |
| net.ipv6.conf.all.disable_ipv6 = 1 | |
| net.ipv6.conf.default.disable_ipv6 = 1 | |
| net.ipv6.conf.lo.disable_ipv6 = 1 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generated by https://www.enginyring.com/tools/sysctl.php