Should I tune more performance setting? E.g.,
For a development laptop, here are the most relevant sysctl settings:
Priority Settings for Development
99-inotify.conf (file watchers for IDEs, build tools)
# You probably already have these, but here are good values:
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 512
fs.inotify.max_queued_events = 32768
99-vm.conf (better responsiveness)
# Reduce swap usage - keeps things snappy on a laptop
vm.swappiness = 10
# Better for SSD performance (most laptops have SSDs)
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
# Helps prevent OOM killing important processes
vm.vfs_cache_pressure = 50
99-network.conf (optional, for better local development)
# Useful if running many local services/containers
net.core.somaxconn = 1024
net.ipv4.ip_local_port_range = 1024 65535
# Faster localhost connections
net.ipv4.tcp_tw_reuse = 1
99-fs.conf (file handles for containers/many processes)
# Increase file descriptor limits
fs.file-max = 2097152
# Useful if you work with many small files
fs.aio-max-nr = 1048576
Skip These for a Laptop:
- Security hardening settings (unless you're on untrusted networks)
- Aggressive network buffer tuning (overkill for dev work)
- IP forwarding/routing settings
To Apply:
sudo sysctl --system
# or for a single file:
sudo sysctl -p /etc/sysctl.d/99-vm.conf
The vm.swappiness and inotify settings will have the most noticeable impact on your development experience. The inotify limits prevent file watcher errors with tools like VS Code, Webpack, and Docker, while lower swappiness keeps your system more responsive.
What kind of development do you do? (web, containers, etc.) I can refine recommendations based on that.
Should I tune more performance setting? E.g.,