Monitoring your VPS performance is essential for maintaining reliability, identifying bottlenecks, and planning capacity. Without proper monitoring, you are flying blind - small issues can compound into downtime, and you will not know if your application is outgrowing its resources until users start complaining. This guide covers the tools and techniques every SakuraHost VPS administrator should implement.
1. Real-Time System Monitoring
htop - Interactive Process Viewer
htop is the go-to tool for real-time process monitoring with an intuitive color-coded interface.
Key information displayed by htop includes CPU usage per core, memory and swap utilization, running processes sorted by resource consumption, load averages, and uptime. Use F6 to sort by different columns, F9 to kill processes, and F5 for tree view showing parent-child relationships.
Understanding Load Averages
The three load average numbers represent system load over 1, 5, and 15 minutes. For a VPS with 2 CPU cores:
- Load < 2.0 - System is handling the workload comfortably
- Load 2.0 - 4.0 - System is busy but responsive
- Load > 4.0 - System is overloaded, investigate immediately
A simple check: uptime shows load averages without entering an interactive tool.
2. CPU and Memory Analysis
vmstat - Virtual Memory Statistics
Key columns to watch in vmstat output:
- r (run queue) - Processes waiting for CPU. Consistently above your CPU count indicates saturation
- si/so (swap in/out) - Any non-zero values mean RAM is insufficient and the system is using slow disk-based swap
- us/sy/id - User, system, and idle CPU percentages. High system (sy) may indicate kernel-level issues
- wa (wait) - CPU time spent waiting for I/O. High values suggest disk bottleneck
free - Memory Usage Summary
3. Disk I/O Monitoring
iostat - Disk Performance
Critical iostat metrics:
- %util - Disk utilization. Above 80% sustained indicates a disk bottleneck
- await - Average time (ms) for I/O requests. Below 10ms is excellent, above 50ms is concerning
- r/s and w/s - Read and write operations per second (IOPS)
Disk Space Monitoring
4. Network Monitoring
iftop - Network Bandwidth Monitor
iftop shows real-time bandwidth usage per connection, making it easy to identify which services or IP addresses are consuming the most bandwidth.
ss - Socket Statistics
5. Log Monitoring and Analysis
Logs are your primary debugging tool. Key log files to monitor:
journalctl for Systemd Logs
6. Automated Monitoring Scripts
Create a simple monitoring script that alerts you when resources exceed thresholds:
Schedule it with cron to run every 5 minutes: