Skip to content

docs: thread pool#31

Open
Scofield626 wants to merge 4 commits into
copper-project:mainfrom
Scofield626:docs/thread-pools
Open

docs: thread pool#31
Scofield626 wants to merge 4 commits into
copper-project:mainfrom
Scofield626:docs/thread-pools

Conversation

@Scofield626

@Scofield626 Scofield626 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a new chapter covering runtime.thread_pools, CPU affinity, scheduling policies, and the rt-scheduling feature.

  • Document the reserved background and rt pools, including custom background: (pool: "...") task binding.

  • Update related performance/task docs to point from the older threadpool resource bundle wording to the new runtime thread pool configuration.

@Scofield626 Scofield626 marked this pull request as ready for review June 16, 2026 22:09
  - Nice is Linux-only too: on non-Linux only `Fair` is applied; `Nice`,
    `Fifo`, and `RoundRobin` all fall back per `on_error`.
  - Note that negative niceness needs `CAP_SYS_NICE` like the RT policies.
  - State the default `background` pool size (2 threads, no affinity, Fair).
  - Call out that unknown pool names and `(pool: "rt")` on a background
    task are compile-time errors.
  - For the reserved `rt` pool, clarify that `parallel-rt` sizes workers
    by stage count, so `threads:` is ignored -- size `affinity` instead.
  - Add a "Determinism and replay" section: pool config is performance-only,
    the CopperList stream is bit-identical with/without an `rt` pool, and
    mutating `config.runtime.thread_pools` is the supported neutralization
    hook for replay/resim on hosts that can't pin.

@gbin gbin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some terminology confusion

Comment thread book/src/advanced-tasks.md Outdated
Comment thread book/src/thread-pools.md
Comment thread book/src/thread-pools.md Outdated
Comment thread book/src/thread-pools.md
Comment thread book/src/thread-pools.md Outdated
@Scofield626 Scofield626 requested a review from gbin July 9, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants