new blog 2.0


0x0D. [LPIC-301] Capacity Planning - Troubleshoot Resource Problems

Let's kick off with a glossary:
  • a block device = in Linux system it is a special file corresponding to data storage devices. The system talks to block devices using "blocks".
  • block = a bulk of bytes, typically having a multiplication of 1024 as it's size. Files on a filesystem are segmented in blocks. File block size = file bytes size / block size, brought to the next integral value down and incremented by 1. Data being read from a filesystem is not read byte-by-byte, it's read in the whole block instead. It's much faster.
  • "blocks in" / bi = blocks received from a block device. vmstat
  • "blocks out" / bo = blocks sent to a block device. vmstat
  • process blocked by I/O = this happens when the read or write speed for a single process is not sufficient.
It happens on occasions that some processes get blocked (or rather postponed to avoid confusion with the glossary explanations above) due to block devices I/O. (here block devices in the meaning from the glossary). You can verify this information using vmstat, more precisely the info will be displayed in the procs subsection. You may want to perform a test and issue the followoing command:

dd if=/dev/zero of=/dev/null &

This will produce a big number \0's being transferred between two virtual devices continuously. Compare the output from vmstat from before and after the command execution.

Reference to a good resource:
  • Match / correlate system symptoms with likely problems

  • Identify bottlenecks in a system

  • swap

No comments: