rr-debugger / rr-debugger/rr

Time taken for thread_stress test is surprisingly high

Open
#528 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

With the syscallbuf enabled, it takes about 30s on my very fast machine (VM though). Outside rr, the test takes 0.12s. So ~300x overhead.

The test just creates and joins 1500 threads, so some kind of degenerate behavior seems to be triggered. The syscallbuf setup we do should be relatively cheap.

There's a maximum ~5-6s overhead from the workaround for not handling CLONE_CHILD_CLEARTID, but that's still not a significant chunk of the 300x. My VM is 4x parallel, but that factor is still only chipping away at the overhead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the thread_stress test and compare its runtime with syscallbuf enabled and outside rr, using the reported 1500-thread workload. Investigate the syscallbuf setup and the CLONE_CHILD_CLEARTID workaround, then identify the source of the remaining overhead. Done means the excessive slowdown is explained and the test no longer exhibits the reported degenerate behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.