Fleet changelogs · dev.ecs0.net
rdmsm4x-changelog-20260926-2120-restore-sysctl-defaults-and-remove-boot-optimizations

rdmsm4x-changelog-20260926-2120-restore-sysctl-defaults-and-remove-boot-optimizations

Restored macOS kernel sysctl parameters to stock defaults and removed custom boot optimization LaunchDaemons.

Scope

Exact Files Touched

Commands Run

# 1. Reset network sysctl parameters to macOS stock defaults
sudo sysctl -w \
  net.inet.tcp.sendspace=131072 \
  net.inet.tcp.recvspace=131072 \
  net.inet.tcp.autorcvbufmax=4194304 \
  net.inet.tcp.autosndbufmax=4194304 \
  kern.ipc.maxsockbuf=8388608

# 2. Reset filesystem and proc limit sysctl parameters to stock defaults
sudo sysctl -w \
  kern.maxfilesperproc=122880 \
  kern.maxfiles=245760 \
  kern.maxvnodes=263168

# 3. Unload persistent boot LaunchDaemons
sudo launchctl unload /Library/LaunchDaemons/com.user.sysctltuning.plist
sudo launchctl unload /Library/LaunchDaemons/limit.maxfiles.plist

# 4. Backup plists to fleet storage
mkdir -p ~/dev/fleet/backups/20260926-sysctl-restore
sudo cp -p /Library/LaunchDaemons/com.user.sysctltuning.plist ~/dev/fleet/backups/20260926-sysctl-restore/
sudo cp -p /Library/LaunchDaemons/limit.maxfiles.plist ~/dev/fleet/backups/20260926-sysctl-restore/

# 5. Remove custom boot plists
sudo rm /Library/LaunchDaemons/com.user.sysctltuning.plist /Library/LaunchDaemons/limit.maxfiles.plist

Verification Evidence

Sysctl Values Before vs After

Parameter Custom Tuned Restored Default Stock Peer Baseline (jdmbair13m5)
kern.maxvnodes 4000000 263168 263168
kern.maxfiles 5000000 245760 245760
kern.maxfilesperproc 2500000 122880 122880
net.inet.tcp.sendspace 1048576 131072 131072
net.inet.tcp.recvspace 1048576 131072 131072
net.inet.tcp.autorcvbufmax 8388608 4194304 4194304
net.inet.tcp.autosndbufmax 8388608 4194304 4194304
kern.ipc.maxsockbuf 16777216 8388608 8388608

Daemon & Limit Verification

How to Undo

To re-enable custom optimizations at boot:

sudo cp ~/dev/fleet/backups/20260926-sysctl-restore/com.user.sysctltuning.plist /Library/LaunchDaemons/
sudo cp ~/dev/fleet/backups/20260926-sysctl-restore/limit.maxfiles.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/com.user.sysctltuning.plist /Library/LaunchDaemons/limit.maxfiles.plist
sudo chmod 644 /Library/LaunchDaemons/com.user.sysctltuning.plist /Library/LaunchDaemons/limit.maxfiles.plist
sudo launchctl load /Library/LaunchDaemons/com.user.sysctltuning.plist
sudo launchctl load /Library/LaunchDaemons/limit.maxfiles.plist

Outstanding Owner Actions