f2fsslower(8)
π f2fsslower(8) π
System Manager's Manual β¨
β¨ NAME β¨
okay so f2fsslower is the tool that spots slow f2fs file operations and tells you everything about each one π π
π SYNOPSIS π
f2fsslower [-h] [-s] [-p PID] [min_ms]
π¦ DESCRIPTION π¦
bestie, this tool traces the common f2fs file operations: reads, writes, opens, and syncs β¨ It measures how long each one takes, and prints the details for any that went over a threshold π«Ά
WARNING: see the OVERHEAD section, seriously π
By default the minimum threshold is 10 milliseconds πΈ If you set the threshold to 0, every single event gets printed (warning: it's very verbose, like a chatty group chat π).
Since this works by tracing the f2fs_file_operations interface functions, it's going to need updating whenever those functions change π§
Since this uses BPF, only the root user can run it π
π REQUIREMENTS π
CONFIG_BPF and bcc are needed π
β¨ OPTIONS β¨
-p PIDβ only trace this PID π―min_msβ the minimum I/O latency (duration) to trace, in milliseconds β±οΈ The default is 10 ms π·
π EXAMPLES π
Trace synchronous file reads and writes that are slower than 10 ms:
# f2fsslower
Trace anything slower than 1 ms:
# f2fsslower 1
Trace slower than 1 ms, and output just the fields in parsable format (csv) π:
# f2fsslower -s 1
Trace all file reads and writes (warning: the output will be verbose π):
# f2fsslower 0
Trace slower than 1 ms, for PID 181 only π§:
# f2fsslower -p 181 1
π FIELDS π
TIME(s)β when the I/O completed, counted in seconds from the first I/O seen β°COMMβ the process name π§βπ»PIDβ the process ID πTβ the type of operation.R== read,W== write,O== open,S== fsync π€OFF_KBβ the file offset for the I/O, in Kbytes πBYTESβ the size of the I/O, in bytes π¦LAT(ms)β the latency (duration) of the I/O, measured from when VFS issued it to the filesystem, until it completed π°οΈ This time includes block device I/O, file system CPU cycles, file system locks, run queue latency, and so on π It's a more accurate picture of the latency that applications actually feel when doing file system I/O, compared to measuring down at the block device interface πFILENAMEβ a cached kernel file name (it comes fromdentry->d_name.name) πENDTIME_usβ the completion timestamp, in microseconds (-sonly) βOFFSET_bβ the file offset, in bytes (-sonly) π«§LATENCY_usβ the latency (duration) of the I/O, in microseconds (-sonly) β‘
π OVERHEAD π
okay, real talk: this adds low-overhead instrumentation to these f2fs operations, including reads and writes from the file system cache π§ Those reads and writes can be super frequent (it depends on the workload, eg, 1M/sec π³), and at that point the overhead of this tool can start to become significant, even if it prints no "slower" events π Measure and quantify before you use it π If it keeps being a problem, consider switching to a tool that only prints in-kernel summaries π
Also, the overhead of this tool should be less than fileslower(8), because this one only targets f2fs functions and not every file read/write path (which can include socket I/O) π¦
πΈ SOURCE πΈ
This comes from bcc π«Ά
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file, which has example usage, output, and commentary for this tool π
π₯οΈ OS π₯οΈ
Linux π§
π§ͺ STABILITY π§ͺ
Unstable, still in development π§
π©βπ» AUTHOR π©βπ»
Ting Zhang π
π SEE ALSO π
biosnoop(8), funccount(8), fileslower(8) β¨
That's the whole page, bestie! π It was from the USER COMMANDS section, dated 2022-08-15, and it's the f2fsslower(8) manual, forever iconic πππ¦
π¦ where this page comes from
- centos-stream 9: bcc-tools 0.36.1-1.el9 Β· ASL 2.0
- fedora 43: bcc-tools 0.35.0-2.fc43 Β· Apache-2.0
- fedora 44: bcc-tools 0.35.0-5.fc44 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms