VDS
VDS performance tuning basics
Tuning is mostly about finding the real bottleneck and then making small, measurable changes. Avoid copying giant tweak lists from the internet. Commands are for Ubuntu and Debian and may vary elsewhere, and you should make backups before changing system files.
1. Measure first
- uptime for load averages
- htop for CPU and memory by process
- vmstat 5 for CPU, memory, swap and wait times
- iostat -x 5 for disk (install sysstat)
- Write down numbers before and after each change
2. Remove what you do not need
- systemctl list-unit-files --state=enabled shows what starts at boot
- sudo systemctl disable --now NAME stops unneeded services
- sudo apt autoremove cleans unused packages
3. Memory
- Give databases and apps sensible limits instead of unlimited memory
- Keep a small swap file as a safety net
- sudo sysctl vm.swappiness=10 reduces eager swapping, and add it to /etc/sysctl.conf to keep it
4. Disk
- Trim logs with sudo journalctl --vacuum-time=7d
- Run sudo fstrim -av if your storage supports it
- Move heavy temp files off the root disk if you can
5. File limits
Busy servers can hit open file limits.
- ulimit -n shows the current value
- For services, add LimitNOFILE=65535 in the systemd unit
6. Network
- ss -s summarises connections
- Use nginx or another proxy with keep-alive for web apps
- Keep your location close to users for lower latency
7. Application level
- Add database indexes
- Cache repeated work
- Use the latest stable runtime version
- Set process priority with nice for background jobs, for example nice -n 10 command
Do not do this
- Do not disable security features for tiny gains
- Do not change many settings at once
- Do not tune before measuring
Keep it healthy
Schedule updates, rotate logs and review usage monthly. If tuning no longer helps and CPU is still maxed, a bigger plan is the honest answer, and Tabi Cloud lets you change plans any time. Our support team can review your numbers via Discord ticket or email.