Confirm iowait is the bottleneck
vmstat with a one-second interval during the slow window:
BASH
vmstat 1 30wa column (iowait) and the bi/bo columns (blocks in/out per second). If wa climbs above 20-30% while us and sy stay low, disk I/O is the constraint.
For more detail per device, use iostat from the sysstat package:
BASH
# Install if missing: apt install sysstat (Debian/Ubuntu) or yum install sysstat (CentOS/RHEL)
iostat -xz 2 10- %util — how saturated the device is. Sustained values near 100% mean the disk cannot keep up.
- await — average time in milliseconds each I/O request waits. On a healthy SSD this is typically under 5ms; on a busy spinning disk, it can climb into hundreds.
- r/s, w/s — read and write operations per second. A sudden spike in
w/sduring the slow window points to a write-heavy job like a backup or log compression.
Identify which process is doing the I/O
iotop shows per-process disk read/write rates in real time. It needs root and a kernel compiled with CONFIG_TASK_IO_ACCOUNTING (most mainstream distro kernels have this).
BASH
sudo iotop -oa-o flag shows only processes currently doing I/O, and -a accumulates totals so you can see which process has done the most I/O since you started watching. Leave this running when the slowdown window hits.
Typical culprits that show up:
- tar, gzip, pigz, rsync, rclone — backup scripts compressing or copying files.
- vzdump — Proxmox's built-in backup tool, which reads entire disk images.
- logrotate calling gzip or xz to compress rotated logs.
- mysqlcheck, mysqldump, mariabackup — database maintenance or dump jobs.
- updatedb (mlocate) — rebuilds the file index, reads every directory on disk.
- fstrim or a TRIM cron — can cause latency spikes on some storage backends.
Trace the process back to a cron job or timer
/var/spool/cron/crontabs/(Debian/Ubuntu) or/var/spool/cron/(CentOS/RHEL) — per-user crontabs./etc/crontab— system crontab./etc/cron.d/— drop-in cron files from packages./etc/cron.daily/,/etc/cron.hourly/,/etc/cron.weekly/— scripts run by anacron or run-parts.
iotop:
BASH
grep -r 'rsync\\|tar\\|mysqldump\\|vzdump\\|logrotate' /etc/cron* /var/spool/cron/ 2>/dev/nullBASH
systemctl list-timers --all/usr/local/cpanel/scripts/cpbackup. Plesk uses its own scheduler. Check the panel's backup settings if you do not find the job in cron.
Fix it: reschedule, throttle, or both
ionice sets the I/O scheduling class and priority for a process. Wrapping your backup command with ionice -c3 puts it in the "idle" class, meaning it only gets disk time when nothing else needs it:
BASH
# In the crontab entry, prefix the command:
0 3 * * * ionice -c3 nice -n 19 /usr/local/bin/backup.shnice -n 19 lowers CPU priority too, which helps if the job also compresses data. The combination means the backup still finishes, but yields to your web server and database whenever they need the disk or CPU.
One caveat: ionice effectiveness depends on the I/O scheduler. The cfq scheduler respects ionice classes well. The mq-deadline and none schedulers (common on NVMe and virtio devices) may ignore ionice classes entirely. Check your scheduler:
BASH
cat /sys/block/vda/queue/schedulervda with your actual block device. If the output shows [none] or [mq-deadline], ionice's idle class may have limited effect, and you would need cgroup-based I/O throttling instead (using systemd's IOReadBandwidthMax/IOWriteBandwidthMax in a service unit, or cgroup v2's io.max directly).
Use bandwidth-limited tools. Many backup tools have built-in throttling. rsync has --bwlimit (in KBps). rclone has --bwlimit. mysqldump does not, but piping it through pv -L 10m limits throughput. Using tool-level throttling is often more predictable than ionice.
Verify the fix
vmstat 1 or iostat -xz 2 session during the new window and compare wa and %util to your earlier baseline. If iowait dropped and your application response times stayed normal, the fix holds.
For ongoing monitoring, a lightweight approach: add a one-liner to cron that logs iowait every minute to a file, so you have historical data without installing a full monitoring stack:
BASH
* * * * * echo "(date +\\%H:\\%M)(awk '{print $5}' /proc/stat | head -1)" >> /var/log/iowait.log/proc/stat for iowait requires a delta calculation between two readings, so for a proper per-minute average, sar from the sysstat package (enabled via its own cron or systemd timer) is more reliable. Once sysstat collection is active, sar -d gives you historical per-device I/O stats you can review the next morning.
When the problem is not your cron
iotop shows no heavy process inside your VPS but iostat still reports high await and low throughput, the bottleneck is on the host's storage layer. You cannot fix that from inside the guest. Contact your provider with the iostat output showing high await with low internal I/O — that is concrete evidence the problem is external.
Nightly slowdowns are one of the most common support complaints on shared and VPS hosting. The fix is almost always boring: find the scheduled job, move it or throttle it, verify the next night. The commands above give you the evidence to stop guessing and start fixing.