Skip to content

Commpage: Process-Isolated Benchmarking via Shared Memory#78

Draft
bazhenov wants to merge 49 commits intomainfrom
shmem-test
Draft

Commpage: Process-Isolated Benchmarking via Shared Memory#78
bazhenov wants to merge 49 commits intomainfrom
shmem-test

Conversation

@bazhenov
Copy link
Copy Markdown
Owner

@bazhenov bazhenov commented Apr 6, 2026

Motivation

Today tango loads both the baseline (B) and candidate (C) benchmarks into the same process using dlopen/LoadLibrary. This is clever but has drawbacks:

  1. Platform hacks -- Linux PIE patching (linux.rs) and Windows IAT patching (windows.rs) exist solely to make executables loadable as shared libraries. These are fragile and there is no guarantee they will continue to work in the future. Especially on Linux where this approach was explicitly banned by dyld.
  2. Insufficient isolation -- Operating systems provide ways to collect additional per-process information (e.g. memory allocations), but these are often defined at the process level, not the thread level. Running both benchmarks in the same process prevents effective use of these tools.

Running each benchmark in its own process and reading measurements through shared memory (the "commpage") solves both problems.

@bazhenov bazhenov added the bench-protocol-changed This PR has changes in benchmark protocol. label Apr 10, 2026
@bazhenov bazhenov self-assigned this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench-protocol-changed This PR has changes in benchmark protocol.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant