Tracking I/O-heavy processes with iotop

Many DBAs and system administrators are familiar with the top command, which displays the processes that use the most CPU or RAM. However, this does not help us find the processes that cause high amounts of system I/O.

Fortunately, there is a command, much like top, that is designed specifically for displaying the processes that make storage requests. The iotop utility displays a continuously updated list of the processes and any I/O they are handling. Provided that the server is dedicated to PostgreSQL, we can use this information to almost instantly identify one or more database backends that make disk requests.

Just like top, processes are only sorted to the head of the list as long as their I/O continues ...

Get PostgreSQL 9 High Availability Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.