UNIX Storage Diagnostics
dstat
dstat -pcmrd
run blk new|usr sys idl wai stl| used free buff cach| read writ| read writ5.0 0 0| 43 1 55 0 0|28.5G 7116M 7883M 18.4G|1.00 6.00 | 512B 29k5.0 0 0| 44 1 55 0 0|28.5G 7119M 7883M 18.4G| 0 0 | 0 0 5.0 0 0| 44 1 55 0 0|28.5G 7116M 7883M 18.4G|15.0 20.0 |1410k 154k5.0 0 0| 44 1 54 0 0|28.5G 7115M 7883M 18.4G|1.00 7.00 | 512B 37k5.0 0 0| 43 2 54 0 0|28.5G 7115M 7883M 18.4G| 0 2.00 | 0 548k5.0 0 0| 43 2 55 0 0|28.5G 7115M 7883M 18.4G|1.00 7.00 | 512B 64k5.0 0 0| 43 1 55 0 0|28.5G 7114M 7883M 18.4G|3.00 12.0 | 17k 73k5.0 0 0| 44 1 55 0 0|28.5G 7114M 7883M 18.4G| 0 0 | 0 0 5.0 0 0| 47 2 52 0 0|28.5G 7120M 7883M 18.4G|1.00 14.0 | 512B 189k5.0 0 0| 44 1 55 0 0|28.5G 7120M 7883M 18.4G| 0 8.00 | 0 88k6.0 0 0| 45 1 54 0 0|28.5G 7115M 7883M 18.4G|10.0 0 |1280k 0 5.0 0 0| 43 1 55 1 0|28.5G 7120M 7883M 18.4G|1.00 4.00 | 512B 21k6.0 0 0| 44 1 55 0 0|28.5G 7123M 7883M 18.4G| 0 0 | 0 0 5.0 0 0| 44 2 54 0 0|28.5G 7123M 7883M 18.4G|1.00 2.00 | 512B 4608B6.0 0 0| 44 1 55 0 0|28.5G 7123M 7883M 18.4G| 0 56.0 | 0 364k
-p Enable Process Stats
-c Enable CPU Stats
-m Enable Memory Stats
-r Enable I/O Stats
-d Enable Disk Stats
fio
Random Write Test
sudo fio --name=myjob \
--ioengine=libaio \
--readwrite=randwrite \
--size=5120M \
--numjobs=4 \
--runtime=240 \
--group_reporting
Arbitrary job name
Linux native asynchronous I/O
Random writes
Total size of file I/O for each thread of this job
How many clones of this job to run
How long job will run for (in seconds)
Displays aggregate totals for all jobs
iostat
iostat -xcdmN 5
-x Extended statistics
-c CPU statistics
-d Device utilisation
-m Megabytes per second
-N Device mapper names
5 refresh every 5 seconds
r/sw/srMB/swMB/srrqm/swrqm/s%rrqm%wrqmr_awaitw_awaitaqu-szrareq-szwareq-szscvtm%util
read requests per secondwrite requests per secondmegabytes read per secondmegabytes written per secondread requests merged per second that were queued to the devicewrite requests merged per second that were queued to the devicepercentage of read requests merged together before being sent to the devicepercentage of write requests merged together before being sent to the deviceaverage time (in milliseconds) for read requests issued to the device to be served. Includes the time spent by the requests in queue and the time spent servicing them.average time (in milliseconds) for write requests issued to the device to be served. Includes the time spent by the requests in queue and the time spent servicing them.average queue length of the requests that were issued to the deviceaverage size (in kilobytes) of the read requests that were issued to the deviceaverage size (in kilobytes) of the write requests that were issued to the deviceaverage service time (in milliseconds) for I/O requests that were issued to the device. This field will be removed in a future sysstat version.Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% for devices serving requests serially. But for devices serving requests in parallel, such as RAID arrays and modern SSDs, this number does not reflect their performance limits.
iostat -htx 1 1
-h Human Readable
-t Include time in output
-x Extended statistics
1 refresh every 1 second
1 for one iteration only
iotop
iotop
To disable...sudo sysctl kernel.task_delayacct=0
Note that turning this on may have some effect on system performance
blktrace
fatrace
sudo fatrace
inotify
iwatch
Disk I/O (AIX)
nmon
d
Disk I/O Graphs
nmon
D
DiskIO +Service times
D
D
D
nmon
o
Disks %Busy Map
nmon
a
Disk Adapter
e
ESS I/O
V
Volume Group stats
AIO Servers (AIX)
A
Asynchronous I/O Processes
ioo -FL | more
n/a means parameter not supported by the current platform or kernel
Parameter types: S = Static: cannot be changed D = Dynamic: can be freely changed B = Bosboot: can only be changed using bosboot and reboot R = Reboot: can only be changed during reboot C = Connect: changes are only effective for future socket connections M = Mount: changes are only effective for future mountings I = Incremental: can only be incremented d = deprecated: deprecated and cannot be changed
Value conventions: K = Kilo: 2^10 G = Giga: 2^30 P = Peta: 2^50 M = Mega: 2^20 T = Tera: 2^40 E = Exa: 2^60
ioo -o aio_maxreqs
iostat -A | more
Legacy AIO Serversiostat -P | more
POSIX AIO Serversaio: avgc avfc maxgc maxfc maxreqs avg-cpu: % user % sys % idle % iowait physc % entc 5586.7 0.0 210 0 131072 12.9 8.3 21.1 57.7 0.9 22.1
Disks: % tm_act Kbps tps Kb_read Kb_wrtncd0 0.0 0.0 0.0 0 0hdisk2 0.0 0.0 0.0 0 0hdisk10 21.3 34431.3 2264.2 248027820600 3412123516hdisk9 21.9 47080.6 3040.9 330712945491 13100502192hdisk8 0.0 21.7 0.1 95690628 62895220hdisk7 1.3 185.2 15.8 1202817237 149950408hdisk0 0.0 0.0 0.0 0 0hdisk6 1.1 128.7 19.2 330604275 609391187hdisk5 5.1 2398.9 138.2 7024666038 10493528608hdisk1 0.0 0.0 0.0 5087 40
pstat -a | head -3; pstat -a | egrep ' aioserver'
Legacy AIO Serverspstat -a | head -3; pstat -a | egrep 'posix_aioserver'
POSIX AIO ServersSLT ST PID PPID PGRP UID EUID TCNT NAME 57 a 39000a 1 39000a 211 211 1 aioserver 67 a 430074 1 430074 211 211 1 aioserver 69 a 4500bc 1 4500bc 211 211 1 aioserver 92 a 5c006e 1 5c006e 211 211 1 aioserver 93 a 5d0094 1 5d0094 211 211 1 aioserver 97 a 610030 1 610030 211 211 1 aioserver100 a 64005e 1 64005e 211 211 1 aioserver103 a 670066 1 670066 211 211 1 aioserver105 a 690048 1 690048 211 211 1 aioserver...
ps -ek|grep -v grep|grep –v posix_aioserver|grep -c aioserver
IOCP (AIX)
IO Completion Ports lslpp -l bos.iocp.rte
lsdev -Cc iocp
VIO (AIX)
To determine if your I/O is handled by a Virtual I/O Server...
lsdev -Cc disk
Disks labelled as "Virtual SCSI Disk Drive" are managed by a VIO Server
lspath
lspath -E -l hdisk10 -i 0 -a priority
lsattr -El hdisk10
lsattr -El vscsi0
lsmpio -l hdisk10
Bibliography
IOPShttps://unixutils.com/monitoring-disk-iops-in-linux/
iotophttps://superuser.com/questions/610581/iotop-complains-config-task-delay-acct-not-enabled-in-kernel-only-for-specifichttps://www.kernel.org/doc/html/latest/accounting/delay-accounting.html#usagehttps://www.mankier.com/8/iotop-chttps://unix.stackexchange.com/questions/238444/iotop-and-ionice-p-show-a-different-class-priority-for-the-same-process(1) https://linux.die.net/man/1/ionice
AIOhttps://www.linkedin.com/pulse/aio-aix-fast-path-great-performance-mark-rayhttps://www.ibm.com/docs/en/aix/7.2?topic=aio-identifying-number-servers-used-currentlyhttps://www.ibm.com/docs/en/aix/7.3?topic=aio-identifying-number-servershttps://www.ibm.com/docs/en/aix/7.2?topic=aio-tunable-values-asynchronous-iohttps://community.oracle.com/mosc/discussion/2718030/aioservers-on-aixhttps://support.oracle.com - How does Oracle use AIO servers and what determines how many are used? (Doc ID 443368.1)https://docs.oracle.com/en/database/oracle/oracle-database/12.2/axdbi/checking-asynchronous-input-output-processes.htmlhttps://community.spiceworks.com/t/aioserver/913418/2https://docs.oracle.com/en/database/oracle/oracle-database/19/unxar/administering-oracle-database-on-ibm-aix-on-power-systems-64-Bit.html
iostathttps://manpages.debian.org/testing/sysstat/iostat.1.en.htmlhttps://linux.die.net/man/1/iostathttps://unix.stackexchange.com/questions/104192/iostat-await-vs-svctm
IOCPhttps://www.ibm.com/docs/en/db2/11.1?topic=parallelism-configuring-iocp-aix