Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ tracing-appender = "0.2.3"
time = ">=0.3.34, <0.3.36" # Pinned to a compatible range for MSRV 1.70
parking_lot = "0.12.4"
thiserror = "2.0.16"
core_affinity = "0.8.3"

[dev-dependencies]
criterion = "0.5"
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,22 @@ ipc-benchmark -m tcp --host 127.0.0.1 --port 9090
ipc-benchmark -m shm --buffer-size 16384
```

### CPU Affinity

For the most stable and repeatable results, you can pin the server and client processes to specific CPU cores. This minimizes performance noise from OS scheduling, context switching, and cache misses.

- `--server-affinity <CORE_ID>`: Pins the server process to a specific CPU core.
- `--client-affinity <CORE_ID>`: Pins the client process to a specific CPU core.

```bash
# Pin the server to core 2 and the client to core 3
ipc-benchmark \
-m uds \
-i 100000 \
--server-affinity 2 \
--client-affinity 3
```

### Test Configuration Examples

#### High-Throughput Testing
Expand Down Expand Up @@ -563,5 +579,4 @@ Common issues and solutions:

- **Single-threaded** (`-c 1`): Most accurate latency measurements
- **Simulated concurrency** (`-c 2+`): Good for throughput scaling analysis
- **Shared memory**: Always single-threaded for reliability

- **Shared memory**: Always single-threaded for reliability
Loading
Loading