Stress test disk I/O

magic commands for disk i/o performance tuning

shared requirements for all kinds of resources (CPU RAM I/O TX/RX)

    # debian/ubuntu
    apt install -y stress iperf3 hdparm

    # slackware
    slackpkg update
    slackpkg install screen-4 utempter
    slackpkg install rsync cyrus-sasl curl lz4 zstd xxHash nghttp2 brotli
    slackpkg install kernel-headers patch gcc-11 automake autoconf-2 binutils make guile gc
    wget https://github.com/sbopkg/sbopkg/releases/download/0.38.2/sbopkg-0.38.2-noarch-1_wsr.tgz
    installpkg --terse sbopkg-0.38.2-noarch-1_wsr.tgz
    sbopkg -r
    sbopkg -i stress
    sbopkg -i perf3
    slackpkg install hdparm

and proceed

RSECT

hdparm -Tt /dev/xvda1
dd if=/dev/xvda1 of=/dev/null bs=1M count=1024

WSECT

dd if=/dev/zero of=lala bs=1M count=1024 conv=sync
rm -f lala

Requirements

apt install sysstat iotop fatrace dstat

What processes

quick and easy

iotop -aoP # IOPS
iotop -oP  # bandwidth

==> sort by IO then by DISK WRITE/READ

find out what processes are keeping the cpu busy with writes

while true; do ps -eo state,pid,cmd | grep ^D; done
^C

find out about a specific PID

pid=PID

pidstat -dl $pid

file-system level

see what files are being accessed from a specific path

lsof /path/to/folder
fuser -m /path/to/folder

specific folder w/o sub-folders

lsof +f -- /path/to/folder

writes only

fatrace | grep ' W ' | grep -v log

also

dstat -dr --aio

Resources

https://madflojo.medium.com/troubleshooting-high-i-o-wait-in-linux-358080d57b69 –> grep ^D

https://serverfault.com/questions/169676/how-to-check-disk-i-o-utilization-per-process –> pidstat


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2022 Pierre-Philipp Braun