Disk polling: measure task construction and completion payload costs

Open
#4,179 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start at core/shard/src/poll.rs::read_poll and core/shard/src/poll/completion.rs::PollCompletionSender::complete. Inspect an optimized current release binary for future and payload sizes, allocation counts, and task-creation stacks, then reuse the parent diagnostics with and without writes. Done means any representation change is justified by material cost while preserving reservation release, cancellation, late completion, history checks, owner acceptance, and the disconnected requester guard.

Written by the indexing model from the issue text.

Description

performance server

Part of #4174, which records the shared profile revisions, workload and evaluation criteria.

read_poll transfers an owned PollPlan into a detached future, and PollCompletionSender::complete constructs Box<PollCompleted>. Determine whether their current copying or allocation costs justify a representation change.

In the historical candidate's two captures without writes, __memcpy_generic samples with disk task creation as the first application caller accounted for 2.00 and 1.82 µs of CPU per completed poll. Matching libc debug symbols resolved these samples. They identify copying during task creation, but neither the copied object nor the full construction cost or elapsed cost of boxing.

This is a lower priority lead: metric ownership and numeric history changes have since reduced carried state. Confirm that the old signal survives before selecting a change.

  • Inspect optimized future and payload sizes, allocation counts and task creation caller stacks for an exact current release binary.
  • Follow real ownership transfers through plan construction, execution, completion delivery and destruction. Account for copying, allocation placement and retained bytes throughout those lifetimes.
  • Reuse the parent's diagnostics with and without writes. If a material cost remains, compare one representation change through completed polls using the shared timing and validation rules.

Preserve reservation release, cancellation behavior, late completion handling, history checks, owner acceptance and the disconnected requester guard. Removing boxing can enlarge futures or queue entries; pooling can increase retention. A standalone allocator benchmark omits these ownership and scheduling effects, and fewer allocations alone do not establish a useful improvement.

Dominant language
Rust
Stars
5.3k
Forks
548
Avg merge
2d 20h
Merged PRs (30d)
194

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from apache/iggy

All issues in apache/iggy

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.