Cpu and Disk Usage Spiked without any reason

Shahariar Dipto 0 Reputation points
2026-07-04T06:48:06.0266667+00:00

I am not sure why my system has maxed out performance on disk, monitoring shows 111gb usage diskbytes, i dont even have that much storage to begin with, what is happening here, i have not done any stress test or anything, only running docker and a few lightweight containers, It has been 40 minutes still the high usage on monitoring tab, my server is inaccessible through ssh or web app is irresponsive

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-07-04T06:48:42.5366667+00:00

    The behavior indicates a resource bottleneck on the VM host, most likely high CPU and/or disk I/O saturation inside the VM, which then makes SSH and the web app unresponsive.

    Use these steps to diagnose and confirm the cause once access is possible again:

    1. Check CPU saturation inside the VM (Linux)
      When SSH is responsive again, connect and run:
         top
      
      This shows which processes are consuming CPU. A process can reach near 100% CPU per core; multithreaded processes can show more than 100% total usage across cores.
      Also check load average and CPU count:
         uptime
         nproc
      
      Compare load average to CPU count: if load is higher than the number of CPUs and idle CPU is low, the VM is CPU‑saturated.
    2. Check for CPU wait on I/O (wa%)
      Use vmstat to see if the CPU is mostly waiting on disk I/O:
         vmstat 2 5
      
      Focus on:
      • wa: time spent waiting for I/O
      • r: run queue length
        High wa with high r indicates processes are blocked on disk I/O, which matches symptoms of an unresponsive system.
    3. Identify disk I/O bottlenecks
      Use iostat to see which disks are saturated and whether latency/queue sizes are high:
         iostat -dxctm 1
      
      The extended stats show throughput, IOPS, queue size, and latency per block device. High utilization and large queue sizes indicate disk saturation, which can explain the monitoring spike and unresponsiveness.
    4. Correlate with Azure diagnostics
      If PerfInsights or Azure diagnostics were run, open the PerfInsights report and use:
      • Top CPU Consumers tab to see which processes caused high CPU usage and when.
      • Top Disk Consumers tab to see which processes generated the most disk I/O during the spike. This helps confirm whether Docker or a specific container is responsible.
    5. Interpret the monitoring anomaly (111 GB disk bytes)
      The “disk bytes” metric is cumulative I/O throughput, not disk capacity. A value like 111 GB can mean the VM has read/written that much data over the sampling period, even if the disk is smaller. Sustained high I/O from containers or background processes can produce such numbers and cause the VM to stall.
    6. Mitigation and next steps
      Once the offending process is identified:
      • Stop or limit the container(s) generating excessive CPU or disk I/O.
      • If the workload is expected to be heavy, consider scaling the VM size up (more CPU/IOPS) or moving to a disk SKU with higher throughput/IOPS.
      • If the spike was unexpected, review recent changes to containers, images, or jobs that might have triggered heavy I/O (e.g., logging, backups, database operations).

    If the VM remains inaccessible for a long time, use the Azure portal to capture diagnostics (such as PerfInsights) or restart the VM as a last resort, understanding that this will terminate current processes.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.