Kernel Block I/O Analysis - Kernel Block I/O Analysis - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

The Linux OS block I/O calls like insert, issue, and complete can be traced to provide the various metrics related to I/O operations performed by the application.

This analysis can be used to analyze:

  • Time taken to complete the I/O operations
  • IOPS - Number of block I/O operations per second
  • Read or Write bytes of block I/O operation
  • Block I/O bandwidth
Note: The kernel can continue to perform the queued I/O requests submitted by the profiled application, even after the application exits. So, it is recommended to use system-wide tracing for this analysis.

Prerequisites

  • Linux kernel 5.4 or later is required.
  • BTF support is needed from kernel. AMD uProf expects kernel BTF information to be present at default location: /sys/kernel/btf/vmlinux.
  • From the AMDuProf installed directory, run the script AMDuProfSetup.sh with root access.
    sudo ./AMDuProfSetup.sh

If you install AMD uProf using DEB installer, the script is run by the installer and the info about eBPF (Extended Berkeley Packet Filter) support, BTF support and OS tracing support on the host is provided.

Data Collection

GUI

To launch the AMDuProf GUI, go to Home > Welcome page.
  1. Click Profile an Application on the Welcome page.
  2. Provide application path, application options, working directory, and environment variables, if any. Click Next.
  3. From Custom Configs, select OS Runtime Tracing.
  4. Select diskio event from trace events.
  5. Click Start Profile to start the profiling.

CLI

  • Trace kernel block IO data for launched application.
    AMDuProfCLI collect --trace osrt --osrt-event diskio -o <output-dir> <application>
  • Trace system wide kernel block IO data for 10 sec.
    AMDuProfCLI collect --trace osrt --osrt-event diskio -a -d 10 -o <output-dir>
Example
amd@uprof-ethanolx5 bin]$ ./AMDuProfCLI --trace osrt --osrt-event diskio -o /tmp/ fio --name=test --ioengine=sync -- rw=randwrite --bs=4k --numjobs=1 --size=1G --runtime=1m --time_based

Profiling started
………
Profiling (data collection) completed
Generated data files path: /tmp/AMDuProf-fio -CpuTrace_Sep-06-2024_03-38-23

Here generated session directory is /tmp/AMDuProf-fio-CpuTrace_Sep-06-2024_03-38-23.

Analyze the Data

CLI

Generate the csv report to analyze the data in csv format.
[amd@uprof-ethanolx5 bin]$ ./AMDuProfCLI report -i /tmp/ AMDuProf-fio -CpuTrace_Sep-06-2024_03-38-23 Translation started
…
Report generation started
…
Report generation completed...
Generated report file: /tmp/ AMDuProf-fio-CpuTrace_Sep-06-2024_03-38-23/report.csv
An example of the Disk I/O report section in the .csv report file is here:
Figure 1. Disk I/O Report

GUI

If data is collected using CLI, then use Import Session to import the session into GUI to analyze data in GUI.

Navigate to the ANALYZE page and then select Disk I/O Stats in the navigation bar:
Figure 2. Disk IO Stats

Limitations

  • Diskio I/O is supported for Linux kernels built with BTF support.
  • Analyzing the 32-bit applications is not supported.