100 Days of DevOps — Day 57-Debugging I/O Performance Issue

Prashant Lakhera
6 min readApr 9, 2019

Welcome to Day 57 of 100 Days of DevOps, Focus for today is Debugging I/O Performance Issue

The disk is probably slowest among all the component(CPU/Memory) and causes the performance bottleneck. There are various opensource tools available to narrow down the issue

ps command

ps command is primarily used for CPU/Memory stats because it doesn’t have a statistic for disk I/O. While it doesn’t tell you info about disk I/O it does show the process state which can be used to indicate whether or not the process is waiting for I/O

PROCESS STATE CODESD Uninterruptible sleep (usually IO)R Running or runnable (on run queue)S Interruptible sleep (waiting for an event to complete)T Stopped, either by a job control signal or because it is beingtraced.W paging (not valid since the 2.6.xx kernel)X dead (should never be seen)Z Defunct (“zombie”) process, terminated but not reaped by itsparent.
  • Process waiting for I/O are in D state or Uninterruptible sleep
ps auwx | awk ‘$8 ~ “D”’

So any process while waiting for read()/write(), the process will be put up in special kind of sleep known as D state or Disk Sleep.

--

--

Prashant Lakhera

AWS Community Builder, Ex-Redhat, Author, Blogger, YouTuber, RHCA, RHCDS, RHCE, Docker Certified,4XAWS, CCNA, MCP, Certified Jenkins, Terraform Certified, 1XGCP