# dmohanty640/fio architecture

> Architecture diagram of the GitHub repository dmohanty640/fio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dmohanty640/fio
- Repository: https://github.com/dmohanty640/fio

## Overview

fio is an I/O workload generator and benchmark: users define jobs, fio starts worker threads or processes, issues the configured workload through a selected I/O engine, and reports measurements. The graph also captures verification, logging, zoned-device support, and remote client/server operation, which are major product capabilities reflected in the tree and README. The source excerpts are partial, so unsampled subsystem wiring is limited to the documented workflow and clear module responsibilities.

Main entry points: [`backend.c`](https://github.com/dmohanty640/fio/blob/master/backend.c) (Worker backend), [`fio.c`](https://github.com/dmohanty640/fio/blob/master/fio.c) (CLI entry), [`ioengines.c`](https://github.com/dmohanty640/fio/blob/master/ioengines.c) (Engine dispatch), [`server.c`](https://github.com/dmohanty640/fio/blob/master/server.c) (fio server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workload["Workload setup"]
  node_fio["CLI entry<br/>[fio.c]"]
  node_job_parser["Job parsing<br/>[parse.c]"]
  node_options["Job options<br/>[options.c]"]
  node_setup["Job setup<br/>[init.c]"]
end

subgraph group_execution["I/O execution"]
  node_backend["Worker backend<br/>[backend.c]"]
  node_io_u["I/O requests<br/>[io_u.c]"]
  node_engine_dispatch["Engine dispatch<br/>[ioengines.c]"]
  node_engine_api["Engine interface<br/>[ioengines.h]"]
  node_engines["I/O engines"]
  node_zoned["Zoned-device support<br/>[zbd.c]"]
end

subgraph group_measurement["Measurement"]
  node_verify["Data verification<br/>[verify.c]"]
  node_logging["I/O logging<br/>[iolog.c]"]
  node_stats["Statistics<br/>[stat.c]"]
  node_output["Results output<br/>[printing.c]"]
end

subgraph group_remote["Remote mode"]
  node_client["fio client<br/>[client.c]"]
  node_server["fio server<br/>[server.c]"]
end

node_user(("fio user"))
node_target["I/O target"]
node_remote_user(("Remote operator"))

node_user -->|"starts jobs"| node_fio
node_fio -->|"parses job files"| node_job_parser
node_job_parser -->|"sets options"| node_options
node_fio -->|"initializes jobs"| node_setup
node_setup -->|"starts workers"| node_backend
node_backend -->|"requests I/O"| node_io_u
node_io_u -->|"submits requests"| node_engine_dispatch
node_engine_dispatch -->|"uses interface"| node_engine_api
node_engine_dispatch -->|"dispatches requests"| node_engines
node_engines -->|"performs I/O"| node_target
node_backend -->|"verifies data"| node_verify
node_backend -->|"manages zones"| node_zoned
node_backend -->|"records samples"| node_logging
node_backend -->|"updates statistics"| node_stats
node_stats -->|"formats results"| node_output
node_logging -->|"provides log data"| node_output
node_remote_user -->|"configures remote run"| node_client
node_client -->|"sends jobs"| node_server
node_server -->|"runs jobs"| node_backend
node_server -->|"sends results"| node_client

click node_fio "https://github.com/dmohanty640/fio/blob/master/fio.c"
click node_job_parser "https://github.com/dmohanty640/fio/blob/master/parse.c"
click node_options "https://github.com/dmohanty640/fio/blob/master/options.c"
click node_setup "https://github.com/dmohanty640/fio/blob/master/init.c"
click node_backend "https://github.com/dmohanty640/fio/blob/master/backend.c"
click node_io_u "https://github.com/dmohanty640/fio/blob/master/io_u.c"
click node_engine_dispatch "https://github.com/dmohanty640/fio/blob/master/ioengines.c"
click node_engine_api "https://github.com/dmohanty640/fio/blob/master/ioengines.h"
click node_engines "https://github.com/dmohanty640/fio/tree/master/engines"
click node_verify "https://github.com/dmohanty640/fio/blob/master/verify.c"
click node_zoned "https://github.com/dmohanty640/fio/blob/master/zbd.c"
click node_logging "https://github.com/dmohanty640/fio/blob/master/iolog.c"
click node_stats "https://github.com/dmohanty640/fio/blob/master/stat.c"
click node_output "https://github.com/dmohanty640/fio/blob/master/printing.c"
click node_client "https://github.com/dmohanty640/fio/blob/master/client.c"
click node_server "https://github.com/dmohanty640/fio/blob/master/server.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fio,node_job_parser,node_options,node_setup,node_user toneBlue
class node_backend,node_io_u,node_engine_dispatch,node_engine_api,node_engines,node_zoned toneAmber
class node_verify,node_logging,node_stats,node_output toneMint
class node_client,node_server toneRose
class node_target,node_remote_user toneIndigo
```

## Components

### Workload setup

- [CLI entry](https://github.com/dmohanty640/fio/blob/master/fio.c): `fio.c`
- [Job parsing](https://github.com/dmohanty640/fio/blob/master/parse.c): `parse.c`
- [Job options](https://github.com/dmohanty640/fio/blob/master/options.c): `options.c`
- [Job setup](https://github.com/dmohanty640/fio/blob/master/init.c): `init.c`

### I/O execution

- [Worker backend](https://github.com/dmohanty640/fio/blob/master/backend.c): `backend.c`
- [I/O requests](https://github.com/dmohanty640/fio/blob/master/io_u.c): `io_u.c`
- [Engine dispatch](https://github.com/dmohanty640/fio/blob/master/ioengines.c): `ioengines.c`
- [Engine interface](https://github.com/dmohanty640/fio/blob/master/ioengines.h): `ioengines.h`
- [I/O engines](https://github.com/dmohanty640/fio/tree/master/engines): `engines`
- [Zoned-device support](https://github.com/dmohanty640/fio/blob/master/zbd.c): `zbd.c`

### Measurement

- [Data verification](https://github.com/dmohanty640/fio/blob/master/verify.c): `verify.c`
- [I/O logging](https://github.com/dmohanty640/fio/blob/master/iolog.c): `iolog.c`
- [Statistics](https://github.com/dmohanty640/fio/blob/master/stat.c): `stat.c`
- [Results output](https://github.com/dmohanty640/fio/blob/master/printing.c): `printing.c`

### Remote mode

- [fio client](https://github.com/dmohanty640/fio/blob/master/client.c): `client.c`
- [fio server](https://github.com/dmohanty640/fio/blob/master/server.c): `server.c`

### Other components

- **fio user**
- **I/O target**
- **Remote operator**

## Connections

- fio user → CLI entry: starts jobs
- CLI entry → Job parsing: parses job files
- Job parsing → Job options: sets options
- CLI entry → Job setup: initializes jobs
- Job setup → Worker backend: starts workers
- Worker backend → I/O requests: requests I/O
- I/O requests → Engine dispatch: submits requests
- Engine dispatch → Engine interface: uses interface
- Engine dispatch → I/O engines: dispatches requests
- I/O engines → I/O target: performs I/O
- Worker backend → Data verification: verifies data
- Worker backend → Zoned-device support: manages zones
- Worker backend → I/O logging: records samples
- Worker backend → Statistics: updates statistics
- Statistics → Results output: formats results
- I/O logging → Results output: provides log data
- Remote operator → fio client: configures remote run
- fio client → fio server: sends jobs
- fio server → Worker backend: runs jobs
- fio server → fio client: sends results
