diff options
| -rw-r--r-- | gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi | 17 | ||||
| -rw-r--r-- | gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi.tpl | 12 | ||||
| -rw-r--r-- | gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi | 26 | ||||
| -rw-r--r-- | gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi.tpl | 13 | ||||
| -rw-r--r-- | gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi (renamed from gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi) | 43 | ||||
| -rw-r--r-- | gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi.tpl (renamed from gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi.tpl) | 30 | ||||
| -rw-r--r-- | gemfeed/DRAFT-unveiling-ior-ng-part-2.gmi | 217 | ||||
| -rw-r--r-- | gemfeed/atom.xml | 416 | ||||
| -rw-r--r-- | gemfeed/index.gmi | 5 | ||||
| -rw-r--r-- | index.gmi | 7 | ||||
| -rw-r--r-- | uptime-stats.gmi | 277 |
11 files changed, 610 insertions, 453 deletions
diff --git a/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi b/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi index 9abf0d2e..0d3c8339 100644 --- a/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi +++ b/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi @@ -1,4 +1,4 @@ -# Unveiling I/O Riot NG — Part 1: a guided tour +# Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour > Published at 2026-05-07T09:46:29+03:00 @@ -10,13 +10,14 @@ This is the first of three posts. Part 1 is the demo-driven tour: what `ior` loo => ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG — Part 1: a guided tour (You are currently reading this) => ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG — Part 3: under the hood => https://codeberg.org/snonux/ior I/O Riot NG on Codeberg => ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi the original I/O Riot post (2018) ## Table of Contents -* ⇢ Unveiling I/O Riot NG — Part 1: a guided tour +* ⇢ Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour * ⇢ ⇢ What it does * ⇢ ⇢ First launch * ⇢ ⇢ The seven tabs, in 30 seconds each @@ -29,6 +30,7 @@ This is the first of three posts. Part 1 is the demo-driven tour: what `ior` loo * ⇢ ⇢ The Stream tab is the good one * ⇢ ⇢ Filtering, more thoroughly * ⇢ ⇢ Recording +* ⇢ ⇢ What's new in v1.1.0 * ⇢ ⇢ What's still missing ## What it does @@ -195,6 +197,16 @@ Three persistence flows, each for a different job: Once a parquet file is on disk, point any SQL-over-parquet tool at it — Part 3 walks through ClickHouse Local, with real query output against a 30-second capture. +## What's new in v1.1.0 + +A handful of TUI additions landed in `v1.1.0` after this post was originally written against `1.0.0`. Nothing in the tour above became wrong, but a few keystrokes do more than they used to: + +* Three-way metric cycle on the flamegraph. `b` now toggles count → bytes → duration; the new "duration" mode weights bars by total syscall latency, which answers "where is the wall-clock time going?" in one keystroke. The same metric is wired through the bubble, treemap, and icicle views. +* Auto-reset timer for the live aggregates. `-resetTimer=<dur>` (default `30s`, `0` disables) sets the cadence at launch; the `I` hotkey cycles `off → 10s → 30s → 60s → 2m → 5m → off` while ior is running, and the dashboard chrome shows the remaining countdown. Same effect as hitting `r` on a schedule — keeps the live trie and stats engine bounded on long traces without you remembering to do it. +* In-place global filter swap. Pushing or popping the global filter (the Enter-on-a-cell trick, the PID/TID/probe pickers, `ESC` to pop) no longer detaches and reattaches every BPF tracepoint, so the "Attaching tracepoints..." overlay that used to flash for several seconds on busy I/O boxes is gone. Filter changes are now instant. +* Flame graph TUI keeps up under heavy load. Per-tick snapshot refresh runs on a background goroutine, navigation walks a precomputed ancestry index, and `View()` output is memoized. Keystrokes (pause, zoom, navigate, search) land within one frame even when the live trie is ingesting thousands of events per tick. +* `-tui-fast-refresh=<dur>` (default `250ms`, `0` disables) makes the flamegraph and stream tabs' high-frequency refresh cadence configurable, in case you want a lighter feel on a slow terminal or a punchier one on a busy workload. + ## What's still missing * No record/replay. That was the whole point of the original I/O Riot. The new one is a tracer, not a workload simulator. I keep going back and forth on whether to put replay back in. @@ -216,6 +228,7 @@ E-Mail your comments to `paul@nospam.buetow.org` :-) Other related posts are: +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG — Part 3: under the hood => ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere => ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG — Part 1: a guided tour (You are currently reading this) => ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi 2018-06-01 Realistic load testing with I/O Riot for Linux diff --git a/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi.tpl b/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi.tpl index 02b0c2b8..037cb871 100644 --- a/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi.tpl +++ b/gemfeed/2026-05-08-unveiling-ior-ng-part-1.gmi.tpl @@ -1,4 +1,4 @@ -# Unveiling I/O Riot NG — Part 1: a guided tour +# Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour > Published at 2026-05-07T09:46:29+03:00 @@ -179,6 +179,16 @@ Three persistence flows, each for a different job: Once a parquet file is on disk, point any SQL-over-parquet tool at it — Part 3 walks through ClickHouse Local, with real query output against a 30-second capture. +## What's new in v1.1.0 + +A handful of TUI additions landed in `v1.1.0` after this post was originally written against `1.0.0`. Nothing in the tour above became wrong, but a few keystrokes do more than they used to: + +* Three-way metric cycle on the flamegraph. `b` now toggles count → bytes → duration; the new "duration" mode weights bars by total syscall latency, which answers "where is the wall-clock time going?" in one keystroke. The same metric is wired through the bubble, treemap, and icicle views. +* Auto-reset timer for the live aggregates. `-resetTimer=<dur>` (default `30s`, `0` disables) sets the cadence at launch; the `I` hotkey cycles `off → 10s → 30s → 60s → 2m → 5m → off` while ior is running, and the dashboard chrome shows the remaining countdown. Same effect as hitting `r` on a schedule — keeps the live trie and stats engine bounded on long traces without you remembering to do it. +* In-place global filter swap. Pushing or popping the global filter (the Enter-on-a-cell trick, the PID/TID/probe pickers, `ESC` to pop) no longer detaches and reattaches every BPF tracepoint, so the "Attaching tracepoints..." overlay that used to flash for several seconds on busy I/O boxes is gone. Filter changes are now instant. +* Flame graph TUI keeps up under heavy load. Per-tick snapshot refresh runs on a background goroutine, navigation walks a precomputed ancestry index, and `View()` output is memoized. Keystrokes (pause, zoom, navigate, search) land within one frame even when the live trie is ingesting thousands of events per tick. +* `-tui-fast-refresh=<dur>` (default `250ms`, `0` disables) makes the flamegraph and stream tabs' high-frequency refresh cadence configurable, in case you want a lighter feel on a slow terminal or a punchier one on a busy workload. + ## What's still missing * No record/replay. That was the whole point of the original I/O Riot. The new one is a tracer, not a workload simulator. I keep going back and forth on whether to put replay back in. diff --git a/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi b/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi index 3ee72ee8..0fd4672a 100644 --- a/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi +++ b/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi @@ -1,27 +1,29 @@ -# Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +# Unveiling I/O Riot NG v1.0.0 — Part 2: install and compile once, run everywhere > Published at 2026-05-10T22:53:35+03:00 This is Part 2 of three. Part 1 is the demo-driven tour: what ior looks like, how the dashboard tabs work, how filtering and recording behave. This part is about the installation for Rocky Linux 8 and 9 and, more interestingly, why you only have to do that dance on a single machine: the resulting binary is portable to every other Linux box thanks to CO-RE (Compile Once, Run Everywhere) plus full static linking. Part 3 is the under-the-hood companion (per-event schema, async-syscall caveats, the syscall-coverage probe generator, and post-mortem SQL on the parquet output). -=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG — Part 1: a guided tour +=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour => ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere (You are currently reading this) +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG v1.0.0 — Part 3: under the hood => ./unveiling-ior-ng/00-hero-flamegraph.png Live flamegraph ## Table of Contents -* ⇢ Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +* ⇢ Unveiling I/O Riot NG v1.0.0 — Part 2: install and compile once, run everywhere * ⇢ ⇢ Installing ior * ⇢ ⇢ ⇢ Why native installation is a mess * ⇢ ⇢ ⇢ What the Docker build is actually doing * ⇢ ⇢ A short detour: eBPF and libbpfgo -* ⇢ ⇢ CO-RE — the part that makes the binary actually portable +* ⇢ ⇢ CO-RE — the part that makes the BPF binary actually portable * ⇢ ⇢ ⇢ Static linking * ⇢ ⇢ ⇢ Go programs are statically linked by default * ⇢ ⇢ ⇢ `cgo` programs are not statically linked by default. * ⇢ ⇢ ⇢ CO-RE * ⇢ ⇢ A note on cgo overhead +* ⇢ ⇢ What's new in v1.1.0 * ⇢ ⇢ If you want to go deeper ## Installing ior @@ -150,7 +152,7 @@ The kernel ships a C library called libbpf that handles loading the program, att I went with libbpfgo specifically because it's a wrapper, not a reimplementation. -## CO-RE — the part that makes the binary actually portable +## CO-RE — the part that makes the BPF binary actually portable The headline fact about `ior`'s deployment story: build it once on one box, then `scp ior other-host:/usr/local/bin/` to anywhere else and it just runs. No recompile per kernel, no kernel-debuginfo dance, no DKMS hooks. Two mechanisms make that work, and they reinforce each other. @@ -242,6 +244,13 @@ The cost of being a libbpf wrapper rather than a pure-Go reimplementation is cgo Go 1.26, the current release at the time of writing (early May 2026), is the one that finally took a serious bite out of cgo's per-call cost. The runtime can elide a chunk of the bookkeeping for calls that don't need it. Real-world wins depend heavily on the workload, but the rough direction is that cgo now feels closer to "an unusually expensive function call" than to "a context switch", which is the right mental model for almost everyone touching a C library from Go. The shorter version: cgo overhead used to be a real footgun for ports that called into C in the inner loop. With Go 1.26 it's a footnote unless you're doing many millions of small calls per second, in which case batching across the boundary still fixes it. +## What's new in v1.1.0 + +Two changes since the `1.0.0` release this post was originally written against touch the install / portability story directly: + +* `mage buildDockerEl8` is a new build target that produces a sibling binary called `ior.el8`, built inside a Rocky Linux 8 container against its older glibc. Drop it on RHEL/Rocky/Alma 8 hosts where the default Rocky 9-built `ior` would refuse to start with a `version 'GLIBC_2.34' not found` complaint. CO-RE still means one binary across kernel versions; the el8 split is purely about pinning the userspace libc floor lower for older fleets. The Dockerfile mirrors the same source-build dance described above (libelf.a from elfutils, libzstd.a from upstream, Go 1.26 from go.dev), just on top of a Rocky 8 base. +* Probe attach is now tolerant of missing tracepoints. Older kernels that don't expose every tracepoint v1.1.0 knows about (because the syscall didn't exist yet on that kernel, or the tracepoint name was renamed under it) log a one-line warning per missing probe and continue, instead of aborting startup. Same static binary, more kernels it actually attaches on, fewer surprises when you `scp` it to a host that's a few major versions behind your build box. Pairs naturally with the el8 build above: a Rocky 8 host running a 4.18 kernel will silently skip the tracepoints that arrived in 5.x and keep tracing the ones that exist. + ## If you want to go deeper If any of this sounds interesting and you want to learn how to write your own BPF programs, two books are the standard recommendations and both well worth the time: @@ -251,12 +260,17 @@ If any of this sounds interesting and you want to learn how to write your own BP Between the two, Rice teaches you the moving parts and Gregg teaches you what to do with them. +Read the next post of the series: + +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi Unveiling I/O Riot NG — Part 3: under the hood + E-Mail your comments to `paul@nospam.buetow.org` :-) Other related posts are: +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG v1.0.0 — Part 3: under the hood => ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere (You are currently reading this) -=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG — Part 1: a guided tour +=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour => ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi 2018-06-01 Realistic load testing with I/O Riot for Linux => ../ Back to the main site diff --git a/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi.tpl b/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi.tpl index fee4bc57..db977d4b 100644 --- a/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi.tpl +++ b/gemfeed/2026-05-11-unveiling-ior-ng-part-2.gmi.tpl @@ -1,4 +1,4 @@ -# Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +# Unveiling I/O Riot NG v1.0.0 — Part 2: install and compile once, run everywhere > Published at 2026-05-10T22:53:35+03:00 @@ -228,6 +228,13 @@ The cost of being a libbpf wrapper rather than a pure-Go reimplementation is cgo Go 1.26, the current release at the time of writing (early May 2026), is the one that finally took a serious bite out of cgo's per-call cost. The runtime can elide a chunk of the bookkeeping for calls that don't need it. Real-world wins depend heavily on the workload, but the rough direction is that cgo now feels closer to "an unusually expensive function call" than to "a context switch", which is the right mental model for almost everyone touching a C library from Go. The shorter version: cgo overhead used to be a real footgun for ports that called into C in the inner loop. With Go 1.26 it's a footnote unless you're doing many millions of small calls per second, in which case batching across the boundary still fixes it. +## What's new in v1.1.0 + +Two changes since the `1.0.0` release this post was originally written against touch the install / portability story directly: + +* `mage buildDockerEl8` is a new build target that produces a sibling binary called `ior.el8`, built inside a Rocky Linux 8 container against its older glibc. Drop it on RHEL/Rocky/Alma 8 hosts where the default Rocky 9-built `ior` would refuse to start with a `version 'GLIBC_2.34' not found` complaint. CO-RE still means one binary across kernel versions; the el8 split is purely about pinning the userspace libc floor lower for older fleets. The Dockerfile mirrors the same source-build dance described above (libelf.a from elfutils, libzstd.a from upstream, Go 1.26 from go.dev), just on top of a Rocky 8 base. +* Probe attach is now tolerant of missing tracepoints. Older kernels that don't expose every tracepoint v1.1.0 knows about (because the syscall didn't exist yet on that kernel, or the tracepoint name was renamed under it) log a one-line warning per missing probe and continue, instead of aborting startup. Same static binary, more kernels it actually attaches on, fewer surprises when you `scp` it to a host that's a few major versions behind your build box. Pairs naturally with the el8 build above: a Rocky 8 host running a 4.18 kernel will silently skip the tracepoints that arrived in 5.x and keep tracing the ones that exist. + ## If you want to go deeper If any of this sounds interesting and you want to learn how to write your own BPF programs, two books are the standard recommendations and both well worth the time: @@ -237,6 +244,10 @@ If any of this sounds interesting and you want to learn how to write your own BP Between the two, Rice teaches you the moving parts and Gregg teaches you what to do with them. +Read the next post of the series: + +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi Unveiling I/O Riot NG — Part 3: under the hood + E-Mail your comments to `paul@nospam.buetow.org` :-) Other related posts are: diff --git a/gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi b/gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi index 14aeb091..6ecdac7a 100644 --- a/gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi +++ b/gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi @@ -1,30 +1,27 @@ -# Unveiling I/O Riot NG — Part 3: under the hood +# Unveiling I/O Riot NG v1.0.0 — Part 3: under the hood -> Draft — not in the gemfeed yet. Promote with the usual rename + index dance. +> Published at 2026-05-16T18:00:00+03:00 This is the third and final post in the series. Part 1 is the demo-driven tour: what ior looks like, how the dashboard tabs work, how the live flamegraph reads, how filtering and recording behave. Part 2 covers the install dance for Rocky Linux 9 and the "compile once, run everywhere" portability story (eBPF, CO-RE, libbpfgo, static linking). This one is the part you read when you've got ior running and want to know what's actually in the data: the per-event schema, the safeguard that keeps syscall coverage current as new kernels ship, the integration test harness that proves it stays current, async-syscall caveats, and what to do with the parquet output once it's on disk. -If you haven't read Part 1, it's not a hard prerequisite, but the screenshots and key bindings referenced here all live there. Part 2 is also independent of this one; you can read them in either order. +=> ./unveiling-ior-ng/00-hero-flamegraph.png Live flamegraph -=> ./DRAFT-unveiling-ior-ng-part-1.gmi Part 1: a guided tour -=> ./2026-05-11-unveiling-ior-ng-part-2.gmi Part 2: install + compile once, run everywhere => https://codeberg.org/snonux/ior I/O Riot NG on Codeberg -=> ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi the original I/O Riot post (2018) -=> ./unveiling-ior-ng/00-logo.png I/O Riot NG logo - -=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG — Part 1: a guided tour +=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour => ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG — Part 3: under the hood (You are currently reading this) ## Table of Contents -* ⇢ Unveiling I/O Riot NG — Part 3: under the hood +* ⇢ Unveiling I/O Riot NG v1.0.0 — Part 3: under the hood * ⇢ ⇢ What ior actually captures per event * ⇢ ⇢ ⇢ Async syscalls and what "latency" means for them * ⇢ ⇢ Keeping up with new syscalls * ⇢ ⇢ ⇢ The integration test harness keeps the classifier honest * ⇢ ⇢ Querying a parquet trace with ClickHouse * ⇢ ⇢ Asking an AI to do the reading for you +* ⇢ ⇢ What's new in v1.1.0 * ⇢ ⇢ Wrapping up ## What ior actually captures per event @@ -75,12 +72,14 @@ The shape is straightforward. A small standalone Go binary, `ioworkload`, perfor `mage integrationTest` builds both binaries and runs the suite in parallel up to `INTEGRATION_PARALLEL` (default `NumCPU * 2`). `mage integrationTestSerial` does the same one at a time, which is the right knob when triaging a flake. They need root because of `CAP_BPF`, and they self-skip when not root. -What this buys, in practice: when CO-RE field offsets shift under me, when libbpfgo bumps a major version, when a new kernel quietly changes which syscalls bookkeep `bytes` at submission vs. completion, the suite's the thing that goes red first. The codegen safeguard tells me "the kernel surface changed". The integration harness tells me "and here's specifically what ior is now getting wrong about it". Together that's a much shorter feedback loop than the old "wait for the next time I notice the flamegraph looks weird" workflow. +What this buys, in practice: when CO-RE field offsets shift under me, when libbpfgo bumps a major version, when a new kernel quietly changes which syscalls bookkeep `bytes` at submission vs. completion, the suite's the thing that goes red first (not that I believe the kernel would introduce such a breaking change, so maybe this is a bad example). The codegen safeguard tells me "the kernel surface changed". The integration harness tells me "and here's specifically what ior is now getting wrong about it". That's much better than the old "wait for the next time I notice the flamegraph looks weird" workflow. ## Querying a parquet trace with ClickHouse The schema is flat and stable: `seq, time_ns, gap_ns, latency_ns, comm, pid, tid, syscall, fd, ret, bytes, file, is_error, filter_epoch`. ClickHouse Local reads parquet directly without a server, which makes it a perfect post-mortem tool — point it at the file and run SQL: +=> https://clickhouse.com/docs/operations/utilities/clickhouse-local ClickHouse Local — single-binary SQL over Parquet/CSV, no server needed + ```sh clickhouse local --query " SELECT comm, syscall, count() AS n, @@ -142,6 +141,8 @@ Real output, by the way: those rows are from a 30-second `ior -parquet trace.par Same trick works in DuckDB (`duckdb -c "SELECT ... FROM 'trace.parquet'"`), pandas, polars, anything that reads Parquet. The point of streaming Parquet rather than ior's native `.ior.zst` format is exactly this: once it's on disk, you're in the standard data-tools ecosystem. +=> https://duckdb.org/ DuckDB — single-binary embedded SQL, also reads Parquet directly + ## Asking an AI to do the reading for you Parquet is great if you already have an angle of attack. Sometimes you don't. You just want to know "what's hammering this box right now, and is any of it interesting?" That's where pasting a chunk of trace into an LLM and asking it to look turns out to be a surprisingly effective first pass. ior's `-plain` mode emits CSV, which is exactly the format AI assistants are best at chewing through: @@ -206,13 +207,25 @@ A few caveats worth knowing before you rely on this: * The model is reading text, not running SQL. It will round, it will sometimes miscount the long tail, and it cannot tell you a true p99 from a 250k-row sample without writing code. Treat the output as a lead-generator: it points you at suspects, then you confirm with ClickHouse on the parquet file. * For deeper questions ("what changed between these two traces?", "which pids dominate during the 12:34 spike?") an agentic assistant that can run shell commands does much better. It'll write the awk/clickhouse query itself, run it, and feed the result back into its own analysis. -The combination that's worked best for me in practice: capture parquet with `-parquet`, capture a parallel `-plain` CSV slice for the AI to read, ask the AI for a triage pass, then drill into the suspects with ClickHouse on the parquet file. Triage and ground-truth, in that order. +The combination that's worked best for me in practice: capture parquet with `-parquet`, also capture a `-plain` CSV slice for the AI to read, ask the AI for a triage pass, then drill into the suspects with ClickHouse on the parquet file. Triage and ground-truth, in that order. + +## What's new in v1.1.0 + +One v1.1.0 change is directly relevant to the syscall-coverage story above: probe attach is now tolerant of missing tracepoints. The codegen safeguard still flags new arrivals at build time, but when the resulting binary lands on a kernel that lacks one of its handlers (because the syscall is newer than the host kernel, or the tracepoint name was renamed under it), ior logs a one-line warning per missing probe and keeps attaching the rest, instead of failing startup with a hard error. Codegen keeps the list honest going forward; the runtime change makes the binary forgiving going backward. The new `ior.el8` build (Part 2's `mage buildDockerEl8` target, for RHEL/Rocky/Alma 8 hosts on 4.18 kernels) leans on this directly — it ships handlers for tracepoints that only exist on newer kernels, and now just skips them at attach instead of aborting. ## Wrapping up That's the bottom of the stack. For the dashboard surface (what ior looks like, how the seven tabs behave, how filtering and recording work in practice) Part 1 is the demo-driven tour with all the GIFs. For the install dance and the why-the-binary-is-portable story (eBPF, CO-RE, static linking), Part 2 is the install + portability companion. -=> ./DRAFT-unveiling-ior-ng-part-1.gmi Part 1: a guided tour -=> ./2026-05-11-unveiling-ior-ng-part-2.gmi Part 2: install + compile once, run everywhere => https://codeberg.org/snonux/ior Source on Codeberg -=> https://codeberg.org/snonux/ior/src/branch/main/docs/tutorial/tutorial.md The full in-repo tutorial + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other related posts are: + +=> ./2026-05-17-unveiling-ior-ng-part-3.gmi 2026-05-17 Unveiling I/O Riot NG — Part 3: under the hood (You are currently reading this) +=> ./2026-05-11-unveiling-ior-ng-part-2.gmi 2026-05-11 Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere +=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG v1.0.0 — Part 1: a guided tour +=> ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi 2018-06-01 Realistic load testing with I/O Riot for Linux + +=> ../ Back to the main site diff --git a/gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi.tpl b/gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi.tpl index 167c899d..eea280cd 100644 --- a/gemfeed/DRAFT-unveiling-ior-ng-part-3.gmi.tpl +++ b/gemfeed/2026-05-17-unveiling-ior-ng-part-3.gmi.tpl @@ -1,19 +1,12 @@ -# Unveiling I/O Riot NG — Part 3: under the hood +# Unveiling I/O Riot NG v1.0.0 — Part 3: under the hood -> Draft — not in the gemfeed yet. Promote with the usual rename + index dance. +> Published at 2026-05-16T18:00:00+03:00 This is the third and final post in the series. Part 1 is the demo-driven tour: what ior looks like, how the dashboard tabs work, how the live flamegraph reads, how filtering and recording behave. Part 2 covers the install dance for Rocky Linux 9 and the "compile once, run everywhere" portability story (eBPF, CO-RE, libbpfgo, static linking). This one is the part you read when you've got ior running and want to know what's actually in the data: the per-event schema, the safeguard that keeps syscall coverage current as new kernels ship, the integration test harness that proves it stays current, async-syscall caveats, and what to do with the parquet output once it's on disk. -If you haven't read Part 1, it's not a hard prerequisite, but the screenshots and key bindings referenced here all live there. Part 2 is also independent of this one; you can read them in either order. - => ./unveiling-ior-ng/00-hero-flamegraph.png Live flamegraph -=> ./DRAFT-unveiling-ior-ng-part-1.gmi Part 1: a guided tour -=> ./2026-05-11-unveiling-ior-ng-part-2.gmi Part 2: install + compile once, run everywhere => https://codeberg.org/snonux/ior I/O Riot NG on Codeberg -=> ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi the original I/O Riot post (2018) - -=> ./unveiling-ior-ng/00-logo.png I/O Riot NG logo << template::inline::index unveiling-ior-ng @@ -67,7 +60,7 @@ The shape is straightforward. A small standalone Go binary, `ioworkload`, perfor `mage integrationTest` builds both binaries and runs the suite in parallel up to `INTEGRATION_PARALLEL` (default `NumCPU * 2`). `mage integrationTestSerial` does the same one at a time, which is the right knob when triaging a flake. They need root because of `CAP_BPF`, and they self-skip when not root. -What this buys, in practice: when CO-RE field offsets shift under me, when libbpfgo bumps a major version, when a new kernel quietly changes which syscalls bookkeep `bytes` at submission vs. completion, the suite's the thing that goes red first. The codegen safeguard tells me "the kernel surface changed". The integration harness tells me "and here's specifically what ior is now getting wrong about it". Together that's a much shorter feedback loop than the old "wait for the next time I notice the flamegraph looks weird" workflow. +What this buys, in practice: when CO-RE field offsets shift under me, when libbpfgo bumps a major version, when a new kernel quietly changes which syscalls bookkeep `bytes` at submission vs. completion, the suite's the thing that goes red first (not that I believe the kernel would introduce such a breaking change, so maybe this is a bad example). The codegen safeguard tells me "the kernel surface changed". The integration harness tells me "and here's specifically what ior is now getting wrong about it". That's much better than the old "wait for the next time I notice the flamegraph looks weird" workflow. ## Querying a parquet trace with ClickHouse @@ -202,13 +195,22 @@ A few caveats worth knowing before you rely on this: * The model is reading text, not running SQL. It will round, it will sometimes miscount the long tail, and it cannot tell you a true p99 from a 250k-row sample without writing code. Treat the output as a lead-generator: it points you at suspects, then you confirm with ClickHouse on the parquet file. * For deeper questions ("what changed between these two traces?", "which pids dominate during the 12:34 spike?") an agentic assistant that can run shell commands does much better. It'll write the awk/clickhouse query itself, run it, and feed the result back into its own analysis. -The combination that's worked best for me in practice: capture parquet with `-parquet`, capture a parallel `-plain` CSV slice for the AI to read, ask the AI for a triage pass, then drill into the suspects with ClickHouse on the parquet file. Triage and ground-truth, in that order. +The combination that's worked best for me in practice: capture parquet with `-parquet`, also capture a `-plain` CSV slice for the AI to read, ask the AI for a triage pass, then drill into the suspects with ClickHouse on the parquet file. Triage and ground-truth, in that order. + +## What's new in v1.1.0 + +One v1.1.0 change is directly relevant to the syscall-coverage story above: probe attach is now tolerant of missing tracepoints. The codegen safeguard still flags new arrivals at build time, but when the resulting binary lands on a kernel that lacks one of its handlers (because the syscall is newer than the host kernel, or the tracepoint name was renamed under it), ior logs a one-line warning per missing probe and keeps attaching the rest, instead of failing startup with a hard error. Codegen keeps the list honest going forward; the runtime change makes the binary forgiving going backward. The new `ior.el8` build (Part 2's `mage buildDockerEl8` target, for RHEL/Rocky/Alma 8 hosts on 4.18 kernels) leans on this directly — it ships handlers for tracepoints that only exist on newer kernels, and now just skips them at attach instead of aborting. ## Wrapping up That's the bottom of the stack. For the dashboard surface (what ior looks like, how the seven tabs behave, how filtering and recording work in practice) Part 1 is the demo-driven tour with all the GIFs. For the install dance and the why-the-binary-is-portable story (eBPF, CO-RE, static linking), Part 2 is the install + portability companion. -=> ./DRAFT-unveiling-ior-ng-part-1.gmi Part 1: a guided tour -=> ./2026-05-11-unveiling-ior-ng-part-2.gmi Part 2: install + compile once, run everywhere => https://codeberg.org/snonux/ior Source on Codeberg -=> https://codeberg.org/snonux/ior/src/branch/main/docs/tutorial/tutorial.md The full in-repo tutorial + +E-Mail your comments to `paul@nospam.buetow.org` :-) + +Other related posts are: + +<< template::inline::rindex ior ioriot bpf + +=> ../ Back to the main site diff --git a/gemfeed/DRAFT-unveiling-ior-ng-part-2.gmi b/gemfeed/DRAFT-unveiling-ior-ng-part-2.gmi deleted file mode 100644 index 6f3ac55e..00000000 --- a/gemfeed/DRAFT-unveiling-ior-ng-part-2.gmi +++ /dev/null @@ -1,217 +0,0 @@ -# Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere - -> Draft — not in the gemfeed yet. Promote with the usual rename + index dance. - -This is Part 2 of three. Part 1 is the demo-driven tour: what ior looks like, how the dashboard tabs work, how filtering and recording behave. This part is about the install dance for Rocky Linux 9 (with one annoying kernel-backport caveat) and, more interestingly, why you only have to do that dance on a single machine: the resulting binary is portable to every other Linux box thanks to CO-RE (Compile Once, Run Everywhere) plus full static linking. Part 3 is the under-the-hood companion (per-event schema, async-syscall caveats, the syscall-coverage probe generator, and post-mortem SQL on the parquet output). - -If you came here for the dashboard tour, that's Part 1. If you want to know how the data pipeline is shaped, that's Part 3. This one is for the moment between "I want to try this" and "OK, it's running on the box I care about." - -=> ./DRAFT-unveiling-ior-ng-part-1.gmi Part 1: a guided tour -=> ./DRAFT-unveiling-ior-ng-part-3.gmi Part 3: under the hood (schema, probe generator, ClickHouse) -=> https://codeberg.org/snonux/ior I/O Riot NG on Codeberg -=> ./2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi the original I/O Riot post (2018) - -=> ./unveiling-ior-ng/00-logo.png I/O Riot NG logo - -=> ./2026-05-08-unveiling-ior-ng-part-1.gmi 2026-05-08 Unveiling I/O Riot NG 1.0.0 — Part 1: a guided tour - -## Table of Contents - -* ⇢ Unveiling I/O Riot NG — Part 2: install and compile once, run everywhere -* ⇢ ⇢ Installing ior -* ⇢ ⇢ ⇢ Why native installation is a mess -* ⇢ ⇢ ⇢ What the Docker build is actually doing -* ⇢ ⇢ A short detour: eBPF and libbpfgo -* ⇢ ⇢ CO-RE — the part that makes the binary actually portable -* ⇢ ⇢ A note on cgo overhead -* ⇢ ⇢ If you want to go deeper -* ⇢ ⇢ Wrapping up - -## Installing ior - -The short answer: use Docker. One command, no toolchain setup, works from any Docker-capable Linux host with BTF available: - -```sh -git clone https://codeberg.org/snonux/ior ~/git/ior -cd ~/git/ior -mage buildDocker -``` - -First run builds a Rocky Linux 9 builder image (~15–20 minutes). Subsequent runs reuse the cached image and finish in under a minute. The resulting static binary lands at `./ior`. - -That's the officially supported install path, and it's the right one for anyone who just wants to run ior without living in its build system. - -### Why native installation is a mess - -If you're curious why Docker became the answer, the native install on Rocky Linux 9 illustrates the problem well. Three separate things bite you before you even get to `mage build`: - -Rocky 9 ships neither `libelf.a` nor `libzstd.a`. There are no `*-static` subpackages for either, only the dynamic `.so` files. Both have to be compiled from source. `libelf` from the elfutils source RPM, `libzstd` from the upstream GitHub release tarball. - -Rocky 9 also only ships Go 1.25.x, but ior requires 1.26+. So Go itself has to be installed from go.dev in parallel with the library builds. - -And there's a kernel quirk that used to make this section much longer. Pre-fix, ior would happily load on a stock 5.14 RHEL kernel and then die on the very first tracepoint attach with `BPF_LINK_CREATE`/`BPF_PERF_EVENT` returning `EACCES`, even as root, with SELinux permissive, with every BPF-related sysctl wide open. The cause is that RHEL 9 carries an `rt`-tree backport that adds `preempt_lazy_count` to `struct trace_entry`. That widens the BTF-emitted alias `trace_event_raw_sys_enter`/`_exit` by 8 bytes and shifts the `args`/`ret` offsets, but the actual context the kernel hands the BPF program is still `struct syscall_trace_enter`/`_exit`, where the offsets did not move. Programs written against `trace_event_raw_sys_*` (the conventional choice; bcc, libbpf-tools, and ior all used to do this) end up reading past `max_ctx_offset`, so the verifier rejects the attach. The fix (also what bcc shipped in [PR #4920](https://github.com/iovisor/bcc/pull/4920) and what inspektor-gadget did) is to type the BPF context as `syscall_trace_enter`/`_exit` directly. ior now generates its handlers that way, and stock 5.14 RHEL/Rocky/Alma works without an ElRepo kernel. - -### What the Docker build is actually doing - -The Dockerfile encodes exactly the same steps that a native install on Rocky 9 would require. Here is the full sequence so you have a mental model of what's inside the image, and so you could reproduce it on a bare host if you ever needed to: - -```sh -# 1) Enable repos and install build dependencies. CRB ships zlib-static / glibc-static. -sudo dnf config-manager --set-enabled crb -sudo dnf install -y epel-release -sudo dnf install -y gcc clang bpftool elfutils-libelf-devel zlib-static \ - glibc-static libzstd-devel git make cmake wget rpmdevtools strace bpftrace -sudo dnf builddep -y elfutils - -# 2) Install Go 1.26 from go.dev. Rocky 9 ships only Go 1.25.x, ior needs 1.26+. -cd /tmp -wget -q https://go.dev/dl/go1.26.2.linux-amd64.tar.gz -sudo tar -C /usr/local -xf go1.26.2.linux-amd64.tar.gz -echo 'export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' | sudo tee /etc/profile.d/go.sh -source /etc/profile.d/go.sh - -# 3) Build libelf.a from the elfutils source RPM. -mkdir -p ~/src && cd ~ -dnf download --source elfutils-libelf -rpm -ivh elfutils-*.src.rpm -tar -C ~/src -xjf rpmbuild/SOURCES/elfutils-*.tar.bz2 -cd ~/src/elfutils-* -./configure --enable-deterministic-archives --disable-debuginfod --disable-libdebuginfod -make -C lib -j$(nproc) -make -C libelf -j$(nproc) -sudo cp -v libelf/libelf.a /usr/lib64/ - -# 4) Build libzstd.a from upstream (libzstd-devel doesn't ship the static archive). -cd /tmp -wget -q https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz -tar xzf zstd-1.5.5.tar.gz -make -C zstd-1.5.5/lib -j$(nproc) libzstd.a -sudo cp -v zstd-1.5.5/lib/libzstd.a /usr/lib64/ - -# 5) Clone ior + libbpfgo, pin libbpfgo, build the static libbpf archive, install mage. -mkdir -p ~/git -git clone https://codeberg.org/snonux/ior ~/git/ior -git clone https://github.com/aquasecurity/libbpfgo ~/git/libbpfgo -git -C ~/git/libbpfgo checkout v0.9.2-libbpf-1.5.1 -git -C ~/git/libbpfgo submodule update --init --recursive -make -C ~/git/libbpfgo libbpfgo-static -go install github.com/magefile/mage@latest - -# 6) Generate the syscall-coverage handlers against THIS kernel and build. -# IOR_FORCE_GENERATE bypasses the strict diff against the committed audit file -# (the committed audit was generated against a different kernel build, and the -# generator's safeguard would otherwise refuse to overwrite it). -cd ~/git/ior -env IOR_FORCE_GENERATE=1 GOTOOLCHAIN=auto mage generate -env GOTOOLCHAIN=auto mage all - -# 7) Smoke test. -sudo ./ior -plain -duration 5 -``` - -If you see `Probing for 5s` followed by CSV rows, the build is good. `mage buildDocker` runs all of this inside a container and hands you back just the final binary — the 15-minute first-run cost buys you never having to think about any of the above again. - -## A short detour: eBPF and libbpfgo - -If you haven't touched eBPF before: it's a small in-kernel bytecode VM. You compile a tiny C program, the kernel verifies it can't crash or loop forever, and then it runs every time some hook fires — a syscall enter/exit, a kprobe, a tracepoint, a network packet. The program writes events into a ring buffer that userspace mmaps and drains. No kernel module, no patched kernel, no debug symbols required. - -ior plugs into the syscall tracepoints (`sys_enter_openat`, `sys_exit_read`, etc.) and the BPF side does the bare minimum: timestamp the event, copy a few fields, push to a perf ring buffer. All the heavy lifting (string interning, latency math, aggregation, the dashboard) is in Go on the userspace side. - -The kernel ships a C library called libbpf that handles loading the program, attaching it to hooks, managing maps, and reading the ring buffer. There are two well-known ways to drive that from Go: - -* libbpfgo (Aqua Security): a thin cgo wrapper around libbpf. You ship libbpf along with your binary and call into the same C API that `bpftool` and `perf` use. -* cilium/ebpf: a from-scratch pure-Go reimplementation of everything libbpf does (ELF parser, BTF resolver, syscall layer, the lot). - -I went with libbpfgo specifically because it's a wrapper, not a reimplementation. Whatever lands in libbpf upstream (new map types, new attach kinds, CO-RE fixes) I get for free the next kernel cycle. The pure-Go variant has to chase libbpf's feature set in parallel, and any divergence is on me to debug. For a tracer that's mostly value-add on the userspace side, "be a thin client of the kernel's own library" wins. - -## CO-RE — the part that makes the binary actually portable - -The headline fact about ior's deployment story: build it once on one box, then `scp ior other-host:/usr/local/bin/` to anywhere else and it just runs. No recompile per kernel, no kernel-debuginfo dance, no DKMS hooks. Two mechanisms make that work, and they reinforce each other. - -The first is plain old static linking on the userspace side. A quick refresher on what that means, since it's central to why "scp the binary anywhere" works: when you build a normal Linux executable, the linker has two ways to wire library code into your program. Dynamic linking ("shared library") leaves a placeholder in the binary that says "at run time, find `libfoo.so.6` somewhere on `LD_LIBRARY_PATH` and pull in its symbols." Static linking pastes the library's machine code directly into your binary at build time, so there's nothing to look up later. Dynamic is smaller on disk and lets distros patch shared libs without rebuilding everything; static is bigger but self-contained, with no surprise about which version of the library the target box happens to have, no `error while loading shared libraries: libwhatever.so.6: cannot open shared object file` when the target ships a newer ABI. - -For Go, this is mostly a non-issue. A pure-Go binary (no cgo) is statically linked by default. The Go toolchain produces a single self-contained ELF file with no `.dynamic` section and no `NEEDED` entries. You can `scp` it to any Linux box of the same architecture and it just runs. That's one of the quietly nice things about Go. - |
