From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description=This test case ensures that `blktrace` captures and provides detailed traces for block IO actions. |setup= # Ensure you have a Fedora system. # Install the `blktrace` package: `sudo dnf install blktrace`. |actions= # Open a terminal. # Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`. # In a separate terminal or on the system, perform some disk activities like copying...")
 
No edit summary
 
Line 6: Line 6:
|actions=
|actions=
# Open a terminal.
# Open a terminal.
# Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`.
# Start capturing traces for a specific block device, for example, <nowiki>`/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`. </nowiki>
# In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool.
# In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool.
# After completing the disk activities, stop `blktrace` by pressing `Ctrl+C`.
# After completing the disk activities, stop `blktrace` by pressing `Ctrl+C`.

Latest revision as of 19:35, 12 August 2023

Description

This test case ensures that blktrace captures and provides detailed traces for block IO actions.

Setup

  1. Ensure you have a Fedora system.
  2. Install the blktrace package: sudo dnf install blktrace.

How to test

  1. Open a terminal.
  2. Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`.
  3. In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool.
  4. After completing the disk activities, stop blktrace by pressing Ctrl+C.
  5. Review the generated trace output to ensure that block IO events are recorded.
  6. Filter specific events, like reads (R) or writes (W), from the trace to check their details: blkparse -i /dev/sda -a R,W.

Expected Results

  1. blktrace should start capturing traces without any errors.
  2. The trace output should record detailed block IO events corresponding to the disk activities performed.
  3. Filters applied through blkparse should accurately narrow down the trace output to specific events.

Optional

For deeper testing:

  1. Examine the output for specific flags like queued (Q), issued (D), completed (C), etc.
  2. Test blktrace on various disk types, including HDDs, SSDs, and NVMe drives.
  3. Check the behavior of blktrace with high IO workloads.
  4. Use tools like btt (part of the blktrace suite) to analyze and generate statistics from the trace data.
  5. Ensure proper functioning with different file systems (ext4, xfs, btrfs, etc.).