Sobes.tech
Senior

How do you monitor disk subsystem load? What utilities do you use and what do you pay attention to?

sobes.tech AI

Answer from AI

To monitor disk subsystem load in Linux, the following utilities are commonly used:

  • iostat (from the sysstat package) — shows input/output statistics for devices, including the number of operations per second, wait time, and load.
  • iotop — displays processes actively using the disk, with information on read/write speeds.
  • vmstat — provides general system information, including input/output blockages.
  • dstat — combines data on CPU, disk, network, and other resources.
  • sar — collects and displays historical disk activity data.

Points to pay attention to:

  • %util (in iostat) — shows how busy the device is. Values close to 100% indicate the disk is at its limit.
  • await — average wait time for input/output operations. High values may indicate a bottleneck.
  • Read/write speeds — to understand how intensively the disk is used.
  • Number of operations per second (IOPS).
  • In iotop — processes with high disk load to identify culprits.

Example of using iostat:

iostat -x 1 5

This will show extended disk statistics at 1-second intervals, five times in a row.

It is important to consider the type of disks (HDD, SSD), filesystem, and caching settings, as they influence the metrics.