O'Reilly logo

PostgreSQL High Performance Cookbook by Dinesh Kumar, Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Identifying disk I/O bottlenecks

In this recipe, we are going to use the iostat command to identify disk-related bottlenecks.

How to do it...

There are various options, that is, switches, available with the iostat command. The following are the most important switches used with iostat:

  1. -d: This switch reports the number of kilobytes transferred per second for specific disks, the number of transfers per second, and the average service time in milliseconds. The following is the usage of the iostat -d command:
            bash-3.2$iostat -d 5 5         sd0 sd2 sd3 sd4         Kps tps serv Kps tps serv Kps tps serv Kps tps serv         1 0 53 57 5 145 19 1 89 0 0 14         140 14 16 0 0 0 785 31 21 0 0 0         8 1 15 0 0 0 814 36 18 0 0 0         11 1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required