Skip to content

Commit fd38a16

Browse files
committed
fix(runtime): remove forcing tokio core count to 2 (#2087)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent 56a2a5e commit fd38a16

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/common/chirp/perf/src/ctx.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl PerfCtxInner {
202202
.await
203203
.push(PerfMark::new(base_ts, label, None, None));
204204
}
205-
.instrument(tracing::info_span!("perf_mark_async")),
205+
.instrument(tracing::trace_span!("perf_mark_async")),
206206
);
207207
if let Err(err) = spawn_res {
208208
tracing::error!(?err, "failed to spawn perf_mark_async task");
@@ -237,7 +237,7 @@ impl PerfCtxInner {
237237
Some(req_id),
238238
));
239239
}
240-
.instrument(tracing::info_span!("perf_mark_rpc_async")),
240+
.instrument(tracing::trace_span!("perf_mark_rpc_async")),
241241
);
242242
if let Err(err) = spawn_res {
243243
tracing::error!(?err, "failed to spawn perf_mark_rpc_async task");

packages/common/runtime/src/lib.rs

-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ fn build_tokio_runtime_builder() -> tokio::runtime::Builder {
3838

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

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

0 commit comments

Comments
 (0)