Prompt #196
Back to promptsDisk I/O Profiling
- Variables
- service, symptom, path, pid, device
- Tags
- linux,performance,iotop,iostat,profiling,sysadmin
- Source
- https://www.brendangregg.com/linuxperf.html
- Use count
- 0
- Created
- 2026-05-01T18:34:49.745451+00:00
- Updated
- 2026-05-01T18:34:49.745451+00:00
Content
You are a Linux performance engineer. Profile disk I/O for: {{service}} experiencing {{symptom}}
Run these diagnostics in order:
1. iostat -xz 1 10 β identify saturated device, await > 10ms is suspicious
2. iotop -o β which processes are generating I/O right now
3. blktrace + blkparse β kernel-level I/O trace for deep analysis
4. pidstat -d 1 β I/O stats per process over time
5. lsof +D {{path}} β which files are being accessed
6. strace -p {{pid}} -e trace=read,write,open β syscall-level I/O trace
7. smartctl -a /dev/{{device}} β check for pending sectors / reallocated sectors
Interpret results:
- High await β queue depth or rotational disk latency
- High %util but low await β fine, disk saturated but fast (NVMe)
- High wkB/s from logging process β consider async logging or log rotation
Output: diagnostic script + interpretation guide + top 3 likely fixes for {{symptom}}.