You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use single-threaded tokio runtime in sccache client
The sccache client was using Runtime::new() which creates a multi-threaded
tokio runtime with worker threads equal to the number of CPU cores. On
high-core-count servers running many parallel builds, this created an
excessive number of threads.
For example:
- 96 vCPU server
- 10 concurrent make invocations
- Each make using -j16
- Result: 96 × 10 × 16 = 15,360 threads created by sccache wrappers
While these threads are short-lived, with continuous build pipelines this
constant thread creation/destruction causes unnecessary overhead. The sccache
client only performs simple I/O operations (connecting to server, sending
requests, receiving responses) and doesn't need worker threads.
This change replaces all client-side Runtime::new() calls with
Builder::new_current_thread().enable_all().build() to use a
single-threaded runtime, reducing thread count from num_cpus to 1 per
client invocation.
0 commit comments