Skip to content

chore(observability): add tokio runtime with custom thread naming#18635

Merged
yongkangc merged 7 commits intomainfrom
revert-18631-revert-18623-yk/engine_wk_pool
Sep 23, 2025
Merged

chore(observability): add tokio runtime with custom thread naming#18635
yongkangc merged 7 commits intomainfrom
revert-18631-revert-18623-yk/engine_wk_pool

Conversation

@yongkangc
Copy link
Member

@yongkangc yongkangc commented Sep 23, 2025

Closes: #18624 - All threads looked identical - impossible to debug or profile

  • better observability of tokio threads for profiling, similar to how we doing it on rayon i.e reth-rayon-36

Changes:

  • All major thread pools now have descriptive names for easy identification:
    • Main CLI runtime: cli-tokio-{id} (e.g., reth-cli-tokio-0, reth-cli-tokio-1)
    • Workload executor: wkp-tokio-{id} (e.g., reth-wkpool-tokio-0, reth-wkpool-tokio-1)
    • Trie operations: trie-tokio-{id} (e.g., reth-trie-tokio-0, reth-trie-tokio-1)
    • CPU blocking tasks: blk-rayon-{id} (e.g., reth-blocking-rayon-0, reth-blocking-rayon-1)
    • Global CPU pool: reth-rayon-{id} (e.g., reth-rayon-0, reth-rayon-1)

-  there's a limit in Linux kernel for thread name lengths
@yongkangc yongkangc marked this pull request as ready for review September 23, 2025 11:39
@yongkangc
Copy link
Member Author

yongkangc commented Sep 23, 2025

reth-wkpool-tokio or reth-trie-tokio threads, because the runtime will already be initialized upstream

@shekhirin you were right!

ran it on samply and seems like trie-tokio, wkp-tokio doesnt get created because we use the main runtime.

however, think we should still keep the fallback name (trie-tokio, wkp-tokio) threads just in case it fallsbacks and we wanna know whats the run time - that would still be helpful at no cost

although - the blocking one would still be relevant

@yongkangc yongkangc self-assigned this Sep 23, 2025
@yongkangc yongkangc added the A-observability Related to tracing, metrics, logs and other observability tools label Sep 23, 2025
Copy link
Member

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

some naming suggestions

yongkangc and others added 3 commits September 23, 2025 19:47
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
@yongkangc
Copy link
Member Author

@shekhirin thanks for the suggestions, i think its much more intuitive now - let me know if u have any other comments!

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Sep 23, 2025
@yongkangc yongkangc enabled auto-merge September 23, 2025 11:53
@yongkangc yongkangc added this pull request to the merge queue Sep 23, 2025
Merged via the queue into main with commit 088a0d4 Sep 23, 2025
41 checks passed
@yongkangc yongkangc deleted the revert-18631-revert-18623-yk/engine_wk_pool branch September 23, 2025 12:20
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Sep 23, 2025
Vui-Chee added a commit to okx/reth that referenced this pull request Nov 3, 2025
* dev: (166 commits)
  chore: bump 1.8.3 (paradigmxyz#19379)
  chore: bump alloy-evm 0.21.3
  chore: bump alloy 1.0.37 (paradigmxyz#18795)
  chore: bump version to 1.8.2 (paradigmxyz#18792)
  fix(rpc/engine): check osaka in getBlobsV1 (paradigmxyz#18669)
  fix: remove cancun check (paradigmxyz#18787)
  fix(rpc): fix eth_config impl (paradigmxyz#18744)
  feat: make more EVM and RPC conversions fallible (paradigmxyz#18685)
  chore: bump rust to edition 2024 (paradigmxyz#18692)
  chore: release 1.8.1 (paradigmxyz#18646)
  fix: Revert "chore: disable fee charge in env" (paradigmxyz#18645)
  chore(deps): bump CodSpeedHQ/action from 3 to 4 (paradigmxyz#18333)
  chore: update voc.config.to text to v1.8.0 (paradigmxyz#18644)
  chore: update version to 1.8.0 in Cargo.toml (paradigmxyz#18638)
  fix: check request gas limit before (paradigmxyz#18639)
  chore(observability): add tokio runtime with custom thread naming (paradigmxyz#18635)
  docs: update dashboard table and rpc urls (paradigmxyz#18637)
  feat: add osaka+bpo timestamps (paradigmxyz#18627)
  chore: disable fee charge in env (paradigmxyz#18634)
  chore: bump inspectors 0.30 (paradigmxyz#18633)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-observability Related to tracing, metrics, logs and other observability tools

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

improve naming of tokio threads

2 participants