TimelyDataflow / TimelyDataflow/differential-dataflow

Figuring out where operators spend time

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
3k
Forks
211
Avg merge
10h 42m
Merged PRs (30d)
34

Description

I am still in the process of figuring out where my program spends time. The concatenate operator (#169) eliminated the most obvious source of wasted cycles, and now I am left with a CPU profile that does not have one or few main culprits, but instead a hundred or so operators that each spend more CPU time than I would intuitively expect them to (given the small amount of data they process in the particular test case I am looking at).

For each of these operators I can use the logging framework to compute the duration of each activation (obviously I can also aggregate them e.g., in a histogram, but since right now I am looking at few dozens of activations of each operator, I don't really have a need for that yet).

For example I have a Join operator that gets activated 57 times and spends up to a few hundred microseconds in each activation, to a total of 1.25ms. This seems to be on the expensive side, because the two relations being joined contain <=1 and <=4 records respectively. So I am looking for a way to zoom in even more to figure out where the operator is spending time exactly: (1) how many changes to each relation does it handle on each invocation, and is the amount of work it does proportional to the number of changes? (2) how much time does it spend executing user-supplied functions vs in the DD framework? (3) what are the framework overheads for the operator?

I suppose I can get an answer to (2) by instrumenting my functions, but I don't see an API to do (1) and I have no idea how to go about (3).

As usual, any guidance will be sincerely appreciated!

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 by reviewing the logging framework and the Join operator's activation path, then compare them with the profiling questions in the issue. Determine whether the existing API can expose relation changes, user-function time, and framework overhead; the work is done when a concrete profiling approach or API is defined and its expected measurements are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.