Cubic keeps pushing until packets drop, which stands queues up in the path on fast links. BBR paces to its estimate of bottleneck bandwidth and minimum RTT instead, cutting queueing latency while keeping throughput. fq is the qdisc BBR is built to pace through. tcp_bbr and sch_fq are modules in every kernel Omarchy ships and autoload when the sysctls are set. The migration re-applies the shipped file so new connections switch without a reboot, no-ops once the live values match, and flags a reboot if applying fails. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
# Solve common flakiness with SSH (MTU discovery on flaky links).
|
|
net.ipv4.tcp_mtu_probing=1
|
|
|
|
# BBR estimates bottleneck bandwidth and minimum RTT and paces to them, where
|
|
# cubic keeps pushing until packets drop. That cuts queueing latency
|
|
# (bufferbloat) on fast links. fq is the qdisc BBR is built to pace through.
|
|
net.core.default_qdisc=fq
|
|
net.ipv4.tcp_congestion_control=bbr
|
|
|
|
# Tune reclaim for swap on zram, which is orders of magnitude faster than the
|
|
# disk swapfile these defaults assume.
|
|
|
|
# Anything above 100 tells the kernel that evicting an anonymous page is
|
|
# cheaper than dropping a page-cache page it would have to re-read from disk.
|
|
# With a compressed RAM device that is true, so the disk-era default of 60
|
|
# leaves the page cache starved. Stop at 150: every page swapped still costs
|
|
# a compression now and a decompression on fault-back.
|
|
vm.swappiness=150
|
|
|
|
# Halve the eagerness to drop dentry/inode cache, which is costly to rebuild
|
|
# and can't spill to zram. Not lower: 0 can OOM.
|
|
vm.vfs_cache_pressure=50
|
|
|
|
# Read one page per swap-in fault. The default of 8 pays for a seek that zram
|
|
# doesn't have, and every extra page costs a separate decompression.
|
|
vm.page-cluster=0
|
|
|
|
# Don't let external fragmentation raise the watermarks, which produces
|
|
# reclaim bursts while memory is still free.
|
|
vm.watermark_boost_factor=0
|
|
|
|
# Keep ~1.25% of memory free instead of 0.1%, so kswapd reclaims in the
|
|
# background rather than letting allocations stall in direct reclaim.
|
|
vm.watermark_scale_factor=125
|
|
|
|
# Cap dirty pages at 64M/256M instead of the default 10%/20% of RAM, which
|
|
# lets gigabytes of writeback pile up and flush in stalling bursts.
|
|
vm.dirty_background_bytes=67108864
|
|
vm.dirty_bytes=268435456
|
|
|
|
# With bursts bounded above, the flusher can wake every 15s instead of 5s.
|
|
vm.dirty_writeback_centisecs=1500
|