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
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.shwith 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
- Click Profile an Application on the Welcome page.
- Provide application path, application options, working directory, and environment variables, if any. Click Next.
- From Custom Configs, select OS Runtime Tracing.
- Select diskio event from trace events.
- 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>
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
[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
GUI
If data is collected using CLI, then use Import Session to import the session into GUI to analyze data in GUI.
Limitations
- Diskio I/O is supported for Linux kernels built with BTF support.
- Analyzing the 32-bit applications is not supported.