Skip to content

Commit

Permalink
fix(runtime): remove forcing tokio core count to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry authored and MasterPtato committed Feb 27, 2025
1 parent 65091d6 commit 1a6660e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/common/chirp/perf/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl PerfCtxInner {
.await
.push(PerfMark::new(base_ts, label, None, None));
}
.instrument(tracing::info_span!("perf_mark_async")),
.instrument(tracing::trace_span!("perf_mark_async")),
);
if let Err(err) = spawn_res {
tracing::error!(?err, "failed to spawn perf_mark_async task");
Expand Down Expand Up @@ -237,7 +237,7 @@ impl PerfCtxInner {
Some(req_id),
));
}
.instrument(tracing::info_span!("perf_mark_rpc_async")),
.instrument(tracing::trace_span!("perf_mark_rpc_async")),
);
if let Err(err) = spawn_res {
tracing::error!(?err, "failed to spawn perf_mark_rpc_async task");
Expand Down
8 changes: 0 additions & 8 deletions packages/common/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ fn build_tokio_runtime_builder() -> tokio::runtime::Builder {

if let Ok(worker_threads) = env::var("TOKIO_WORKER_THREADS") {
rt_builder.worker_threads(worker_threads.parse().unwrap());
} else {
// Default to 2 threads since this is likely running in a shared
// context. If we constrain this task to use 100 MHz an 8 core system,
// it will still spawn 8 threads needlessly.
//
// If a service is configured to use a dedicated core, Bolt will expose
// the correct thread count.
rt_builder.worker_threads(2);
}

if let Ok(max_blocking_threads) = env::var("TOKIO_MAX_BLOCKING_THREADS") {
Expand Down

0 comments on commit 1a6660e

Please sign in to comment.